Re: [PATCH 2/3 v4] musb: add musb support for AM35x

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

 



 Hi,

Already replied to Sergei on the comments below,
so please see the answer in my reply to Sergei.

On 09/29/10 17:46, Gupta, Ajay Kumar wrote:
> Hi,
>
> [...]
>>> +	devconf2 &= ~CONF2_OTGMODE;
>>> +	switch (musb_mode) {
>>> +#ifdef	CONFIG_USB_MUSB_OTG
>>> +	case MUSB_OTG:		/* Don't override the VBUS/ID comparators */
>>> +		devconf2 |= CONF2_NO_OVERRIDE;
>> This does nothing, can be removed...
> Yes, but it's good to have it from code readability perspective.
>
> I can remove it but let's get Felipe's opinion on this.
>
> [...] 
>>> +	if (musb->set_clock)
>>> +		musb->set_clock(musb->clock, 0);
>>> +	else
>>> +		clk_disable(musb->clock);
>>> +
>>> +	otg_fck = clk_get(musb->controller, "fck");
>>> +	if (IS_ERR(otg_fck)) {
>>> +		DBG(2, "clk_get() failed for otg_fck.\n");
>>> +	} else {
>>> +		clk_put(otg_fck);
>>> +		clk_put(otg_fck);
>>> +		clk_disable(otg_fck);
>> I think the order should be:
>> clk_disable(...);
>> clk_put(...);
> Again I would wait for Felipe's opinion on this ordering. BTW there
> Are codes on musb_core.c where clk_put is done before clk_disable().
>
>>> And of course, it should be put only once... ;)
> No. clk_put() needs to be done twice as clk_get() is called two times;
> one in musb_platform_init() and other in current function musb_platform_exit.
>
> Other solution could be to save otg_fck in some static variable as
> Sergei suggested.
>
> Thanks,
> Ajay
> [...]
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

-- 
Regards,
Igor.

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux