public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: rjying <rjying@gmail.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
	linux-kernel@vger.kernel.org, Barry Song <21cnbao@gmail.com>,
	RongJun Ying <Rongjun.Ying@csr.com>,
	Binghua Duan <Binghua.Duan@csr.com>
Subject: Re: [PATCH 1/1] extcon: gpio: Add power resume support
Date: Mon, 23 Dec 2013 13:20:00 +0900	[thread overview]
Message-ID: <52B7B9F0.1020801@samsung.com> (raw)
In-Reply-To: <1387526987-12455-1-git-send-email-rongjun.ying@csr.com>

On 12/20/2013 05:09 PM, rjying wrote:
> From: Rongjun Ying <rongjun.ying@csr.com>
> 
> After system resume, need send extcon uevent to userspace

Why did extcon send uevent after wakeup from suspend?

If extcon cable is attatched or detached on suspend state,
Kernel can detect the interrupt about changed state of extcon.
So, kernel would execute proper operation about interrupt
after wakeup from suspend state.

I think it isn't necessary.

Thanks,
Chanwoo Choi

> 
> Change-Id: I32a9e1c6646035f95765bba79a7acaccb8ce45a7
> 
> Signed-off-by: Rongjun Ying <rongjun.ying@csr.com>
> ---
>  drivers/extcon/extcon-gpio.c |   17 +++++++++++++++++
>  1 files changed, 17 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c
> index 7e0dff5..d916522 100644
> --- a/drivers/extcon/extcon-gpio.c
> +++ b/drivers/extcon/extcon-gpio.c
> @@ -159,12 +159,29 @@ static int gpio_extcon_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +#ifdef CONFIG_PM_SLEEP
> +static int gpio_extcon_resume(struct device *dev)
> +{
> +	struct gpio_extcon_data *extcon_data;
> +
> +	extcon_data = dev_get_drvdata(dev);
> +	queue_delayed_work(system_power_efficient_wq, &extcon_data->work,
> +			      extcon_data->debounce_jiffies);
> +	return 0;
> +}
> +#endif
> +
> +static const struct dev_pm_ops gpio_extcon_pm_ops = {
> +	SET_SYSTEM_SLEEP_PM_OPS(NULL, gpio_extcon_resume)
> +};
> +
>  static struct platform_driver gpio_extcon_driver = {
>  	.probe		= gpio_extcon_probe,
>  	.remove		= gpio_extcon_remove,
>  	.driver		= {
>  		.name	= "extcon-gpio",
>  		.owner	= THIS_MODULE,
> +		.pm = &gpio_extcon_pm_ops,
>  	},
>  };
>  
> 


  reply	other threads:[~2013-12-23  4:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20  8:09 [PATCH 1/1] extcon: gpio: Add power resume support rjying
2013-12-23  4:20 ` Chanwoo Choi [this message]
2013-12-23  6:10   ` Barry Song
2013-12-23  6:34     ` Chanwoo Choi
2013-12-23  7:36       ` Barry Song
2013-12-23  7:56         ` Chanwoo Choi
2013-12-23  8:13           ` Barry Song
2013-12-23  8:26             ` Chanwoo Choi
2013-12-23  8:35               ` Barry Song

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=52B7B9F0.1020801@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=21cnbao@gmail.com \
    --cc=Binghua.Duan@csr.com \
    --cc=Rongjun.Ying@csr.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=rjying@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox