From: Linus Walleij <linus.walleij@linaro.org>
To: Stefan Eichenberger <eichest@gmail.com>
Cc: nick@shmanahar.org, dmitry.torokhov@gmail.com,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
conor+dt@kernel.org, nicolas.ferre@microchip.com,
alexandre.belloni@bootlin.com, claudiu.beznea@tuxon.dev,
linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Stefan Eichenberger <stefan.eichenberger@toradex.com>
Subject: Re: [PATCH v1 1/2] dt-bindings: input: atmel,maxtouch: add poweroff-in-suspend property
Date: Fri, 8 Dec 2023 15:23:54 +0100 [thread overview]
Message-ID: <CACRpkdao83-nALj2YOq-XHrOh6GEaxufN3Fn+3W52qkL2x+VUQ@mail.gmail.com> (raw)
In-Reply-To: <ZXMV9gzFbc05IEKg@eichest-laptop>
On Fri, Dec 8, 2023 at 2:11 PM Stefan Eichenberger <eichest@gmail.com> wrote:
> > I can't help but wonder: shouldn't that pretty much be the default behaviour
> > if wakeup-source is *not* specified?
> >
> > I.e. the property kind of describes !wakeup-source.
>
> The maxtouch controller has a deep sleep mode which is currently used
> without powering down vdd and vdda. However, because we have a shared
> regulator which powers other peripherals that we want to shut down in
> suspend we need a way to power down vdd and vdda. However, I agree this
> is not really a feature of the device. The feature would basically be
> the internal deep sleep mode.
While it is of no concern to the device tree bindings, Linux regulators
are counting meaning that you need to make all peripherals disable
their regulators and it will come down.
> I didn't want to change the default
> behaviour of the driver, so I added this property but maybe I could
> change it to:
>
> atmel,deep-sleep:
> description: |
> Use the maxtouch deep-sleep mode instead of powering down vdd and
> vdda.
>
> Or to not change the default behaviour:
> atmel,no-deep-sleep:
> description: |
> Do not use the maxtouch deep-sleep mode but power down vdd and vdda
> in suspend.
>
> As I understand the datasheet even if the maxtouch is using its deep
> sleep mode it does not act as a wakeup source.
Do you mean it can still work as a wakeup source in deep sleep mode?
(there is a "not" too much above ...)
> It is just faster in
> waking up because it can keep the configuration in memory.
That sounds like a good reason to have the property, because that
means that if you can control the wakeup latency and specify in the binding
how much in absolute time units it is affected.
I would define it in positive terms instead of reverse "no-deep-sleep"
though such as "atmel,fast-wakeup".
And: If you disable the regulators it will probably *not* be able to wake the
system up, right? And that is just a few lines of code in the driver such as:
go_to_sleep():
if (!wakeup_source):
disable_regulators()
Yours,
Linus Walleij
next prev parent reply other threads:[~2023-12-08 14:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 11:12 [PATCH v1 0/2] Add a property to turn off the max touch controller in suspend mode Stefan Eichenberger
2023-12-07 11:12 ` [PATCH v1 1/2] dt-bindings: input: atmel,maxtouch: add poweroff-in-suspend property Stefan Eichenberger
2023-12-07 16:59 ` Krzysztof Kozlowski
2023-12-08 12:37 ` Stefan Eichenberger
2023-12-08 12:47 ` Krzysztof Kozlowski
2023-12-08 12:54 ` Linus Walleij
2023-12-08 13:11 ` Stefan Eichenberger
2023-12-08 14:23 ` Linus Walleij [this message]
2023-12-08 15:05 ` Stefan Eichenberger
2023-12-08 23:37 ` Dmitry Torokhov
2023-12-09 10:57 ` Conor Dooley
2023-12-07 11:13 ` [PATCH v1 2/2] Input: atmel_mxt_ts - support poweroff in suspend Stefan Eichenberger
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=CACRpkdao83-nALj2YOq-XHrOh6GEaxufN3Fn+3W52qkL2x+VUQ@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=eichest@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nick@shmanahar.org \
--cc=nicolas.ferre@microchip.com \
--cc=robh+dt@kernel.org \
--cc=stefan.eichenberger@toradex.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).