Re: [PATCH v2] phy: Renesas R-Car Gen2 PHY driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hello.

On 10-04-2014 23:53, Sergei Shtylyov wrote:

On Wednesday 09 April 2014 03:14 AM, Sergei Shtylyov wrote:
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.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@xxxxxxxxxxxxxxxxxx>

[...]

Index: linux-phy/drivers/phy/phy-rcar-gen2.c
===================================================================
--- /dev/null
+++ linux-phy/drivers/phy/phy-rcar-gen2.c
@@ -0,0 +1,287 @@

[...]

+static struct phy_ops rcar_gen2_phy_ops = {
+    .init        = rcar_gen2_phy_init,
+    .exit        = rcar_gen2_phy_exit,
+    .owner        = THIS_MODULE,
+};
+
+static struct phy_ops rcar_gen2_usbhs_phy_ops = {
+    .init        = rcar_gen2_phy_init,
+    .exit        = rcar_gen2_phy_exit,
+    .power_on    = rcar_gen2_usbhs_phy_power_on,
+    .power_off    = rcar_gen2_usbhs_phy_power_off,
+    .owner        = THIS_MODULE,
+};

Let's not create multiple phy_ops for a single driver.

    Unfortunately, I have to because not all PHYs are equal.

OK, actually I can do without extra 'struct phy_ops'. I just figured that out a bit late...

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux