All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb@vger.kernel.org, Greg KH <greg@kroah.com>
Subject: [v2] usb: uhci: Add clk support to uhci-platform
Date: Sat, 13 Jan 2018 09:28:45 +1100	[thread overview]
Message-ID: <1515796125.31850.111.camel@kernel.crashing.org> (raw)

On Fri, 2018-01-12 at 10:52 -0500, Alan Stern wrote:
> 
> As Sergei mentioned, please be consistent in the use of tabs vs. 
> spaces.
> 
> Do you have to worry about EPROBE_DEFER errors at any point?

I don't think so, not on the SoC I'm using but it might be worthwhile
adding support for it just in case...
> 
> > +     if (uhci->clk) {
> > +             ret = clk_prepare_enable(uhci->clk);
> > +             if (ret) {
> > +                     dev_err(&pdev->dev, "Error couldn't enable clock (%d)\n", ret);
> > +                     goto err_rmr;
> > +             }
> > +        }
> > +
> >        ret = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_SHARED);
> >        if (ret)
> >                goto err_rmr;
> 
> This error path needs to call clk_disable_unprepare.

Yeah ok.

> > @@ -135,7 +150,10 @@ static int uhci_hcd_platform_probe(struct platform_device *pdev)
> >   static int uhci_hcd_platform_remove(struct platform_device *pdev)
> >   {
> >        struct usb_hcd *hcd = platform_get_drvdata(pdev);
> > +     struct uhci_hcd *uhci = hcd_to_uhci(hcd);
> >   
> > +     if (uhci->clk)
> > +             clk_disable_unprepare(uhci->clk);
> >        usb_remove_hcd(hcd);
> >        usb_put_hcd(hcd);
> 
> Alan Stern
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2018-01-12 22:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12 22:28 Benjamin Herrenschmidt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-01-13  3:21 [v2] usb: uhci: Add clk support to uhci-platform Alan Stern
2018-01-12 22:34 Benjamin Herrenschmidt
2018-01-12 15:52 Alan Stern
2018-01-12  5:54 Benjamin Herrenschmidt

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=1515796125.31850.111.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=greg@kroah.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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.