From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 1/2 v2] ARM: shmobile: r8a7778: add usb phy power control function
Date: Wed, 31 Jul 2013 12:31:35 +0000 [thread overview]
Message-ID: <51F903A7.5070206@cogentembedded.com> (raw)
In-Reply-To: <87r4efb6al.wl%kuninori.morimoto.gx@renesas.com>
Hello.
On 31-07-2013 10:19, Kuninori Morimoto wrote:
> USB phy initialisation function is needed from not only
> USB Host but also USB Function too.
> This patch adds usb phy common control function.
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[...]
> diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
> index 1a154d4..b65044a 100644
> --- a/arch/arm/mach-shmobile/setup-r8a7778.c
> +++ b/arch/arm/mach-shmobile/setup-r8a7778.c
> @@ -95,29 +95,46 @@ static struct sh_timer_config sh_tmu1_platform_data __initdata = {
> &sh_tmu##idx##_platform_data, \
> sizeof(sh_tmu##idx##_platform_data))
>
> -/* USB */
> -static struct usb_phy *phy;
> +int r8a7778_usb_phy_power(bool enable)
> +{
> + static struct usb_phy *phy = NULL;
> + int ret = 0;
> +
> + if (!phy)
> + phy = usb_get_phy(USB_PHY_TYPE_USB2);
> +
Don't think this blank line is needed.
> + if (IS_ERR(phy)) {
> + pr_err("it doesn't have usb phy driver\n");
What "it"? "Kernel" maybe? And please capitalize "USB PHY".
WBR, Sergei
prev parent reply other threads:[~2013-07-31 12:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-31 6:19 [PATCH 1/2 v2] ARM: shmobile: r8a7778: add usb phy power control function Kuninori Morimoto
2013-07-31 12:31 ` Sergei Shtylyov [this message]
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=51F903A7.5070206@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=linux-sh@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.