From: Kishon Vijay Abraham I <kishon@ti.com>
To: Alban Bedel <albeu@free.fr>, <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"David S. Miller" <davem@davemloft.net>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Joe Perches <joe@perches.com>, Jiri Slaby <jslaby@suse.com>
Subject: Re: [PATCH v3 2/2] phy: Add a driver for the ATH79 USB phy
Date: Tue, 2 Feb 2016 11:41:15 +0530 [thread overview]
Message-ID: <56B04883.3010506@ti.com> (raw)
In-Reply-To: <1454010741-21899-2-git-send-email-albeu@free.fr>
Hi,
On Friday 29 January 2016 01:22 AM, Alban Bedel wrote:
> The ATH79 USB phy is very simple, it only have a reset. On some SoC a
> second reset is used to force the phy in suspend mode regardless of the
> USB controller status.
>
> Signed-off-by: Alban Bedel <albeu@free.fr>
> ---
> Changelog:
> v2: * Rebased on the simple PHY driver
> * Added myself as maintainer of the driver
> ---
> MAINTAINERS | 8 +++
> drivers/phy/Kconfig | 8 +++
> drivers/phy/Makefile | 1 +
> drivers/phy/phy-ath79-usb.c | 116 ++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 133 insertions(+)
> create mode 100644 drivers/phy/phy-ath79-usb.c
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 30aca4a..f536d52 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1866,6 +1866,14 @@ S: Maintained
> F: drivers/gpio/gpio-ath79.c
> F: Documentation/devicetree/bindings/gpio/gpio-ath79.txt
>
> +ATHEROS 71XX/9XXX USB PHY DRIVER
> +M: Alban Bedel <albeu@free.fr>
> +W: https://github.com/AlbanBedel/linux
> +T: git git://github.com/AlbanBedel/linux
> +S: Maintained
> +F: drivers/phy/phy-ath79-usb.c
> +F: Documentation/devicetree/bindings/phy/phy-ath79-usb.txt
> +
> ATHEROS ATH GENERIC UTILITIES
> M: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
> L: linux-wireless@vger.kernel.org
> diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
> index efbaee4..6090c63 100644
> --- a/drivers/phy/Kconfig
> +++ b/drivers/phy/Kconfig
> @@ -15,6 +15,14 @@ config GENERIC_PHY
> phy users can obtain reference to the PHY. All the users of this
> framework should select this config.
>
> +config PHY_ATH79_USB
> + tristate "Atheros AR71XX/9XXX USB PHY driver"
> + depends on ATH79 || COMPILE_TEST
> + default y if USB_EHCI_HCD_PLATFORM
> + select PHY_SIMPLE
> + help
> + Enable this to support the USB PHY on Atheros AR71XX/9XXX SoCs.
> +
> config PHY_BERLIN_USB
> tristate "Marvell Berlin USB PHY Driver"
> depends on ARCH_BERLIN && RESET_CONTROLLER && HAS_IOMEM && OF
> diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
> index 1cc7268..5c9ca5f 100644
> --- a/drivers/phy/Makefile
> +++ b/drivers/phy/Makefile
> @@ -3,6 +3,7 @@
> #
>
> obj-$(CONFIG_GENERIC_PHY) += phy-core.o
> +obj-$(CONFIG_PHY_ATH79_USB) += phy-ath79-usb.o
> obj-$(CONFIG_PHY_BERLIN_USB) += phy-berlin-usb.o
> obj-$(CONFIG_PHY_BERLIN_SATA) += phy-berlin-sata.o
> obj-$(CONFIG_PHY_DM816X_USB) += phy-dm816x-usb.o
> diff --git a/drivers/phy/phy-ath79-usb.c b/drivers/phy/phy-ath79-usb.c
> new file mode 100644
> index 0000000..ff49356
> --- /dev/null
> +++ b/drivers/phy/phy-ath79-usb.c
> @@ -0,0 +1,116 @@
> +/*
> + * Copyright (C) 2015 Alban Bedel <albeu@free.fr>
2016?
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + */
> +
> +#include <linux/module.h>
> +#include <linux/platform_device.h>
> +#include <linux/phy/simple.h>
> +#include <linux/reset.h>
> +
> +struct ath79_usb_phy {
> + struct simple_phy sphy;
> + struct reset_control *suspend_override;
> +};
> +
> +static int ath79_usb_phy_power_on(struct phy *phy)
> +{
> + struct ath79_usb_phy *priv = container_of(
> + phy_get_drvdata(phy), struct ath79_usb_phy, sphy);
> + int err;
> +
> + err = simple_phy_power_on(phy);
Why do you need a separate driver for ath79_usb? We should be able to directly
use simple phy driver right?
Thanks
Kishon
next prev parent reply other threads:[~2016-02-02 6:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-28 19:52 [PATCH v3 1/2] phy: Add a driver for simple phy Alban Bedel
2016-01-28 19:52 ` [PATCH v3 2/2] phy: Add a driver for the ATH79 USB phy Alban Bedel
2016-02-02 6:11 ` Kishon Vijay Abraham I [this message]
2016-02-17 14:34 ` Alban
2016-02-01 11:42 ` [PATCH v3 1/2] phy: Add a driver for simple phy Kishon Vijay Abraham I
2016-02-17 14:21 ` Alban
2016-10-07 8:27 ` Vivek Gautam
2016-10-12 22:17 ` Alban
2016-10-13 8:26 ` Vivek Gautam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56B04883.3010506@ti.com \
--to=kishon@ti.com \
--cc=akpm@linux-foundation.org \
--cc=albeu@free.fr \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome