lkml.org 
[lkml]   [2013]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] USB: ehci-s5p: Fix phy reset
From
Alexander,

On Tue, Mar 12, 2013 at 6:09 PM, Alexander Graf <agraf@suse.de> wrote:
> - err = gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, "ehci_vbus_gpio");
> - if (err)
> + /* reset pulls the line down, then up again */
> + err = gpio_request_one(gpio, GPIOF_OUT_INIT_LOW, "ehci_vbus_gpio");
> + if (err) {
> dev_err(&pdev->dev, "can't request ehci vbus gpio %d", gpio);
> + return;
> + }
> + mdelay(1);
> + __gpio_set_value(gpio, 1);
> + gpio_free(gpio);

Freeing the gpio is a little on the iffy side since you actually care
about keeping the value. Perhaps you can change this to
devm_gpio_request_one() and avoid the free? I was about to submit a
patch to do just that (since otherwise you run into trouble if you
ever defer the probe) but then ran across your patch.

Thanks!

-Doug


\
 
 \ /
  Last update: 2013-03-13 19:01    [W:0.081 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site