public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
To: Kalle Jokiniemi
	<kalle.jokiniemi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	balbi-l0cyMroinI0@public.gmane.org,
	tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org,
	heikki.krogerus-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org,
	jhnikula-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	ilkka.koskinen-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCH 1/2] USB: twl4030-usb: do board specific phy_power up/down
Date: Mon, 21 Mar 2011 17:21:26 +0300	[thread overview]
Message-ID: <4D875EE6.50505@ru.mvista.com> (raw)
In-Reply-To: <1300715420-25602-2-git-send-email-kalle.jokiniemi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>

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.jokiniemi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
> ---
>  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-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2011-03-21 14:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-21 13:50 [PATCH 0/2] USB: twl4030-usb: fix isp1707 xceiver powering Kalle Jokiniemi
2011-03-21 13:50 ` [PATCH 1/2] USB: twl4030-usb: do board specific phy_power up/down Kalle Jokiniemi
     [not found]   ` <1300715420-25602-2-git-send-email-kalle.jokiniemi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2011-03-21 14:21     ` Sergei Shtylyov [this message]
     [not found]       ` <4D875EE6.50505-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2011-03-22 10:12         ` kalle.jokiniemi-xNZwKgViW5gAvxtiuMwx3w
2011-03-22  9:17   ` Heikki Krogerus
2011-03-21 13:50 ` [PATCH 2/2] OMAP3: rx51: specify phy_power for usb tranceiver Kalle Jokiniemi
     [not found]   ` <1300715420-25602-3-git-send-email-kalle.jokiniemi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2011-03-21 14:28     ` Sergei Shtylyov
     [not found]       ` <4D8760AB.1080307-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2011-03-21 14:40         ` Aaro Koskinen
     [not found]           ` <alpine.DEB.1.10.1103211637510.2634-etG4378wJBqbbBH2nJjHHo8aPWbYBoAt8eUrP9FhD0M@public.gmane.org>
2011-03-21 16:21             ` Greg KH
     [not found]               ` <20110321162148.GA659-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2011-03-22  8:43                 ` Felipe Balbi
2011-03-22 10:13         ` kalle.jokiniemi-xNZwKgViW5gAvxtiuMwx3w
2011-03-21 15:20     ` Jarkko Nikula
     [not found]       ` <20110321172058.a8b66331.jhnikula-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-03-22 10:30         ` kalle.jokiniemi-xNZwKgViW5gAvxtiuMwx3w
2011-03-22  9:13   ` Heikki Krogerus
2011-03-22 10:24     ` kalle.jokiniemi
2011-03-22 10:54       ` Heikki Krogerus
2011-03-22  9:45 ` [PATCH 0/2] USB: twl4030-usb: fix isp1707 xceiver powering Heikki Krogerus
2011-03-22 10:19   ` kalle.jokiniemi

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=4D875EE6.50505@ru.mvista.com \
    --to=sshtylyov-igf4poytycdqt0dzr+alfa@public.gmane.org \
    --cc=balbi-l0cyMroinI0@public.gmane.org \
    --cc=heikki.krogerus-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=ilkka.koskinen-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=jhnikula-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kalle.jokiniemi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
    /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