All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Maximilian Weigand <mweigand@mweigand.net>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org,
	Alistair Francis <alistair@alistair23.me>
Subject: Re: [PATCH v2 4/6] Input: cyttsp5 - properly initialize the device as a pm wakeup device
Date: Mon, 1 May 2023 17:14:53 -0700	[thread overview]
Message-ID: <ZFBV/ZfxumlQZHGk@google.com> (raw)
In-Reply-To: <20230501113010.891786-5-mweigand@mweigand.net>

Hi Maximilian,

On Mon, May 01, 2023 at 01:30:08PM +0200, Maximilian Weigand wrote:
> When used as a wakeup source the driver should be properly registered
> with the pm system using device_init_wakeup.

This is an I2C device and I2C core already handles setting up a device
as a wakeup source, this patch is not needed as far as I can tell.

> 
> Signed-off-by: Maximilian Weigand <mweigand@mweigand.net>
> Reviewed-by: Alistair Francis <alistair@alistair23.me>
> ---
>  drivers/input/touchscreen/cyttsp5.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/input/touchscreen/cyttsp5.c b/drivers/input/touchscreen/cyttsp5.c
> index 55abf568bdf6..f701125357f0 100644
> --- a/drivers/input/touchscreen/cyttsp5.c
> +++ b/drivers/input/touchscreen/cyttsp5.c
> @@ -830,6 +830,9 @@ static int cyttsp5_probe(struct device *dev, struct regmap *regmap, int irq,
>  		return error;
>  	}
>  
> +	if (device_property_read_bool(dev, "wakeup-source"))
> +		device_init_wakeup(dev, true);
> +
>  	error = cyttsp5_startup(ts);
>  	if (error) {
>  		dev_err(ts->dev, "Fail initial startup r=%d\n", error);
> -- 
> 2.39.2
> 

Thanks.

-- 
Dmitry

  reply	other threads:[~2023-05-02  0:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-01 11:30 [PATCH v2 0/6] Small fixes to the cyttsp5 touchscreen driver Maximilian Weigand
2023-05-01 11:30 ` [PATCH v2 1/6] Input: cyttsp5 - fix array length Maximilian Weigand
2023-05-02  0:15   ` Dmitry Torokhov
2023-05-01 11:30 ` [PATCH v2 2/6] Input: cyttsp5 - remove unused code Maximilian Weigand
2023-05-02  0:15   ` Dmitry Torokhov
2023-05-01 11:30 ` [PATCH v2 3/6] dt-bindings: input: cypress,tt21000 - fix interrupt type in dts example Maximilian Weigand
2023-05-02  0:24   ` Dmitry Torokhov
2023-05-02 14:23     ` Maximilian Weigand
2023-05-02 20:51       ` Dmitry Torokhov
2023-05-01 11:30 ` [PATCH v2 4/6] Input: cyttsp5 - properly initialize the device as a pm wakeup device Maximilian Weigand
2023-05-02  0:14   ` Dmitry Torokhov [this message]
2023-05-01 11:30 ` [PATCH v2 5/6] dt-bindings: input: cypress,tt21000 - add wakeup-source entry to documentation Maximilian Weigand
2023-05-02  0:28   ` Dmitry Torokhov
2023-05-01 11:30 ` [PATCH v2 6/6] Input: cyttsp5 - implement proper sleep and wakeup procedures Maximilian Weigand
2023-05-02  0:22   ` Dmitry Torokhov
2023-05-02 14:21     ` Maximilian Weigand

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=ZFBV/ZfxumlQZHGk@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=alistair@alistair23.me \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mweigand@mweigand.net \
    --cc=robh+dt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.