Re: [PATCH 4/4] usb: s3c-hsotg: Enable HCLK for the OTG module.

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

 



On Fri, May 28, 2010 at 02:48:25PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> Ben Dooks wrote:
>
>>> From: Thomas Abraham <thomas.ab@xxxxxxxxxxx>
>
>>> 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@xxxxxxxxxxx>
>>> Signed-off-by: Kukjin Kim <kgene.kim@xxxxxxxxxxx>
>>> ---
>>>  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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux