Skip to contentSkip to conversation

PHY: for 3.18

GIT PULL New Kishon Vijay Abraham I 2 participants 25 messages Sep 24, 2014 – Sep 25, 2014

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

Hi Greg,

Here's the PULL Request for 3.18 merge window.
It includes 3 new PHY drivers adapted to the PHY framework and misc cleanups and fixes.

Let me know if I have to change something.

Cheers
Kishon

The following changes since commit 452b6361c4d9baf6940adb7b1316e0f386c39799:

Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband (2014-09-23 16:47:34 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/phy-for_3.18

for you to fetch changes up to 4f0eb5d7efe375859b15c97f453113a242bf057b:

phy: remove .owner field for drivers using module_platform_driver (2014-09-24 15:18:34 +0530)

----------------------------------------------------------------
Adds 3 new PHY drivers stih407, stih41x and rcar gen2 PHY. It also includes miscellaneous cleanup of other PHY drivers.

----------------------------------------------------------------
Peter Griffin (15):
phy: phy-omap-control: Remove unncessary site specific OOM messages
phy: phy-mvebu-sata: Add missing error check for devm_kzalloc
phy: phy-omap-usb2: Remove unncessary site specific OOM messages
phy: phy-ti-pipe3: Remove unncessary site specific OOM messages
phy: phy-spear1310-miphy: Remove unncessary site specific OOM messages
phy: phy-spear1340-miphy: Remove unncessary site specific OOM messages
phy: phy-spear1310-miphy: Use module_platform_driver to register driver.
phy: phy-spear1340-miphy: Use module_platform_driver to register driver.
phy: phy-stih407-usb: Add usb picoPHY driver found on stih407 SoC family
phy: phy-stih407-usb: Add dt documentation for USB picophy found on stih407 SoC family
MAINTAINERS: Add phy-stih407-usb.c file to ARCH/STI architecture
phy: phy-stih41x-usb: Add usb phy support for STiH41x SoCs.
phy: phy-stih41x-usb: Add dt documentation for USB phy on STiH415/6
MAINTAINERS: Add phy-stih41x-usb.c to ARCH/STI architecture
phy: remove .owner field for drivers using module_platform_driver

Sergei Shtylyov (1):
phy: Renesas R-Car Gen2 PHY driver

Tony Lindgren (5):
usb: phy: twl4030-usb: Remove unused irq_enabled
usb: phy: twl4030-usb: Simplify phy init to use runtime PM
usb: phy: twl4030-usb: Move code from twl4030_phy_power to the runtime PM calls
usb: phy: twl4030-usb: Remove asleep and rely on runtime PM
usb: phy: twl4030-usb: Use mutex instead of spinlock for protecting the data

Vivek Gautam (1):
phy: exynos-dp-video: Use syscon support to control pmu register

 .../devicetree/bindings/phy/phy-stih407-usb.txt    |   30 ++
 .../devicetree/bindings/phy/phy-stih41x-usb.txt    |   24 ++
 .../devicetree/bindings/phy/rcar-gen2-phy.txt      |   51 +++
 .../devicetree/bindings/phy/samsung-phy.txt        |    7 +-
 MAINTAINERS                                        |    2 +
 drivers/phy/Kconfig                                |   24 ++
 drivers/phy/Makefile                               |    3 +
 drivers/phy/phy-bcm-kona-usb2.c                    |    1 -
 drivers/phy/phy-berlin-sata.c                      |    1 -
 drivers/phy/phy-exynos-dp-video.c                  |   80 +++--
 drivers/phy/phy-exynos-mipi-video.c                |    1 -
 drivers/phy/phy-exynos5-usbdrd.c                   |    1 -
 drivers/phy/phy-exynos5250-sata.c                  |    1 -
 drivers/phy/phy-hix5hd2-sata.c                     |    1 -
 drivers/phy/phy-miphy365x.c                        |    1 -
 drivers/phy/phy-mvebu-sata.c                       |    3 +-
 drivers/phy/phy-omap-control.c                     |    5 +-
 drivers/phy/phy-omap-usb2.c                        |    9 +-
 drivers/phy/phy-qcom-apq8064-sata.c                |    1 -
 drivers/phy/phy-qcom-ipq806x-sata.c                |    1 -
 drivers/phy/phy-rcar-gen2.c                        |  341 ++++++++++++++++++++
 drivers/phy/phy-samsung-usb2.c                     |    1 -
 drivers/phy/phy-spear1310-miphy.c                  |   17 +-
 drivers/phy/phy-spear1340-miphy.c                  |   17 +-
 drivers/phy/phy-stih407-usb.c                      |  177 ++++++++++
 drivers/phy/phy-stih41x-usb.c                      |  187 +++++++++++
 drivers/phy/phy-sun4i-usb.c                        |    1 -
 drivers/phy/phy-ti-pipe3.c                         |    6 +-
 drivers/phy/phy-twl4030-usb.c                      |  125 +++----
 drivers/phy/phy-xgene.c                            |    1 -
 30 files changed, 955 insertions(+), 165 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-stih407-usb.txt
 create mode 100644 Documentation/devicetree/bindings/phy/phy-stih41x-usb.txt
 create mode 100644 Documentation/devicetree/bindings/phy/rcar-gen2-phy.txt
 create mode 100644 drivers/phy/phy-rcar-gen2.c
 create mode 100644 drivers/phy/phy-stih407-usb.c
 create mode 100644 drivers/phy/phy-stih41x-usb.c
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/22 phy: Renesas R-Car Gen2 PHY driver

From: Sergei Shtylyov <[email protected]>

This PHY, though formally being a part of Renesas USBHS controller, contains the UGCTRL2 register that controls multiplexing of the USB ports (Renesas calls them channels) to the different USB controllers: channel 0 can be connected to either PCI EHCI/OHCI or USBHS controllers, channel 2 can be connected to PCI EHCI/OHCI or xHCI controllers.

This is a new driver for this USB PHY currently already supported under drivers/ usb/phy/. The reason for writing the new driver was the requirement that the multiplexing of USB channels to the controller be dynamic, depending on what USB drivers are loaded, rather than static as provided by the old driver. The infrastructure provided by drivers/phy/phy-core.c seems to fit that purpose ideally. The new driver only supports device tree probing for now.

---
 .../devicetree/bindings/phy/rcar-gen2-phy.txt      |   51 +++
 drivers/phy/Kconfig                                |    7 +
 drivers/phy/Makefile                               |    1 +
 drivers/phy/phy-rcar-gen2.c                        |  341 ++++++++++++++++++++
 4 files changed, 400 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/rcar-gen2-phy.txt
 create mode 100644 drivers/phy/phy-rcar-gen2.c
Documentation/devicetree/bindings/phy/rcar-gen2-phy.txt new file +51 -0
new file mode 100644
index 0000000..00fc52a
@@ -0,0 +1,51 @@
+* Renesas R-Car generation 2 USB PHY
+
+This file provides information on what the device node for the R-Car generation
+2 USB PHY contains.
+
+Required properties:
+- compatible: "renesas,usb-phy-r8a7790" if the device is a part of R8A7790 SoC.
+	      "renesas,usb-phy-r8a7791" if the device is a part of R8A7791 SoC.
+- reg: offset and length of the register block.
+- #address-cells: number of address cells for the USB channel subnodes, must
+		  be <1>.
+- #size-cells: number of size cells for the USB channel subnodes, must be <0>.
+- clocks: clock phandle and specifier pair.
+- clock-names: string, clock input name, must be "usbhs".
+
+The USB PHY device tree node should have the subnodes corresponding to the USB
+channels. These subnodes must contain the following properties:
+- reg: the USB controller selector; see the table below for the values.
+- #phy-cells: see phy-bindings.txt in the same directory, must be <1>.
+
+The phandle's argument in the PHY specifier is the USB controller selector for
+the USB channel; see the selector meanings below:
+
++-----------+---------------+---------------+
+|\ Selector |               |               |
++ --------- +       0       |       1       |
+| Channel  \|               |               |
++-----------+---------------+---------------+
+| 0         | PCI EHCI/OHCI | HS-USB        |
+| 2         | PCI EHCI/OHCI | xHCI          |
++-----------+---------------+---------------+
+
+Example (Lager board):
+
+	usb-phy@e6590100 {
+		compatible = "renesas,usb-phy-r8a7790";
+		reg = <0 0xe6590100 0 0x100>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		clocks = <&mstp7_clks R8A7790_CLK_HSUSB>;
+		clock-names = "usbhs";
+
+		usb-channel@0 {
+			reg = <0>;
+			#phy-cells = <1>;
+		};
+		usb-channel@2 {
+			reg = <2>;
+			#phy-cells = <1>;
+		};
+	};
drivers/phy/Kconfig +7 -0
index f833aa2..1802fa7 100644
@@ -48,6 +48,13 @@ config PHY_MIPHY365X
 	  Enable this to support the miphy transceiver (for SATA/PCIE)
 	  that is part of STMicroelectronics STiH41x SoC series.
 
+config PHY_RCAR_GEN2
+	tristate "Renesas R-Car generation 2 USB PHY driver"
+	depends on ARCH_SHMOBILE
+	depends on GENERIC_PHY
+	help
+	  Support for USB PHY found on Renesas R-Car generation 2 SoCs.
+
 config OMAP_CONTROL_PHY
 	tristate "OMAP CONTROL PHY Driver"
 	depends on ARCH_OMAP2PLUS || COMPILE_TEST
drivers/phy/Makefile +1 -0
index 95c69ed..8ac9df5 100644
@@ -9,6 +9,7 @@ obj-$(CONFIG_PHY_EXYNOS_DP_VIDEO)	+= phy-exynos-dp-video.o
 obj-$(CONFIG_PHY_EXYNOS_MIPI_VIDEO)	+= phy-exynos-mipi-video.o
 obj-$(CONFIG_PHY_MVEBU_SATA)		+= phy-mvebu-sata.o
 obj-$(CONFIG_PHY_MIPHY365X)		+= phy-miphy365x.o
+obj-$(CONFIG_PHY_RCAR_GEN2)		+= phy-rcar-gen2.o
 obj-$(CONFIG_OMAP_CONTROL_PHY)		+= phy-omap-control.o
 obj-$(CONFIG_OMAP_USB2)			+= phy-omap-usb2.o
 obj-$(CONFIG_TI_PIPE3)			+= phy-ti-pipe3.o
drivers/phy/phy-rcar-gen2.c new file +341 -0

341 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/22 phy: phy-omap-control: Remove unncessary site specific OOM messages

In reply to Kishon Vijay Abraham I

From: Peter Griffin <[email protected]>

The site specific OOM messages are unncessary, because they duplicate messages from the memory subsystem which include dump_stack().

Removing these superflous messages makes the kernel smaller. A discussion here http://patchwork.ozlabs.org/patch/324158/ found that all error paths from kzalloc will print a error message, and that any error path which maybe found which doesn't would be considered a bug in kzalloc.

---
 drivers/phy/phy-omap-control.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/phy/phy-omap-control.c +1 -3
index 9487bf1..cb2f4d1 100644
@@ -295,10 +295,8 @@ static int omap_control_phy_probe(struct platform_device *pdev)
 
 	control_phy = devm_kzalloc(&pdev->dev, sizeof(*control_phy),
 		GFP_KERNEL);
-	if (!control_phy) {
-		dev_err(&pdev->dev, "unable to alloc memory for control phy\n");
+	if (!control_phy)
 		return -ENOMEM;
-	}
 
 	control_phy->dev = &pdev->dev;
 	control_phy->type = *(enum omap_control_phy_type *)of_id->data;
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 3/22 phy: phy-mvebu-sata: Add missing error check for devm_kzalloc

In reply to Kishon Vijay Abraham I

From: Peter Griffin <[email protected]>

Currently this driver is missing a check on the return value of devm_kzalloc, which would cause a NULL pointer dereference in a OOM situation.

This patch adds the aformentioned missing check.

---
 drivers/phy/phy-mvebu-sata.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/phy/phy-mvebu-sata.c +2 -0
index cc3c0e1..10bb8e5 100644
@@ -89,6 +89,8 @@ static int phy_mvebu_sata_probe(struct platform_device *pdev)
 	struct phy *phy;
 
 	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
+	if (!priv)
+		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	priv->base = devm_ioremap_resource(&pdev->dev, res);
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH 4/22 phy: phy-omap-usb2: Remove unncessary site specific OOM messages

In reply to Kishon Vijay Abraham I

From: Peter Griffin <[email protected]>

The site specific OOM messages are unncessary, because they duplicate messages from the memory subsystem which include dump_stack().

Removing these superflous messages makes the kernel smaller. A discussion here http://patchwork.ozlabs.org/patch/324158/ found that all error paths from kzalloc will print a error message, and that any error path which maybe found which doesn't would be considered a bug in kzalloc.

---
 drivers/phy/phy-omap-usb2.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/phy/phy-omap-usb2.c +2 -6
index 93d7835..51c6f92 100644
@@ -212,16 +212,12 @@ static int omap_usb2_probe(struct platform_device *pdev)
 	phy_data = (struct usb_phy_data *)of_id->data;
 
 	phy = devm_kzalloc(&pdev->dev, sizeof(*phy), GFP_KERNEL);
-	if (!phy) {
-		dev_err(&pdev->dev, "unable to allocate memory for USB2 PHY\n");
+	if (!phy)
 		return -ENOMEM;
-	}
 
 	otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL);
-	if (!otg) {
-		dev_err(&pdev->dev, "unable to allocate memory for USB OTG\n");
+	if (!otg)
 		return -ENOMEM;
-	}
 
 	phy->dev		= &pdev->dev;
 
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH 5/22 phy: phy-ti-pipe3: Remove unncessary site specific OOM messages

In reply to Kishon Vijay Abraham I

From: Peter Griffin <[email protected]>

The site specific OOM messages are unncessary, because they duplicate messages from the memory subsystem which include dump_stack().

Removing these superflous messages makes the kernel smaller. A discussion here http://patchwork.ozlabs.org/patch/324158/ found that all error paths from kzalloc will print a error message, and that any error path which maybe found which doesn't would be considered a bug in kzalloc.

---
 drivers/phy/phy-ti-pipe3.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/phy/phy-ti-pipe3.c +2 -3
index b964aa9..9280ef8 100644
@@ -299,10 +299,9 @@ static int ti_pipe3_probe(struct platform_device *pdev)
 	struct clk *clk;
 
 	phy = devm_kzalloc(&pdev->dev, sizeof(*phy), GFP_KERNEL);
-	if (!phy) {
-		dev_err(&pdev->dev, "unable to alloc mem for TI PIPE3 PHY\n");
+	if (!phy)
 		return -ENOMEM;
-	}
+
 	phy->dev		= &pdev->dev;
 
 	if (!of_device_is_compatible(node, "ti,phy-pipe3-pcie")) {
Signature · 1 line
1.7.9.5
#6 lore raw

PATCH 6/22 phy: phy-spear1310-miphy: Remove unncessary site specific OOM messages

In reply to Kishon Vijay Abraham I

From: Peter Griffin <[email protected]>

The site specific OOM messages are unncessary, because they duplicate messages from the memory subsystem which include dump_stack().

Removing these superflous messages makes the kernel smaller. A discussion here http://patchwork.ozlabs.org/patch/324158/ found that all error paths from kzalloc will print a error message, and that any error path which maybe found which doesn't would be considered a bug in kzalloc.

---
 drivers/phy/phy-spear1310-miphy.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/phy/phy-spear1310-miphy.c +1 -3
index 6dcbfcd..911d25b 100644
@@ -212,10 +212,8 @@ static int spear1310_miphy_probe(struct platform_device *pdev)
 	struct phy_provider *phy_provider;
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
-	if (!priv) {
-		dev_err(dev, "can't alloc spear1310_miphy private date memory\n");
+	if (!priv)
 		return -ENOMEM;
-	}
 
 	priv->misc =
 		syscon_regmap_lookup_by_phandle(dev->of_node, "misc");
Signature · 1 line
1.7.9.5
#7 lore raw

PATCH 7/22 phy: phy-spear1340-miphy: Remove unncessary site specific OOM messages

In reply to Kishon Vijay Abraham I

From: Peter Griffin <[email protected]>

The site specific OOM messages are unncessary, because they duplicate messages from the memory subsystem which include dump_stack().

Removing these superflous messages makes the kernel smaller. A discussion here http://patchwork.ozlabs.org/patch/324158/ found that all error paths from kzalloc will print a error message, and that any error path which maybe found which doesn't would be considered a bug in kzalloc.

---
 drivers/phy/phy-spear1340-miphy.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/phy/phy-spear1340-miphy.c +1 -3
index 7135ba2..ee4d66f 100644
@@ -249,10 +249,8 @@ static int spear1340_miphy_probe(struct platform_device *pdev)
 	struct phy_provider *phy_provider;
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
-	if (!priv) {
-		dev_err(dev, "can't alloc spear1340_miphy private date memory\n");
+	if (!priv)
 		return -ENOMEM;
-	}
 
 	priv->misc =
 		syscon_regmap_lookup_by_phandle(dev->of_node, "misc");
Signature · 1 line
1.7.9.5
#8 lore raw

PATCH 8/22 phy: phy-spear1310-miphy: Use module_platform_driver to register driver.

In reply to Kishon Vijay Abraham I

From: Peter Griffin <[email protected]>

Use the module_platform_driver macro to register the driver as this gets rid of a lot of the boilerplate code.

Also remove .owner field as this gets overridden in __platform_driver_register.

---
 drivers/phy/phy-spear1310-miphy.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/phy/phy-spear1310-miphy.c +1 -12
index 911d25b..5f4c586 100644
@@ -250,22 +250,11 @@ static struct platform_driver spear1310_miphy_driver = {
 	.probe		= spear1310_miphy_probe,
 	.driver = {
 		.name = "spear1310-miphy",
-		.owner = THIS_MODULE,
 		.of_match_table = of_match_ptr(spear1310_miphy_of_match),
 	},
 };
 
-static int __init spear1310_miphy_phy_init(void)
-{
-	return platform_driver_register(&spear1310_miphy_driver);
-}
-module_init(spear1310_miphy_phy_init);
-
-static void __exit spear1310_miphy_phy_exit(void)
-{
-	platform_driver_unregister(&spear1310_miphy_driver);
-}
-module_exit(spear1310_miphy_phy_exit);
+module_platform_driver(spear1310_miphy_driver);
 
 MODULE_DESCRIPTION("ST SPEAR1310-MIPHY driver");
 MODULE_AUTHOR("Pratyush Anand <[email protected]>");
Signature · 1 line
1.7.9.5
#9 lore raw

PATCH 9/22 phy: phy-spear1340-miphy: Use module_platform_driver to register driver.

In reply to Kishon Vijay Abraham I

From: Peter Griffin <[email protected]>

Using the module_platform_driver macro to register the driver as this gets rid of a lot of the boilerplate code.

Also remove .owner field as this gets overridden in __platform_driver_register.

---
 drivers/phy/phy-spear1340-miphy.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/phy/phy-spear1340-miphy.c +1 -12
index ee4d66f..1ecd094 100644
@@ -282,23 +282,12 @@ static struct platform_driver spear1340_miphy_driver = {
 	.probe		= spear1340_miphy_probe,
 	.driver = {
 		.name = "spear1340-miphy",
-		.owner = THIS_MODULE,
 		.pm = &spear1340_miphy_pm_ops,
 		.of_match_table = of_match_ptr(spear1340_miphy_of_match),
 	},
 };
 
-static int __init spear1340_miphy_phy_init(void)
-{
-	return platform_driver_register(&spear1340_miphy_driver);
-}
-module_init(spear1340_miphy_phy_init);
-
-static void __exit spear1340_miphy_phy_exit(void)
-{
-	platform_driver_unregister(&spear1340_miphy_driver);
-}
-module_exit(spear1340_miphy_phy_exit);
+module_platform_driver(spear1340_miphy_driver);
 
 MODULE_DESCRIPTION("ST SPEAR1340-MIPHY driver");
 MODULE_AUTHOR("Pratyush Anand <[email protected]>");
Signature · 1 line
1.7.9.5
#10 lore raw

PATCH 10/22 usb: phy: twl4030-usb: Remove unused irq_enabled

In reply to Kishon Vijay Abraham I

From: Tony Lindgren <[email protected]>

It's not being used any longer.

---
 drivers/phy/phy-twl4030-usb.c |    2 --
 1 file changed, 2 deletions(-)
drivers/phy/phy-twl4030-usb.c +0 -2
index 9cd33a4..bc28ecc 100644
@@ -164,7 +164,6 @@ struct twl4030_usb {
 	enum omap_musb_vbus_id_status linkstat;
 	bool			vbus_supplied;
 	u8			asleep;
-	bool			irq_enabled;
 
 	struct delayed_work	id_workaround_work;
 };
@@ -755,7 +754,6 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 	 * set_host() and/or set_peripheral() ... OTG_capable boards
 	 * need both handles, otherwise just one suffices.
 	 */
-	twl->irq_enabled = true;
 	status = devm_request_threaded_irq(twl->dev, twl->irq, NULL,
 			twl4030_usb_irq, IRQF_TRIGGER_FALLING |
 			IRQF_TRIGGER_RISING | IRQF_ONESHOT, "twl4030_usb", twl);
Signature · 1 line
1.7.9.5
#11 lore raw

PATCH 11/22 usb: phy: twl4030-usb: Simplify phy init to use runtime PM

In reply to Kishon Vijay Abraham I

From: Tony Lindgren <[email protected]>

We can now let the interrupt and delayed work do all that's needed with runtime PM.

---
 drivers/phy/phy-twl4030-usb.c |   20 +++-----------------
 1 file changed, 3 insertions(+), 17 deletions(-)
drivers/phy/phy-twl4030-usb.c +3 -17
index bc28ecc..a292db0 100644
@@ -471,16 +471,8 @@ static int twl4030_phy_power_on(struct phy *phy)
 	twl4030_usb_set_mode(twl, twl->usb_mode);
 	if (twl->usb_mode == T2_USB_MODE_ULPI)
 		twl4030_i2c_access(twl, 0);
+	schedule_delayed_work(&twl->id_workaround_work, 0);
 
-	/*
-	 * XXX When VBUS gets driven after musb goes to A mode,
-	 * ID_PRES related interrupts no longer arrive, why?
-	 * Register itself is updated fine though, so we must poll.
-	 */
-	if (twl->linkstat == OMAP_MUSB_ID_GROUND) {
-		cancel_delayed_work(&twl->id_workaround_work);
-		schedule_delayed_work(&twl->id_workaround_work, HZ);
-	}
 	return 0;
 }
 
@@ -612,16 +604,9 @@ static void twl4030_id_workaround_work(struct work_struct *work)
 static int twl4030_phy_init(struct phy *phy)
 {
 	struct twl4030_usb *twl = phy_get_drvdata(phy);
-	enum omap_musb_vbus_id_status status;
 
 	pm_runtime_get_sync(twl->dev);
-	status = twl4030_usb_linkstat(twl);
-	twl->linkstat = status;
-
-	if (status == OMAP_MUSB_ID_GROUND || status == OMAP_MUSB_VBUS_VALID)
-		omap_musb_mailbox(twl->linkstat);
-
-	sysfs_notify(&twl->dev->kobj, NULL, "vbus");
+	schedule_delayed_work(&twl->id_workaround_work, 0);
 	pm_runtime_mark_last_busy(twl->dev);
 	pm_runtime_put_autosuspend(twl->dev);
 
@@ -698,6 +683,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 	twl->dev		= &pdev->dev;
 	twl->irq		= platform_get_irq(pdev, 0);
 	twl->vbus_supplied	= false;
+	twl->linkstat		= -EINVAL;
 	twl->asleep		= 1;
 	twl->linkstat		= OMAP_MUSB_UNKNOWN;
 
Signature · 1 line
1.7.9.5
#12 lore raw

PATCH 12/22 usb: phy: twl4030-usb: Move code from twl4030_phy_power to the runtime PM calls

In reply to Kishon Vijay Abraham I

From: Tony Lindgren <[email protected]>

We don't need twl4030_phy_power() any longer now that we have the runtime PM calls. Let's get rid of it as it's confusing. No functional changes, just move the code and use res instead of ret as we are not returning that value.

---
 drivers/phy/phy-twl4030-usb.c |   72 ++++++++++++++++++-----------------------
 1 file changed, 31 insertions(+), 41 deletions(-)
drivers/phy/phy-twl4030-usb.c +31 -41
index a292db0..519cc90 100644
@@ -383,45 +383,6 @@ static void __twl4030_phy_power(struct twl4030_usb *twl, int on)
 	WARN_ON(twl4030_usb_write_verify(twl, PHY_PWR_CTRL, pwr) < 0);
 }
 
-static void twl4030_phy_power(struct twl4030_usb *twl, int on)
-{
-	int ret;
-
-	if (on) {
-		ret = regulator_enable(twl->usb3v1);
-		if (ret)
-			dev_err(twl->dev, "Failed to enable usb3v1\n");
-
-		ret = regulator_enable(twl->usb1v8);
-		if (ret)
-			dev_err(twl->dev, "Failed to enable usb1v8\n");
-
-		/*
-		 * Disabling usb3v1 regulator (= writing 0 to VUSB3V1_DEV_GRP
-		 * in twl4030) resets the VUSB_DEDICATED2 register. This reset
-		 * enables VUSB3V1_SLEEP bit that remaps usb3v1 ACTIVE state to
-		 * SLEEP. We work around this by clearing the bit after usv3v1
-		 * is re-activated. This ensures that VUSB3V1 is really active.
-		 */
-		twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, 0, VUSB_DEDICATED2);
-
-		ret = regulator_enable(twl->usb1v5);
-		if (ret)
-			dev_err(twl->dev, "Failed to enable usb1v5\n");
-
-		__twl4030_phy_power(twl, 1);
-		twl4030_usb_write(twl, PHY_CLK_CTRL,
-				  twl4030_usb_read(twl, PHY_CLK_CTRL) |
-					(PHY_CLK_CTRL_CLOCKGATING_EN |
-						PHY_CLK_CTRL_CLK32K_EN));
-	} else {
-		__twl4030_phy_power(twl, 0);
-		regulator_disable(twl->usb1v5);
-		regulator_disable(twl->usb1v8);
-		regulator_disable(twl->usb3v1);
-	}
-}
-
 static int twl4030_usb_runtime_suspend(struct device *dev)
 {
 	struct twl4030_usb *twl = dev_get_drvdata(dev);
@@ -430,7 +391,10 @@ static int twl4030_usb_runtime_suspend(struct device *dev)
 	if (twl->asleep)
 		return 0;
 
-	twl4030_phy_power(twl, 0);
+	__twl4030_phy_power(twl, 0);
+	regulator_disable(twl->usb1v5);
+	regulator_disable(twl->usb1v8);
+	regulator_disable(twl->usb3v1);
 	twl->asleep = 1;
 
 	return 0;
@@ -439,12 +403,38 @@ static int twl4030_usb_runtime_suspend(struct device *dev)
 static int twl4030_usb_runtime_resume(struct device *dev)
 {
 	struct twl4030_usb *twl = dev_get_drvdata(dev);
+	int res;
 
 	dev_dbg(twl->dev, "%s\n", __func__);
 	if (!twl->asleep)
 		return 0;
 
-	twl4030_phy_power(twl, 1);
+	res = regulator_enable(twl->usb3v1);
+	if (res)
+		dev_err(twl->dev, "Failed to enable usb3v1\n");
+
+	res = regulator_enable(twl->usb1v8);
+	if (res)
+		dev_err(twl->dev, "Failed to enable usb1v8\n");
+
+	/*
+	 * Disabling usb3v1 regulator (= writing 0 to VUSB3V1_DEV_GRP
+	 * in twl4030) resets the VUSB_DEDICATED2 register. This reset
+	 * enables VUSB3V1_SLEEP bit that remaps usb3v1 ACTIVE state to
+	 * SLEEP. We work around this by clearing the bit after usv3v1
+	 * is re-activated. This ensures that VUSB3V1 is really active.
+	 */
+	twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, 0, VUSB_DEDICATED2);
+
+	res = regulator_enable(twl->usb1v5);
+	if (res)
+		dev_err(twl->dev, "Failed to enable usb1v5\n");
+
+	__twl4030_phy_power(twl, 1);
+	twl4030_usb_write(twl, PHY_CLK_CTRL,
+			  twl4030_usb_read(twl, PHY_CLK_CTRL) |
+			  (PHY_CLK_CTRL_CLOCKGATING_EN |
+			   PHY_CLK_CTRL_CLK32K_EN));
 	twl->asleep = 0;
 
 	return 0;
Signature · 1 line
1.7.9.5
#13 lore raw

PATCH 13/22 usb: phy: twl4030-usb: Remove asleep and rely on runtime PM

In reply to Kishon Vijay Abraham I

From: Tony Lindgren <[email protected]>

There's no longer need for tracking the phy state in the driver with asleep, we can now rely on runtime PM.

---
 drivers/phy/phy-twl4030-usb.c |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
drivers/phy/phy-twl4030-usb.c +5 -9
index 519cc90..24ff3c6 100644
@@ -163,7 +163,6 @@ struct twl4030_usb {
 	int			irq;
 	enum omap_musb_vbus_id_status linkstat;
 	bool			vbus_supplied;
-	u8			asleep;
 
 	struct delayed_work	id_workaround_work;
 };
@@ -388,14 +387,13 @@ static int twl4030_usb_runtime_suspend(struct device *dev)
 	struct twl4030_usb *twl = dev_get_drvdata(dev);
 
 	dev_dbg(twl->dev, "%s\n", __func__);
-	if (twl->asleep)
+	if (pm_runtime_suspended(dev))
 		return 0;
 
 	__twl4030_phy_power(twl, 0);
 	regulator_disable(twl->usb1v5);
 	regulator_disable(twl->usb1v8);
 	regulator_disable(twl->usb3v1);
-	twl->asleep = 1;
 
 	return 0;
 }
@@ -406,7 +404,7 @@ static int twl4030_usb_runtime_resume(struct device *dev)
 	int res;
 
 	dev_dbg(twl->dev, "%s\n", __func__);
-	if (!twl->asleep)
+	if (pm_runtime_active(dev))
 		return 0;
 
 	res = regulator_enable(twl->usb3v1);
@@ -435,7 +433,6 @@ static int twl4030_usb_runtime_resume(struct device *dev)
 			  twl4030_usb_read(twl, PHY_CLK_CTRL) |
 			  (PHY_CLK_CTRL_CLOCKGATING_EN |
 			   PHY_CLK_CTRL_CLK32K_EN));
-	twl->asleep = 0;
 
 	return 0;
 }
@@ -560,10 +557,10 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
 		 */
 		if ((status == OMAP_MUSB_VBUS_VALID) ||
 		    (status == OMAP_MUSB_ID_GROUND)) {
-			if (twl->asleep)
+			if (pm_runtime_suspended(twl->dev))
 				pm_runtime_get_sync(twl->dev);
 		} else {
-			if (!twl->asleep) {
+			if (pm_runtime_active(twl->dev)) {
 				pm_runtime_mark_last_busy(twl->dev);
 				pm_runtime_put_autosuspend(twl->dev);
 			}
@@ -572,7 +569,7 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
 	}
 
 	/* don't schedule during sleep - irq works right then */
-	if (status == OMAP_MUSB_ID_GROUND && !twl->asleep) {
+	if (status == OMAP_MUSB_ID_GROUND && pm_runtime_active(twl->dev)) {
 		cancel_delayed_work(&twl->id_workaround_work);
 		schedule_delayed_work(&twl->id_workaround_work, HZ);
 	}
@@ -674,7 +671,6 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 	twl->irq		= platform_get_irq(pdev, 0);
 	twl->vbus_supplied	= false;
 	twl->linkstat		= -EINVAL;
-	twl->asleep		= 1;
 	twl->linkstat		= OMAP_MUSB_UNKNOWN;
 
 	twl->phy.dev		= twl->dev;
Signature · 1 line
1.7.9.5
#14 lore raw

PATCH 14/22 usb: phy: twl4030-usb: Use mutex instead of spinlock for protecting the data

In reply to Kishon Vijay Abraham I

From: Tony Lindgren <[email protected]>

We're using threaded irq on a I2C bus and we're sleeping in twl4030_usb_irq() as it calls twl4030_usb_linkstat() which calls the i2c functions. If we ever need to lock for longer I2C transaction sequences a mutex will allow us to do that easily.

---
 drivers/phy/phy-twl4030-usb.c |   16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
drivers/phy/phy-twl4030-usb.c +7 -9
index 24ff3c6..1e0e2d1 100644
@@ -28,7 +28,6 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
-#include <linux/spinlock.h>
 #include <linux/workqueue.h>
 #include <linux/io.h>
 #include <linux/delay.h>
@@ -155,7 +154,7 @@ struct twl4030_usb {
 	struct regulator	*usb3v1;
 
 	/* for vbus reporting with irqs disabled */
-	spinlock_t		lock;
+	struct mutex		lock;
 
 	/* pin configuration */
 	enum twl4030_usb_mode	usb_mode;
@@ -516,13 +515,12 @@ static ssize_t twl4030_usb_vbus_show(struct device *dev,
 		struct device_attribute *attr, char *buf)
 {
 	struct twl4030_usb *twl = dev_get_drvdata(dev);
-	unsigned long flags;
 	int ret = -EINVAL;
 
-	spin_lock_irqsave(&twl->lock, flags);
+	mutex_lock(&twl->lock);
 	ret = sprintf(buf, "%s\n",
 			twl->vbus_supplied ? "on" : "off");
-	spin_unlock_irqrestore(&twl->lock, flags);
+	mutex_unlock(&twl->lock);
 
 	return ret;
 }
@@ -536,12 +534,12 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
 
 	status = twl4030_usb_linkstat(twl);
 
-	spin_lock_irq(&twl->lock);
+	mutex_lock(&twl->lock);
 	if (status >= 0 && status != twl->linkstat) {
 		twl->linkstat = status;
 		status_changed = true;
 	}
-	spin_unlock_irq(&twl->lock);
+	mutex_unlock(&twl->lock);
 
 	if (status_changed) {
 		/* FIXME add a set_power() method so that B-devices can
@@ -695,8 +693,8 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 	if (IS_ERR(phy_provider))
 		return PTR_ERR(phy_provider);
 
-	/* init spinlock for workqueue */
-	spin_lock_init(&twl->lock);
+	/* init mutex for workqueue */
+	mutex_init(&twl->lock);
 
 	INIT_DELAYED_WORK(&twl->id_workaround_work, twl4030_id_workaround_work);
 
Signature · 1 line
1.7.9.5
#15 lore raw

PATCH 15/22 phy: phy-stih407-usb: Add usb picoPHY driver found on stih407 SoC family

In reply to Kishon Vijay Abraham I

From: Peter Griffin <[email protected]>

This is the generic phy driver for the picoPHY ports used by the USB2 and USB3 Host controllers when controlling usb2/1.1 devices. It is found on STiH407 SoC family from STMicroelectronics.

---
 drivers/phy/Kconfig           |    9 +++
 drivers/phy/Makefile          |    1 +
 drivers/phy/phy-stih407-usb.c |  177 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 187 insertions(+)
 create mode 100644 drivers/phy/phy-stih407-usb.c
drivers/phy/Kconfig +9 -0
index 1802fa7..11c66d7 100644
@@ -239,4 +239,13 @@ config PHY_XGENE
 	help
 	  This option enables support for APM X-Gene SoC multi-purpose PHY.
 
+config PHY_STIH407_USB
+	tristate "STMicroelectronics USB2 picoPHY driver for STiH407 family"
+	depends on RESET_CONTROLLER
+	depends on ARCH_STI || COMPILE_TEST
+	select GENERIC_PHY
+	help
+	  Enable this support to enable the picoPHY device used by USB2
+	  and USB3 controllers on STMicroelectronics STiH407 SoC families.
+
 endmenu
drivers/phy/Makefile +1 -0
index 8ac9df5..a8d1e11 100644
@@ -29,3 +29,4 @@ obj-$(CONFIG_PHY_QCOM_IPQ806X_SATA)	+= phy-qcom-ipq806x-sata.o
 obj-$(CONFIG_PHY_ST_SPEAR1310_MIPHY)	+= phy-spear1310-miphy.o
 obj-$(CONFIG_PHY_ST_SPEAR1340_MIPHY)	+= phy-spear1340-miphy.o
 obj-$(CONFIG_PHY_XGENE)			+= phy-xgene.o
+obj-$(CONFIG_PHY_STIH407_USB)		+= phy-stih407-usb.o
drivers/phy/phy-stih407-usb.c new file +177 -0

177 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#16 lore raw

PATCH 16/22 phy: phy-stih407-usb: Add dt documentation for USB picophy found on stih407 SoC family

In reply to Kishon Vijay Abraham I

From: Peter Griffin <[email protected]>

This patch adds the dt documentation for the usb picophy found on stih407 SoC family available from STMicroelectronics.

---
 .../devicetree/bindings/phy/phy-stih407-usb.txt    |   30 ++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-stih407-usb.txt
Documentation/devicetree/bindings/phy/phy-stih407-usb.txt new file +30 -0
new file mode 100644
index 0000000..1ef8228
@@ -0,0 +1,30 @@
+ST STiH407 USB PHY controller
+
+This file documents the dt bindings for the usb picoPHY driver which is the PHY for both USB2 and USB3
+host controllers (when controlling usb2/1.1 devices) available on STiH407 SoC family from STMicroelectronics.
+
+Required properties:
+- compatible		: should be "st,stih407-usb2-phy"
+- reg			: contain the offset and length of the system configuration registers
+			  used as glue logic to control & parameter phy
+- reg-names		: the names of the system configuration registers in "reg", should be "param" and "reg"
+- st,syscfg		: sysconfig register to manage phy parameter at driver level
+- resets		: list of phandle and reset specifier pairs. There should be two entries, one
+			  for the whole phy and one for the port
+- reset-names		: list of reset signal names. Should be "global" and "port"
+See: Documentation/devicetree/bindings/reset/st,sti-powerdown.txt
+See: Documentation/devicetree/bindings/reset/reset.txt
+
+Example:
+
+usb2_picophy0: usbpicophy@f8 {
+	compatible	= "st,stih407-usb2-phy";
+	reg		= <0xf8 0x04>,	/* syscfg 5062 */
+			  <0xf4 0x04>;	/* syscfg 5061 */
+	reg-names	= "param", "ctrl";
+	#phy-cells	= <0>;
+	st,syscfg	= <&syscfg_core>;
+	resets		= <&softreset STIH407_PICOPHY_SOFTRESET>,
+			  <&picophyreset STIH407_PICOPHY0_RESET>;
+	reset-names	= "global", "port";
+};
Signature · 1 line
1.7.9.5
#17 lore raw

PATCH 17/22 MAINTAINERS: Add phy-stih407-usb.c file to ARCH/STI architecture

In reply to Kishon Vijay Abraham I

From: Peter Griffin <[email protected]>

This patch adds the new phy-stih407-usb.c usb phy driver found on STMicroelectronics stih407 consumer electronics SoC's into the STI arch section of the maintainers file.

---
 MAINTAINERS |    1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index 670b3dc..93fd8af 100644
@@ -1398,6 +1398,7 @@ F:	drivers/media/rc/st_rc.c
 F:	drivers/i2c/busses/i2c-st.c
 F:	drivers/tty/serial/st-asc.c
 F:	drivers/mmc/host/sdhci-st.c
+F:	drivers/phy/phy-stih407-usb.c
 
 ARM/TECHNOLOGIC SYSTEMS TS7250 MACHINE SUPPORT
 M:	Lennert Buytenhek <[email protected]>
Signature · 1 line
1.7.9.5
#18 lore raw

PATCH 18/22 phy: phy-stih41x-usb: Add usb phy support for STiH41x SoCs.

In reply to Kishon Vijay Abraham I

From: Peter Griffin <[email protected]>

This driver adds support for USB (1.1 and 2.0) phy for STiH415 and STiH416 System-On-Chips from STMicroelectronics.

---
 drivers/phy/Kconfig           |    8 ++
 drivers/phy/Makefile          |    1 +
 drivers/phy/phy-stih41x-usb.c |  187 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 196 insertions(+)
 create mode 100644 drivers/phy/phy-stih41x-usb.c
drivers/phy/Kconfig +8 -0
index 11c66d7..2a436e6 100644
@@ -248,4 +248,12 @@ config PHY_STIH407_USB
 	  Enable this support to enable the picoPHY device used by USB2
 	  and USB3 controllers on STMicroelectronics STiH407 SoC families.
 
+config PHY_STIH41X_USB
+	tristate "STMicroelectronics USB2 PHY driver for STiH41x series"
+	depends on ARCH_STI
+	select GENERIC_PHY
+	help
+	  Enable this to support the USB transceiver that is part of
+	  STMicroelectronics STiH41x SoC series.
+
 endmenu
drivers/phy/Makefile +1 -0
index a8d1e11..c4590fc 100644
@@ -30,3 +30,4 @@ obj-$(CONFIG_PHY_ST_SPEAR1310_MIPHY)	+= phy-spear1310-miphy.o
 obj-$(CONFIG_PHY_ST_SPEAR1340_MIPHY)	+= phy-spear1340-miphy.o
 obj-$(CONFIG_PHY_XGENE)			+= phy-xgene.o
 obj-$(CONFIG_PHY_STIH407_USB)		+= phy-stih407-usb.o
+obj-$(CONFIG_PHY_STIH41X_USB)		+= phy-stih41x-usb.o
drivers/phy/phy-stih41x-usb.c new file +187 -0

187 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#19 lore raw

PATCH 19/22 phy: phy-stih41x-usb: Add dt documentation for USB phy on STiH415/6

In reply to Kishon Vijay Abraham I

From: Peter Griffin <[email protected]>

This patch adds dt documentation bindings for the usb phy found on STiH415/5 SoC's from STMicroelectronics, which support USB 1.1 and 2.0.

---
 .../devicetree/bindings/phy/phy-stih41x-usb.txt    |   24 ++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-stih41x-usb.txt
Documentation/devicetree/bindings/phy/phy-stih41x-usb.txt new file +24 -0
new file mode 100644
index 0000000..00944a0
@@ -0,0 +1,24 @@
+STMicroelectronics STiH41x USB PHY binding
+------------------------------------------
+
+This file contains documentation for the usb phy found in STiH415/6 SoCs from
+STMicroelectronics.
+
+Required properties:
+- compatible	: should be "st,stih416-usb-phy" or "st,stih415-usb-phy"
+- st,syscfg	: should be a phandle of the syscfg node
+- clock-names	: must contain "osc_phy"
+- clocks	: must contain an entry for each name in clock-names.
+See: Documentation/devicetree/bindings/clock/clock-bindings.txt
+- #phy-cells	: must be 0 for this phy
+See: Documentation/devicetree/bindings/phy/phy-bindings.txt
+
+Example:
+
+usb2_phy: usb2phy@0 {
+	compatible	= "st,stih416-usb-phy";
+	#phy-cell	= <0>;
+	st,syscfg	= <&syscfg_rear>;
+	clocks		= <&clk_sysin>;
+	clock-names	= "osc_phy";
+};
Signature · 1 line
1.7.9.5
#20 lore raw

PATCH 20/22 MAINTAINERS: Add phy-stih41x-usb.c to ARCH/STI architecture

In reply to Kishon Vijay Abraham I

From: Peter Griffin <[email protected]>

This patch adds the new phy-sti41x-usb.c PHY driver found on STMicroelectronics stih41x consumer electronics SoC's into the STI arch section of the maintainers file.

---
 MAINTAINERS |    1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index 93fd8af..a5cdbe9 100644
@@ -1399,6 +1399,7 @@ F:	drivers/i2c/busses/i2c-st.c
 F:	drivers/tty/serial/st-asc.c
 F:	drivers/mmc/host/sdhci-st.c
 F:	drivers/phy/phy-stih407-usb.c
+F:	drivers/phy/phy-stih41x-usb.c
 
 ARM/TECHNOLOGIC SYSTEMS TS7250 MACHINE SUPPORT
 M:	Lennert Buytenhek <[email protected]>
Signature · 1 line
1.7.9.5
#21 lore raw

PATCH 21/22 phy: exynos-dp-video: Use syscon support to control pmu register

In reply to Kishon Vijay Abraham I

From: Vivek Gautam <[email protected]>

Currently the DP_PHY_ENABLE register is mapped in the driver, and accessed to control power to the PHY.
With mfd-syscon and regmap interface available at our disposal, it's wise to use that instead of using a 'reg' property for the controller and allocating a memory resource for that.

To facilitate this, we have added another compatible string for Exynso5420 SoC to acquire driver data which contains different DP-PHY-CONTROL register offset.

---
 .../devicetree/bindings/phy/samsung-phy.txt        |    7 +-
 drivers/phy/phy-exynos-dp-video.c                  |   79 +++++++++++++-------
 2 files changed, 59 insertions(+), 27 deletions(-)
Documentation/devicetree/bindings/phy/samsung-phy.txt +5 -2
index 7a6feea..15e0f2c 100644
@@ -17,8 +17,11 @@ Samsung EXYNOS SoC series Display Port PHY
 -------------------------------------------------
 
 Required properties:
-- compatible : should be "samsung,exynos5250-dp-video-phy";
-- reg : offset and length of the Display Port PHY register set;
+- compatible : should be one of the following supported values:
+	 - "samsung,exynos5250-dp-video-phy"
+	 - "samsung,exynos5420-dp-video-phy"
+- samsung,pmu-syscon: phandle for PMU system controller interface, used to
+		      control pmu registers for power isolation.
 - #phy-cells : from the generic PHY bindings, must be 0;
 
 Samsung S5P/EXYNOS SoC series USB PHY
drivers/phy/phy-exynos-dp-video.c +54 -25

132 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#22 lore raw

PATCH 22/22 phy: remove .owner field for drivers using module_platform_driver

In reply to Kishon Vijay Abraham I

From: Peter Griffin <[email protected]>

This patch removes the superflous .owner field for drivers which use the module_platform_driver or platform_driver_register api, as this is overriden in __platform_driver_register.

---
 drivers/phy/phy-bcm-kona-usb2.c     |    1 -
 drivers/phy/phy-berlin-sata.c       |    1 -
 drivers/phy/phy-exynos-dp-video.c   |    1 -
 drivers/phy/phy-exynos-mipi-video.c |    1 -
 drivers/phy/phy-exynos5-usbdrd.c    |    1 -
 drivers/phy/phy-exynos5250-sata.c   |    1 -
 drivers/phy/phy-hix5hd2-sata.c      |    1 -
 drivers/phy/phy-miphy365x.c         |    1 -
 drivers/phy/phy-mvebu-sata.c        |    1 -
 drivers/phy/phy-omap-control.c      |    1 -
 drivers/phy/phy-omap-usb2.c         |    1 -
 drivers/phy/phy-qcom-apq8064-sata.c |    1 -
 drivers/phy/phy-qcom-ipq806x-sata.c |    1 -
 drivers/phy/phy-samsung-usb2.c      |    1 -
 drivers/phy/phy-sun4i-usb.c         |    1 -
 drivers/phy/phy-ti-pipe3.c          |    1 -
 drivers/phy/phy-twl4030-usb.c       |    1 -
 drivers/phy/phy-xgene.c             |    1 -
 18 files changed, 18 deletions(-)
drivers/phy/phy-bcm-kona-usb2.c +0 -1
index 894fe74..c1e0ca3 100644
@@ -143,7 +143,6 @@ static struct platform_driver bcm_kona_usb2_driver = {
 	.probe		= bcm_kona_usb2_probe,
 	.driver		= {
 		.name	= "bcm-kona-usb2",
-		.owner	= THIS_MODULE,
 		.of_match_table = bcm_kona_usb2_dt_ids,
 	},
 };
drivers/phy/phy-berlin-sata.c +0 -1
index 5c3a042..69ced52 100644
@@ -273,7 +273,6 @@ static struct platform_driver phy_berlin_sata_driver = {
 	.probe	= phy_berlin_sata_probe,
 	.driver	= {
 		.name		= "phy-berlin-sata",
-		.owner		= THIS_MODULE,
 		.of_match_table	= phy_berlin_sata_of_match,
 	},
 };
drivers/phy/phy-exynos-dp-video.c +0 -1
index 53f44a0..84f49e5 100644
@@ -128,7 +128,6 @@ static struct platform_driver exynos_dp_video_phy_driver = {
 	.probe	= exynos_dp_video_phy_probe,
 	.driver = {
 		.name	= "exynos-dp-video-phy",
-		.owner	= THIS_MODULE,
 		.of_match_table	= exynos_dp_video_phy_of_match,
 	}
 };
drivers/phy/phy-exynos-mipi-video.c +0 -1
index b55a92e..6a9bef1 100644
@@ -165,7 +165,6 @@ static struct platform_driver exynos_mipi_video_phy_driver = {
 	.driver = {
 		.of_match_table	= exynos_mipi_video_phy_of_match,
 		.name  = "exynos-mipi-video-phy",
-		.owner = THIS_MODULE,
 	}
 };
 module_platform_driver(exynos_mipi_video_phy_driver);
drivers/phy/phy-exynos5-usbdrd.c +0 -1
index 392101c..f756aca 100644
@@ -667,7 +667,6 @@ static struct platform_driver exynos5_usb3drd_phy = {
 	.driver = {
 		.of_match_table	= exynos5_usbdrd_phy_of_match,
 		.name		= "exynos5_usb3drd_phy",
-		.owner		= THIS_MODULE,
 	}
 };
 
drivers/phy/phy-exynos5250-sata.c +0 -1
index 19a679a..54cf4ae 100644
@@ -240,7 +240,6 @@ static struct platform_driver exynos_sata_phy_driver = {
 	.driver = {
 		.of_match_table	= exynos_sata_phy_of_match,
 		.name  = "samsung,sata-phy",
-		.owner = THIS_MODULE,
 	}
 };
 module_platform_driver(exynos_sata_phy_driver);
drivers/phy/phy-hix5hd2-sata.c +0 -1
index 6a08fa5..d5d9780 100644
@@ -180,7 +180,6 @@ static struct platform_driver hix5hd2_sata_phy_driver = {
 	.probe	= hix5hd2_sata_phy_probe,
 	.driver = {
 		.name	= "hix5hd2-sata-phy",
-		.owner	= THIS_MODULE,
 		.of_match_table	= hix5hd2_sata_phy_of_match,
 	}
 };
drivers/phy/phy-miphy365x.c +0 -1
index e0fb7a1..801afaf 100644
@@ -626,7 +626,6 @@ static struct platform_driver miphy365x_driver = {
 	.probe	= miphy365x_probe,
 	.driver = {
 		.name	= "miphy365x-phy",
-		.owner	= THIS_MODULE,
 		.of_match_table	= miphy365x_of_match,
 	}
 };
drivers/phy/phy-mvebu-sata.c +0 -1
index 10bb8e5..d395558 100644
@@ -128,7 +128,6 @@ static struct platform_driver phy_mvebu_sata_driver = {
 	.probe	= phy_mvebu_sata_probe,
 	.driver = {
 		.name	= "phy-mvebu-sata",
-		.owner	= THIS_MODULE,
 		.of_match_table	= phy_mvebu_sata_of_match,
 	}
 };
drivers/phy/phy-omap-control.c +0 -1
index cb2f4d1..c96e818 100644
@@ -345,7 +345,6 @@ static struct platform_driver omap_control_phy_driver = {
 	.probe		= omap_control_phy_probe,
 	.driver		= {
 		.name	= "omap-control-phy",
-		.owner	= THIS_MODULE,
 		.of_match_table = of_match_ptr(omap_control_phy_id_table),
 	},
 };
drivers/phy/phy-omap-usb2.c +0 -1
index 51c6f92..8c84298 100644
@@ -378,7 +378,6 @@ static struct platform_driver omap_usb2_driver = {
 	.remove		= omap_usb2_remove,
 	.driver		= {
 		.name	= "omap-usb2",
-		.owner	= THIS_MODULE,
 		.pm	= DEV_PM_OPS,
 		.of_match_table = of_match_ptr(omap_usb2_id_table),
 	},
drivers/phy/phy-qcom-apq8064-sata.c +0 -1
index b3ef7d8..7b3ddfb 100644
@@ -279,7 +279,6 @@ static struct platform_driver qcom_apq8064_sata_phy_driver = {
 	.remove	= qcom_apq8064_sata_phy_remove,
 	.driver = {
 		.name	= "qcom-apq8064-sata-phy",
-		.owner	= THIS_MODULE,
 		.of_match_table	= qcom_apq8064_sata_phy_of_match,
 	}
 };
drivers/phy/phy-qcom-ipq806x-sata.c +0 -1
index 909b5a8..759b0bf 100644
@@ -201,7 +201,6 @@ static struct platform_driver qcom_ipq806x_sata_phy_driver = {
 	.remove	= qcom_ipq806x_sata_phy_remove,
 	.driver = {
 		.name	= "qcom-ipq806x-sata-phy",
-		.owner	= THIS_MODULE,
 		.of_match_table	= qcom_ipq806x_sata_phy_of_match,
 	}
 };
drivers/phy/phy-samsung-usb2.c +0 -1
index 3732ca2..908949d 100644
@@ -231,7 +231,6 @@ static struct platform_driver samsung_usb2_phy_driver = {
 	.driver = {
 		.of_match_table	= samsung_usb2_phy_of_match,
 		.name		= "samsung-usb2-phy",
-		.owner		= THIS_MODULE,
 	}
 };
 
drivers/phy/phy-sun4i-usb.c +0 -1
index 61ebea4..0baf5ef 100644
@@ -325,7 +325,6 @@ static struct platform_driver sun4i_usb_phy_driver = {
 	.driver = {
 		.of_match_table	= sun4i_usb_phy_of_match,
 		.name  = "sun4i-usb-phy",
-		.owner = THIS_MODULE,
 	}
 };
 module_platform_driver(sun4i_usb_phy_driver);
drivers/phy/phy-ti-pipe3.c +0 -1
index 9280ef8..ab1e22d 100644
@@ -518,7 +518,6 @@ static struct platform_driver ti_pipe3_driver = {
 	.remove		= ti_pipe3_remove,
 	.driver		= {
 		.name	= "ti-pipe3",
-		.owner	= THIS_MODULE,
 		.pm	= DEV_PM_OPS,
 		.of_match_table = of_match_ptr(ti_pipe3_id_table),
 	},
drivers/phy/phy-twl4030-usb.c +0 -1
index 1e0e2d1..7b04bef 100644
@@ -785,7 +785,6 @@ static struct platform_driver twl4030_usb_driver = {
 	.driver		= {
 		.name	= "twl4030_usb",
 		.pm	= &twl4030_usb_pm_ops,
-		.owner	= THIS_MODULE,
 		.of_match_table = of_match_ptr(twl4030_usb_id_table),
 	},
 };
drivers/phy/phy-xgene.c +0 -1
index db809b9..f8a51b1 100644
@@ -1738,7 +1738,6 @@ static struct platform_driver xgene_phy_driver = {
 	.probe = xgene_phy_probe,
 	.driver = {
 		   .name = "xgene-phy",
-		   .owner = THIS_MODULE,
 		   .of_match_table = xgene_phy_of_match,
 	},
 };
Signature · 1 line
1.7.9.5
#23 lore raw
In reply to Kishon Vijay Abraham I
Quoted 11 lines · Kishon Vijay Abraham I

Hi Greg,

Here's the PULL Request for 3.18 merge window.
It includes 3 new PHY drivers adapted to the PHY framework and misc cleanups and fixes.

Let me know if I have to change something.

Cheers
Kishon

Quoted 8 lines

The following changes since commit 452b6361c4d9baf6940adb7b1316e0f386c39799:

Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband (2014-09-23 16:47:34 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/phy-for_3.18

Pulled and pushed out, thanks.

greg k-h

#24 lore raw
Quoted 14 lines · Greg KH
Quoted 13 lines · Kishon Vijay Abraham I

Hi Greg,

Here's the PULL Request for 3.18 merge window.
It includes 3 new PHY drivers adapted to the PHY framework and misc cleanups and fixes.

Let me know if I have to change something.

Cheers
Kishon

The following changes since commit 452b6361c4d9baf6940adb7b1316e0f386c39799:

Quoted 8 lines
Quoted 6 lines

Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband (2014-09-23 16:47:34 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/phy-for_3.18

Pulled and pushed out, thanks.

Thanks Greg!

-Kishon

Quoted 3 lines

greg k-h