Re: [PATCH 1/2] USB: twl4030-usb: do board specific phy_power up/down
Hi, On Mon, Mar 21, 2011 at 03:50:19PM +0200, Kalle Jokiniemi wrote: In case some board has special powering sequences for the USB tranceiver, call those during __twl4030_phy_power calls. This is a preparation patch to allow powering down the ISP1707 USB serial tranceiver in Nokia N900. Signed-off-by: Kalle Jokiniemi kalle.jokini...@nokia.com --- drivers/usb/otg/twl4030-usb.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 6ca505f..dea99b1 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c @@ -348,13 +348,20 @@ static void twl4030_i2c_access(struct twl4030_usb *twl, int on) static void __twl4030_phy_power(struct twl4030_usb *twl, int on) { - u8 pwr = twl4030_usb_read(twl, PHY_PWR_CTRL); + u8 pwr; + struct twl4030_usb_data *board = twl-dev-platform_data; + + pwr = twl4030_usb_read(twl, PHY_PWR_CTRL); if (on) pwr = ~PHY_PWR_PHYPWD; else pwr |= PHY_PWR_PHYPWD; + /* do board specific power up/down, if available */ + if (board-phy_power) + board-phy_power(twl-dev, 0, on); + WARN_ON(twl4030_usb_write_verify(twl, PHY_PWR_CTRL, pwr) 0); } Wrong driver. We are controlling isp1707. The driver is drivers/power/isp1704_charger.c. -- heikki -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 1/2] USB: twl4030-usb: do board specific phy_power up/down
Hi, -Original Message- From: ext Sergei Shtylyov [mailto:sshtyl...@mvista.com] Sent: 21. maaliskuuta 2011 16:21 To: Jokiniemi Kalle (Nokia-MS/Tampere) Cc: linux-...@vger.kernel.org; linux-omap@vger.kernel.org; ba...@ti.com; t...@atomide.com; Krogerus Heikki (Nokia-MS/Helsinki); jhnik...@gmail.com; Koskinen Ilkka (Nokia-MS/Tampere) Subject: Re: [PATCH 1/2] USB: twl4030-usb: do board specific phy_power up/down Hello. Kalle Jokiniemi wrote: In case some board has special powering sequences for the USB tranceiver, call those during __twl4030_phy_power calls. This is a preparation patch to allow powering down the ISP1707 USB serial tranceiver in Nokia N900. Signed-off-by: Kalle Jokiniemi kalle.jokini...@nokia.com --- drivers/usb/otg/twl4030-usb.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 6ca505f..dea99b1 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c @@ -348,13 +348,20 @@ static void twl4030_i2c_access(struct twl4030_usb *twl, int on) static void __twl4030_phy_power(struct twl4030_usb *twl, int on) { - u8 pwr = twl4030_usb_read(twl, PHY_PWR_CTRL); + u8 pwr; Why change this line? Also, some prefer that initialized variables precede uninitialized ones... One likes the apple, one likes the orange. I'll change that back, no problem. - Kalle + struct twl4030_usb_data *board = twl-dev-platform_data; + + pwr = twl4030_usb_read(twl, PHY_PWR_CTRL); if (on) pwr = ~PHY_PWR_PHYPWD; else pwr |= PHY_PWR_PHYPWD; + /* do board specific power up/down, if available */ + if (board-phy_power) + board-phy_power(twl-dev, 0, on); + WARN_ON(twl4030_usb_write_verify(twl, PHY_PWR_CTRL, pwr) 0); } WBR, Sergei -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] USB: twl4030-usb: do board specific phy_power up/down
In case some board has special powering sequences for the USB tranceiver, call those during __twl4030_phy_power calls. This is a preparation patch to allow powering down the ISP1707 USB serial tranceiver in Nokia N900. Signed-off-by: Kalle Jokiniemi kalle.jokini...@nokia.com --- drivers/usb/otg/twl4030-usb.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 6ca505f..dea99b1 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c @@ -348,13 +348,20 @@ static void twl4030_i2c_access(struct twl4030_usb *twl, int on) static void __twl4030_phy_power(struct twl4030_usb *twl, int on) { - u8 pwr = twl4030_usb_read(twl, PHY_PWR_CTRL); + u8 pwr; + struct twl4030_usb_data *board = twl-dev-platform_data; + + pwr = twl4030_usb_read(twl, PHY_PWR_CTRL); if (on) pwr = ~PHY_PWR_PHYPWD; else pwr |= PHY_PWR_PHYPWD; + /* do board specific power up/down, if available */ + if (board-phy_power) + board-phy_power(twl-dev, 0, on); + WARN_ON(twl4030_usb_write_verify(twl, PHY_PWR_CTRL, pwr) 0); } -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] USB: twl4030-usb: do board specific phy_power up/down
Hello. Kalle Jokiniemi wrote: In case some board has special powering sequences for the USB tranceiver, call those during __twl4030_phy_power calls. This is a preparation patch to allow powering down the ISP1707 USB serial tranceiver in Nokia N900. Signed-off-by: Kalle Jokiniemi kalle.jokini...@nokia.com --- drivers/usb/otg/twl4030-usb.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 6ca505f..dea99b1 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c @@ -348,13 +348,20 @@ static void twl4030_i2c_access(struct twl4030_usb *twl, int on) static void __twl4030_phy_power(struct twl4030_usb *twl, int on) { - u8 pwr = twl4030_usb_read(twl, PHY_PWR_CTRL); + u8 pwr; Why change this line? Also, some prefer that initialized variables precede uninitialized ones... + struct twl4030_usb_data *board = twl-dev-platform_data; + + pwr = twl4030_usb_read(twl, PHY_PWR_CTRL); if (on) pwr = ~PHY_PWR_PHYPWD; else pwr |= PHY_PWR_PHYPWD; + /* do board specific power up/down, if available */ + if (board-phy_power) + board-phy_power(twl-dev, 0, on); + WARN_ON(twl4030_usb_write_verify(twl, PHY_PWR_CTRL, pwr) 0); } WBR, Sergei -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html