lkml.org 
[lkml]   [2013]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] extcon: gpio: Request gpio pin before modifying its state
Hi Guenter,

On 11/23/2013 02:26 AM, Guenter Roeck wrote:
> Commit 338de0ca (extcon: gpio: Use gpio driver/chip debounce if supported)
> introduced a call to gpio_set_debounce() before actually requesting the
> respective gpio pin from the gpio subsystem.
>
> The gpio subsystem expects that a gpio pin was requested before modifying its
> state. Not doing so results in a warning from gpiolib, and the gpio pin is
> auto-requested. This in turn causes the subsequent devm_gpio_request_one()
> to fail. So devm_gpio_request_one() must be called prior to calling
> gpio_set_debounce().
>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/extcon/extcon-gpio.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>

Applid it on extcon-next branch.

Thanks,
Chanwoo Choi



\
 
 \ /
  Last update: 2013-11-26 09:41    [W:0.052 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site