All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
To: Sergei Shtylyov <sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
	Thomas Abraham
	<thomas.ab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Kukjin Kim <kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 4/4] usb: s3c-hsotg: Enable HCLK for the OTG module.
Date: Mon, 31 May 2010 01:39:54 +0100	[thread overview]
Message-ID: <20100531003954.GN7248@trinity.fluff.org> (raw)
In-Reply-To: <4BFF9F79.106-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>

On Fri, May 28, 2010 at 02:48:25PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> Ben Dooks wrote:
>
>>> From: Thomas Abraham <thomas.ab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
>
>>> This patch modifies the following in S3C hsotg driver.
>
>>> 1. Gets a reference to the USB OTG hclk clock and enables it. This is
>>>    required for plaforms on which the USB OTG hclk is disabled during
>>>    the boot time clock intialization.
>
>>> 2. Add necessary clock clean up in case of error during initialization
>>>    failure or during module unload.
>
>>> 3. Add a new field 'clk_otg' in 'struct s3c_hsotg' to maintain a
>>>    reference to the USB OTG hclk clock.
>
>>> Signed-off-by: Thomas Abraham <thomas.ab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
>>> Signed-off-by: Kukjin Kim <kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
>>> ---
>>>  drivers/usb/gadget/s3c-hsotg.c |   17 +++++++++++++++++
>>>  1 files changed, 17 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
>>> index 81c47d2..526d081 100644
>>> --- a/drivers/usb/gadget/s3c-hsotg.c
>>> +++ b/drivers/usb/gadget/s3c-hsotg.c
>
> [...]
>
>>> @@ -3269,6 +3271,14 @@ static int __devinit s3c_hsotg_probe(struct platform_device *pdev)
>>>  		goto err_regs_res;
>>>  	}
>>>  +	hsotg->clk_otg = clk_get(&pdev->dev, "otg");
>>> +	if (IS_ERR(hsotg->clk_otg)) {
>>> +		dev_err(dev, "failed to find usb otg clock source\n");
>>> +		ret = -ENODEV;
>
>> hmm, -ENODEV isn't really the right error to return here, it'll
>> get silently ignored by the device core.
>
>    Right, PTR_ERR(hsotg->clk_otg) should be returned in this case.
>
> WBR, Sergei

yes, missed that thanks.
-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.

--
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

WARNING: multiple messages have this Message-ID (diff)
From: ben-linux@fluff.org (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] usb: s3c-hsotg: Enable HCLK for the OTG module.
Date: Mon, 31 May 2010 01:39:54 +0100	[thread overview]
Message-ID: <20100531003954.GN7248@trinity.fluff.org> (raw)
In-Reply-To: <4BFF9F79.106@ru.mvista.com>

On Fri, May 28, 2010 at 02:48:25PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> Ben Dooks wrote:
>
>>> From: Thomas Abraham <thomas.ab@samsung.com>
>
>>> This patch modifies the following in S3C hsotg driver.
>
>>> 1. Gets a reference to the USB OTG hclk clock and enables it. This is
>>>    required for plaforms on which the USB OTG hclk is disabled during
>>>    the boot time clock intialization.
>
>>> 2. Add necessary clock clean up in case of error during initialization
>>>    failure or during module unload.
>
>>> 3. Add a new field 'clk_otg' in 'struct s3c_hsotg' to maintain a
>>>    reference to the USB OTG hclk clock.
>
>>> Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
>>> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
>>> ---
>>>  drivers/usb/gadget/s3c-hsotg.c |   17 +++++++++++++++++
>>>  1 files changed, 17 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
>>> index 81c47d2..526d081 100644
>>> --- a/drivers/usb/gadget/s3c-hsotg.c
>>> +++ b/drivers/usb/gadget/s3c-hsotg.c
>
> [...]
>
>>> @@ -3269,6 +3271,14 @@ static int __devinit s3c_hsotg_probe(struct platform_device *pdev)
>>>  		goto err_regs_res;
>>>  	}
>>>  +	hsotg->clk_otg = clk_get(&pdev->dev, "otg");
>>> +	if (IS_ERR(hsotg->clk_otg)) {
>>> +		dev_err(dev, "failed to find usb otg clock source\n");
>>> +		ret = -ENODEV;
>
>> hmm, -ENODEV isn't really the right error to return here, it'll
>> get silently ignored by the device core.
>
>    Right, PTR_ERR(hsotg->clk_otg) should be returned in this case.
>
> WBR, Sergei

yes, missed that thanks.
-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.

  parent reply	other threads:[~2010-05-31  0:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-28  2:41 [PATCH] Updates for S3C HSOTG driver Kukjin Kim
2010-05-28  2:41 ` Kukjin Kim
2010-05-28  2:41 ` [PATCH 1/4] ARM: S3C64XX: Add USB OTG HCLK to the list of clocks Kukjin Kim
2010-05-28  2:41   ` Kukjin Kim
2010-05-28  2:41 ` [PATCH 2/4] ARM: S5PV210: Assign clock rate for clk_xusbxti clock Kukjin Kim
2010-05-28  2:41   ` Kukjin Kim
2010-05-28  7:10   ` Ben Dooks
2010-05-28  7:10     ` Ben Dooks
     [not found] ` <1275014477-23133-1-git-send-email-kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2010-05-28  2:41   ` [PATCH 3/4] ARM: S5P: Add clk_xusbxti clock to the list of clocks to be registered Kukjin Kim
2010-05-28  2:41     ` Kukjin Kim
2010-05-28  2:41   ` [PATCH 4/4] usb: s3c-hsotg: Enable HCLK for the OTG module Kukjin Kim
2010-05-28  2:41     ` Kukjin Kim
2010-05-28  3:58     ` Ben Dooks
2010-05-28  3:58       ` Ben Dooks
2010-05-28 10:22     ` Ben Dooks
2010-05-28 10:22       ` Ben Dooks
2010-05-28 10:48       ` Sergei Shtylyov
2010-05-28 10:48         ` Sergei Shtylyov
     [not found]         ` <4BFF9F79.106-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2010-05-31  0:39           ` Ben Dooks [this message]
2010-05-31  0:39             ` Ben Dooks

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=20100531003954.GN7248@trinity.fluff.org \
    --to=ben-linux-elnmno+kys3ytjvyw6ydsg@public.gmane.org \
    --cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org \
    --cc=thomas.ab-Sze3O3UU22JBDgjK7y7TUQ@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 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.