Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1739456

Re: [PATCH 8/8] extcon: gpio: Always check state on resume

From Chanwoo Choi <cw00.choi@samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH 8/8] extcon: gpio: Always check state on resume
Date 2017-09-26 04:30 +0200
Message-ID <utNNg-6PT-23@gated-at.bofh.it> (permalink)
References <utgxX-1yO-3@gated-at.bofh.it> <utNNg-6PT-25@gated-at.bofh.it> <utgHD-1R2-7@gated-at.bofh.it>
Organization Samsung Electronics

Show all headers | View raw


Hi Linus,

On 2017년 09월 24일 23:56, Linus Walleij wrote:
> It makes most sense to always check the state of the GPIO external
> connector at system resume so just do this by default. Add a TODO
> if people turn out to desire to parameterize this.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  drivers/extcon/extcon-gpio.c | 9 +++++++++
>  1 file changed, 9 insertions(+)

Looks good to me.
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>

> 
> diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c
> index b7353f5018b5..4f0ad5ad2722 100644
> --- a/drivers/extcon/extcon-gpio.c
> +++ b/drivers/extcon/extcon-gpio.c
> @@ -83,6 +83,15 @@ static int gpio_extcon_probe(struct platform_device *pdev)
>  	if (!data)
>  		return -ENOMEM;
>  
> +	/*
> +	 * Always checking connector state on resume makes most sense so do this
> +	 * by default.
> +	 *
> +	 * TODO: if parameterization is needed, augment this to use proper device
> +	 * properties or set it up from PM core.
> +	 */
> +	data->check_on_resume = true;
> +
>  	data->gpiod = devm_gpiod_get(dev, "extcon", GPIOD_IN);
>  	if (IS_ERR(data->gpiod))
>  		return PTR_ERR(data->gpiod);
> 

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/8] GPIO extcon modernization Linus Walleij <linus.walleij@linaro.org> - 2017-09-24 17:00 +0200
  [PATCH 3/8] extcon: gpio: Move platform data into state container Linus Walleij <linus.walleij@linaro.org> - 2017-09-24 17:00 +0200
    Re: [PATCH 3/8] extcon: gpio: Move platform data into state  container Chanwoo Choi <cw00.choi@samsung.com> - 2017-09-26 04:10 +0200
  [PATCH 4/8] extcon: gpio: Convert to fully use GPIO descriptor Linus Walleij <linus.walleij@linaro.org> - 2017-09-24 17:10 +0200
    Re: [PATCH 4/8] extcon: gpio: Convert to fully use GPIO descriptor Chanwoo Choi <cw00.choi@samsung.com> - 2017-09-26 04:20 +0200
  [PATCH 7/8] extcon: gpio: Get connector type from device property Linus Walleij <linus.walleij@linaro.org> - 2017-09-24 17:10 +0200
  [PATCH 8/8] extcon: gpio: Always check state on resume Linus Walleij <linus.walleij@linaro.org> - 2017-09-24 17:10 +0200
    Re: [PATCH 8/8] extcon: gpio: Always check state on resume Chanwoo Choi <cw00.choi@samsung.com> - 2017-09-26 04:30 +0200
  [PATCH 5/8] extcon: gpio: Request reasonable interrupts Linus Walleij <linus.walleij@linaro.org> - 2017-09-24 17:10 +0200
    Re: [PATCH 5/8] extcon: gpio: Request reasonable interrupts Chanwoo Choi <cw00.choi@samsung.com> - 2017-09-26 04:30 +0200
  [PATCH 6/8] extcon: gpio: Get debounce setting from device property Linus Walleij <linus.walleij@linaro.org> - 2017-09-24 17:10 +0200
    Re: [PATCH 6/8] extcon: gpio: Get debounce setting from device  property Chanwoo Choi <cw00.choi@samsung.com> - 2017-09-26 04:30 +0200

csiph-web