From: Roger Quadros <rogerq@ti.com>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: <balbi@ti.com>, <bcousson@baylibre.com>, <tony@atomide.com>,
<rob.herring@calxeda.com>, <pawel.moll@arm.com>,
<mark.rutland@arm.com>, <linux@arm.linux.org.uk>,
<grant.likely@linaro.org>, <s.nawrocki@samsung.com>,
<galak@codeaurora.org>, <swarren@wwwdotorg.org>,
<ian.campbell@citrix.com>, <rob@landley.net>,
<george.cherian@ti.com>, <gregkh@linuxfoundation.org>,
<linux-doc@vger.kernel.org>, <linux-omap@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-usb@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 7/7] drivers: phy: renamed struct omap_control_usb to struct omap_control_phy
Date: Thu, 12 Sep 2013 16:42:28 +0300 [thread overview]
Message-ID: <5231C4C4.1000100@ti.com> (raw)
In-Reply-To: <1378136591-7463-8-git-send-email-kishon@ti.com>
Hi,
On 09/02/2013 06:43 PM, Kishon Vijay Abraham I wrote:
> renamed struct omap_control_usb to struct omap_control_phy since it can
> be used to control PHY of USB, SATA and PCIE. Also moved the driver and
> include files under *phy* and made the corresponding changes in the users
> of phy-omap-control.
>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
> drivers/phy/Kconfig | 14 +-
> drivers/phy/Makefile | 1 +
> drivers/{usb => }/phy/phy-omap-control.c | 164 ++++++++++----------
> drivers/phy/phy-omap-pipe3.c | 8 +-
> drivers/phy/phy-omap-usb2.c | 8 +-
> drivers/usb/musb/omap2430.c | 2 +-
> drivers/usb/phy/Makefile | 1 -
> .../omap_control_usb.h => phy/omap_control_phy.h} | 32 ++--
> 8 files changed, 120 insertions(+), 110 deletions(-)
> rename drivers/{usb => }/phy/phy-omap-control.c (55%)
> rename include/linux/{usb/omap_control_usb.h => phy/omap_control_phy.h} (69%)
>
> diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
> index 5c2e7a0..fd11294 100644
> --- a/drivers/phy/Kconfig
> +++ b/drivers/phy/Kconfig
> @@ -15,12 +15,22 @@ config GENERIC_PHY
> phy users can obtain reference to the PHY. All the users of this
> framework should select this config.
>
> +config OMAP_CONTROL_PHY
> + tristate "OMAP CONTROL PHY Driver"
> + depends on ARCH_OMAP2PLUS || COMPILE_TEST
> + help
> + Enable this to add support for the PHY part present in the control
> + module. This driver has API to power on the USB2 PHY and to write to
> + the mailbox. The mailbox is present only in omap4 and the register to
> + power on the USB2 PHY is present in OMAP4 and OMAP5. OMAP5 has
> + additional registers to power on PIPE3 PHYs.
> +
> config OMAP_USB2
> tristate "OMAP USB2 PHY Driver"
> depends on ARCH_OMAP2PLUS
> select GENERIC_PHY
> select USB_PHY
> - select OMAP_CONTROL_USB
> + select OMAP_CONTROL_PHY
> help
> Enable this to support the transceiver that is part of SOC. This
> driver takes care of all the PHY functionality apart from comparator.
> @@ -30,7 +40,7 @@ config OMAP_USB2
> config OMAP_PIPE3
> tristate "OMAP PIPE3 PHY Driver"
> select GENERIC_PHY
> - select OMAP_CONTROL_USB
> + select OMAP_CONTROL_PHY
> help
> Enable this to support the PIPE3 PHY that is part of SOC. This
> driver takes care of all the PHY functionality apart from comparator.
> diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
> index 48bf9f2..f0127f6 100644
> --- a/drivers/phy/Makefile
> +++ b/drivers/phy/Makefile
> @@ -3,6 +3,7 @@
> #
>
> obj-$(CONFIG_GENERIC_PHY) += phy-core.o
> +obj-$(CONFIG_OMAP_CONTROL_PHY) += phy-omap-control.o
> obj-$(CONFIG_OMAP_USB2) += phy-omap-usb2.o
> obj-$(CONFIG_OMAP_PIPE3) += phy-omap-pipe3.o
> obj-$(CONFIG_TWL4030_USB) += phy-twl4030-usb.o
> diff --git a/drivers/usb/phy/phy-omap-control.c b/drivers/phy/phy-omap-control.c
> similarity index 55%
> rename from drivers/usb/phy/phy-omap-control.c
> rename to drivers/phy/phy-omap-control.c
> index 1a7e19a..ece3573 100644
> --- a/drivers/usb/phy/phy-omap-control.c
> +++ b/drivers/phy/phy-omap-control.c
> @@ -1,5 +1,5 @@
> /*
> - * omap-control-usb.c - The USB part of control module.
> + * phy-omap-control.c - The USB part of control module.
> *
> * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
> * This program is free software; you can redistribute it and/or modify
> @@ -24,36 +24,36 @@
> #include <linux/err.h>
> #include <linux/io.h>
> #include <linux/clk.h>
> -#include <linux/usb/omap_control_usb.h>
> +#include <linux/phy/omap_control_phy.h>
>
<snip>
> #ifdef CONFIG_OF
>
> -static const enum omap_control_usb_type omap4_data = OMAP_CTRL_TYPE_OMAP4;
> -static const enum omap_control_usb_type usb2_data = OMAP_CTRL_TYPE_USB2;
> -static const enum omap_control_usb_type usb3_data = OMAP_CTRL_TYPE_USB3;
> -static const enum omap_control_usb_type dra7_data = OMAP_CTRL_TYPE_DRA7;
> +static const enum omap_control_phy_type omap4_data = OMAP_CTRL_TYPE_OMAP4;
> +static const enum omap_control_phy_type usb2_data = OMAP_CTRL_TYPE_USB2;
> +static const enum omap_control_phy_type usb3_data = OMAP_CTRL_TYPE_USB3;
> +static const enum omap_control_phy_type dra7_data = OMAP_CTRL_TYPE_DRA7;
>
> -static const struct of_device_id omap_control_usb_id_table[] = {
> +static const struct of_device_id omap_control_phy_id_table[] = {
> {
> .compatible = "ti,omap4-control-usb",
> .data = &omap4_data,
> @@ -286,31 +286,31 @@ static const struct of_device_id omap_control_usb_id_table[] = {
> },
> {},
> };
> -MODULE_DEVICE_TABLE(of, omap_control_usb_id_table);
> +MODULE_DEVICE_TABLE(of, omap_control_phy_id_table);
> #endif
>
> -static struct platform_driver omap_control_usb_driver = {
> - .probe = omap_control_usb_probe,
> +static struct platform_driver omap_control_phy_driver = {
> + .probe = omap_control_phy_probe,
> .driver = {
> .name = "omap-control-usb",
> .owner = THIS_MODULE,
> - .of_match_table = of_match_ptr(omap_control_usb_id_table),
> + .of_match_table = of_match_ptr(omap_control_phy_id_table),
> },
> };
>
> -static int __init omap_control_usb_init(void)
> +static int __init omap_control_phy_init(void)
> {
> - return platform_driver_register(&omap_control_usb_driver);
> + return platform_driver_register(&omap_control_phy_driver);
> }
> -subsys_initcall(omap_control_usb_init);
> +subsys_initcall(omap_control_phy_init);
Any specific reason for having this as subsys_initcall?
If not then you can use module_platform_driver().
>
> -static void __exit omap_control_usb_exit(void)
> +static void __exit omap_control_phy_exit(void)
> {
> - platform_driver_unregister(&omap_control_usb_driver);
> + platform_driver_unregister(&omap_control_phy_driver);
> }
> -module_exit(omap_control_usb_exit);
> +module_exit(omap_control_phy_exit);
>
> -MODULE_ALIAS("platform: omap_control_usb");
> +MODULE_ALIAS("platform: omap_control_phy");
> MODULE_AUTHOR("Texas Instruments Inc.");
> MODULE_DESCRIPTION("OMAP Control Module USB Driver");
> MODULE_LICENSE("GPL v2");
cheers,
-roger
next prev parent reply other threads:[~2013-09-12 13:43 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-02 15:43 [PATCH 0/7] Make dwc3 use Generic PHY Framework and misc cleanup Kishon Vijay Abraham I
2013-09-02 15:43 ` [PATCH 1/7] usb: dwc3: get "usb_phy" only if the platform indicates the presence of PHY Kishon Vijay Abraham I
2013-09-12 10:36 ` Roger Quadros
2013-09-12 10:47 ` Vivek Gautam
2013-09-12 11:04 ` Roger Quadros
2013-09-12 11:26 ` Vivek Gautam
2013-09-12 13:11 ` Roger Quadros
2013-09-16 8:40 ` Vivek Gautam
2013-09-17 15:45 ` Felipe Balbi
2013-09-02 15:43 ` [PATCH 2/7] usb: dwc3: adapt dwc3 core to use Generic PHY Framework Kishon Vijay Abraham I
2013-09-12 9:27 ` Vivek Gautam
2013-09-12 10:10 ` Kishon Vijay Abraham I
2013-09-12 10:27 ` Vivek Gautam
2013-10-10 10:28 ` Kishon Vijay Abraham I
2013-09-12 13:19 ` Roger Quadros
2013-09-16 2:52 ` Kishon Vijay Abraham I
2013-09-16 7:25 ` Roger Quadros
2013-10-11 15:09 ` Roger Quadros
2013-10-14 9:26 ` Kishon Vijay Abraham I
2013-10-14 10:21 ` Roger Quadros
2013-10-15 5:31 ` Kishon Vijay Abraham I
2013-10-15 7:57 ` Roger Quadros
2013-10-15 12:00 ` Felipe Balbi
2013-10-15 11:58 ` Felipe Balbi
2013-10-15 11:57 ` Felipe Balbi
2013-10-15 12:10 ` Roger Quadros
2013-10-15 13:19 ` Felipe Balbi
2013-10-15 13:48 ` Roger Quadros
2013-10-15 13:56 ` Felipe Balbi
2013-10-15 14:03 ` Roger Quadros
2013-10-15 14:12 ` Felipe Balbi
2013-09-02 15:43 ` [PATCH 3/7] drivers: phy: usb3/pipe3: Adapt pipe3 driver to " Kishon Vijay Abraham I
2013-09-12 11:19 ` Roger Quadros
2013-09-16 3:01 ` Kishon Vijay Abraham I
2013-09-16 7:37 ` Roger Quadros
2013-10-11 15:02 ` Roger Quadros
2013-10-14 9:19 ` Kishon Vijay Abraham I
2013-10-14 9:31 ` Roger Quadros
2013-09-02 15:43 ` [PATCH 4/7] Documentation: dt bindings: move ..usb/usb-phy.txt to ..phy/omap-phy.txt Kishon Vijay Abraham I
2013-09-12 13:23 ` Roger Quadros
2013-09-16 3:04 ` Kishon Vijay Abraham I
2013-09-02 15:43 ` [PATCH 5/7] phy: omap-usb2: move omap_usb.h from linux/usb/ to linux/phy/ Kishon Vijay Abraham I
2013-09-02 15:43 ` [PATCH 6/7] arm/dts: added dt properties to adapt to the new phy framwork Kishon Vijay Abraham I
2013-09-12 13:28 ` Roger Quadros
2013-09-02 15:43 ` [PATCH 7/7] drivers: phy: renamed struct omap_control_usb to struct omap_control_phy Kishon Vijay Abraham I
2013-09-12 13:42 ` Roger Quadros [this message]
2013-09-16 3:06 ` Kishon Vijay Abraham I
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=5231C4C4.1000100@ti.com \
--to=rogerq@ti.com \
--cc=balbi@ti.com \
--cc=bcousson@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=george.cherian@ti.com \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=ian.campbell@citrix.com \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=s.nawrocki@samsung.com \
--cc=swarren@wwwdotorg.org \
--cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).