linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Vignesh R <vigneshr@ti.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Lee Jones <lee.jones@linaro.org>,
	linux-iio@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH 5/5] Input: ti_am335x_tsc: Mark IRQ as wakeup capable
Date: Wed, 18 Jul 2018 17:06:22 +0000	[thread overview]
Message-ID: <20180718170622.qms254nlvnavfk7q@penguin> (raw)
In-Reply-To: <20180630103318.25355-6-vigneshr@ti.com>

On Sat, Jun 30, 2018 at 04:03:18PM +0530, Vignesh R wrote:
> On AM335x, ti_am335x_tsc can wake up the system from suspend, mark the
> IRQ as wakeup capable, so that device irq is not disabled during system
> suspend.
> 
> Signed-off-by: Vignesh R <vigneshr@ti.com>

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

> ---
>  drivers/input/touchscreen/ti_am335x_tsc.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
> index a4f25a915ffc..9e8684ab48f4 100644
> --- a/drivers/input/touchscreen/ti_am335x_tsc.c
> +++ b/drivers/input/touchscreen/ti_am335x_tsc.c
> @@ -27,6 +27,7 @@
>  #include <linux/of.h>
>  #include <linux/of_device.h>
>  #include <linux/sort.h>
> +#include <linux/pm_wakeirq.h>
>  
>  #include <linux/mfd/ti_am335x_tscadc.h>
>  
> @@ -439,6 +440,9 @@ static int titsc_probe(struct platform_device *pdev)
>  	}
>  
>  	device_init_wakeup(&pdev->dev, true);
> +	err = dev_pm_set_wake_irq(&pdev->dev, ts_dev->irq);
> +	if (err)
> +		dev_err(&pdev->dev, "irq wake enable failed.\n");
>  
>  	titsc_writel(ts_dev, REG_IRQSTATUS, TSC_IRQENB_MASK);
>  	titsc_writel(ts_dev, REG_IRQENABLE, IRQENB_FIFO0THRES);
> @@ -471,6 +475,7 @@ static int titsc_probe(struct platform_device *pdev)
>  	return 0;
>  
>  err_free_irq:
> +	dev_pm_clear_wake_irq(&pdev->dev);
>  	device_init_wakeup(&pdev->dev, false);
>  	free_irq(ts_dev->irq, ts_dev);
>  err_free_mem:
> @@ -484,6 +489,7 @@ static int titsc_remove(struct platform_device *pdev)
>  	struct titsc *ts_dev = platform_get_drvdata(pdev);
>  	u32 steps;
>  
> +	dev_pm_clear_wake_irq(&pdev->dev);
>  	device_init_wakeup(&pdev->dev, false);
>  	free_irq(ts_dev->irq, ts_dev);
>  
> -- 
> 2.18.0
> 

-- 
Dmitry

  reply	other threads:[~2018-07-18 17:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-30 10:33 [PATCH 0/5] ti_am335x_tsc: Enable wakeup capability Vignesh R
2018-06-30 10:33 ` [PATCH 1/5] mfd: ti_am335x_tscadc: Don't mark TSCADC MFD as wakeup capable Vignesh R
2018-07-04  7:38   ` Lee Jones
2018-10-09 10:29   ` Lee Jones
2018-06-30 10:33 ` [PATCH 2/5] Input: ti_am335x_tsc: Mark TSC device as wakeup source Vignesh R
2018-07-18 17:06   ` Dmitry Torokhov
2018-10-09 10:29   ` Lee Jones
2018-06-30 10:33 ` [PATCH 3/5] mfd: ti_am335x_tscadc: Keep ADC interface on if child is wakeup capable Vignesh R
2018-07-04  7:39   ` Lee Jones
2018-10-09 10:30   ` Lee Jones
2018-06-30 10:33 ` [PATCH 4/5] iio: adc: ti_am335x_adc: Disable ADC during suspend unconditionally Vignesh R
2018-06-30 15:18   ` Jonathan Cameron
2018-07-04 14:40     ` Vignesh R
2018-10-09 10:30   ` Lee Jones
2018-06-30 10:33 ` [PATCH 5/5] Input: ti_am335x_tsc: Mark IRQ as wakeup capable Vignesh R
2018-07-18 17:06   ` Dmitry Torokhov [this message]
2018-10-09 10:30   ` Lee Jones
2018-07-17 11:45 ` [PATCH 0/5] ti_am335x_tsc: Enable wakeup capability Vignesh R
2018-07-18  7:47   ` Lee Jones
2018-07-18 17:09     ` Dmitry Torokhov
2018-07-21 18:09       ` Jonathan Cameron
2018-07-23  5:37       ` Lee Jones
2018-07-24 17:33         ` Vignesh R
2018-07-25  5:26           ` Lee Jones
2018-09-28  6:12             ` Vignesh R
2018-10-05  5:11               ` Vignesh R
2018-10-09 10:33 ` [GIT PULL] Immutable branch between MFD, IIO and Input due for the v4.20 merge window Lee Jones

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=20180718170622.qms254nlvnavfk7q@penguin \
    --to=dmitry.torokhov@gmail.com \
    --cc=jic23@kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=vigneshr@ti.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;
as well as URLs for NNTP newsgroup(s).