All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Grinberg <grinberg@compulab.co.il>
To: "Gupta, Ajay Kumar" <ajay.gupta@ti.com>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Balbi, Felipe" <balbi@ti.com>
Subject: Re: [PATCH 2/3 v4] musb: add musb support for AM35x
Date: Wed, 29 Sep 2010 18:00:13 +0200	[thread overview]
Message-ID: <4CA3628D.20407@compulab.co.il> (raw)
In-Reply-To: <19F8576C6E063C45BE387C64729E739404A9D8AB99@dbde02.ent.ti.com>

 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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

-- 
Regards,
Igor.


  reply	other threads:[~2010-09-29 16:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-29 12:45 [PATCH 1/3 v4] AM35x: Add musb support Ajay Kumar Gupta
2010-09-29 12:45 ` [PATCH 2/3 v4] musb: add musb support for AM35x Ajay Kumar Gupta
     [not found]   ` <1285764321-13934-2-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-09-29 12:45     ` [PATCH 3/3 v4] musb: AM35x: Workaround for fifo read issue Ajay Kumar Gupta
     [not found]       ` <1285764321-13934-3-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-09-29 14:59         ` Sergei Shtylyov
2010-09-29 15:28     ` [PATCH 2/3 v4] musb: add musb support for AM35x Igor Grinberg
     [not found]       ` <4CA35B3A.4090707-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>
2010-09-29 15:38         ` Sergei Shtylyov
     [not found]           ` <4CA35D5B.8060400-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2010-09-29 15:55             ` Igor Grinberg
2010-09-29 15:46       ` Gupta, Ajay Kumar
2010-09-29 16:00         ` Igor Grinberg [this message]
2010-09-29 15:33     ` Sergei Shtylyov
     [not found]       ` <4CA35C3B.3000002-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2010-09-29 15:56         ` Gupta, Ajay Kumar

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=4CA3628D.20407@compulab.co.il \
    --to=grinberg@compulab.co.il \
    --cc=ajay.gupta@ti.com \
    --cc=balbi@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@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.