From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: "Andreas Kemnade" <andreas@kemnade.info>,
"Tony Lindgren" <tony@atomide.com>,
linux-input@vger.kernel.org,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: Re: [PATCH 20/51] Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
Date: Fri, 4 Oct 2024 04:08:31 -0700 [thread overview]
Message-ID: <Zv_MrzN-rOLK54me@google.com> (raw)
In-Reply-To: <Zv_C4vcdgw6lT-Gx@kekkonen.localdomain>
Hi Sakari,
On Fri, Oct 04, 2024 at 10:26:42AM +0000, Sakari Ailus wrote:
> Hi Andreas,
>
> On Fri, Oct 04, 2024 at 11:55:11AM +0200, Andreas Kemnade wrote:
> > Am Fri, 4 Oct 2024 12:41:23 +0300
> > schrieb Sakari Ailus <sakari.ailus@linux.intel.com>:
> >
> > > pm_runtime_put_autosuspend() will soon be changed to include a call to
> > > pm_runtime_mark_last_busy(). This patch switches the current users to
> > > __pm_runtime_put_autosuspend() which will continue to have the
> > > functionality of old pm_runtime_put_autosuspend().
> > >
> > > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > > ---
> > > drivers/input/keyboard/omap4-keypad.c | 8 ++++----
> > > 1 file changed, 4 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/input/keyboard/omap4-keypad.c
> > > b/drivers/input/keyboard/omap4-keypad.c index
> > > 040b340995d8..cc8d77601fc7 100644 ---
> > > a/drivers/input/keyboard/omap4-keypad.c +++
> > > b/drivers/input/keyboard/omap4-keypad.c @@ -196,7 +196,7 @@ static
> > > irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id)
> > > kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
> > > pm_runtime_mark_last_busy(dev);
> > > - pm_runtime_put_autosuspend(dev);
> > > + __pm_runtime_put_autosuspend(dev);
> > >
> > > return IRQ_HANDLED;
> > > }
> > > @@ -234,7 +234,7 @@ static int omap4_keypad_open(struct input_dev
> > > *input)
> > > out:
> > > pm_runtime_mark_last_busy(dev);
> > > - pm_runtime_put_autosuspend(dev);
> > > + __pm_runtime_put_autosuspend(dev);
> > >
> > hmm, if pm_runtime_put_autosuspend() will include the call to
> > pm_runtime_mark_last_busy(), then why is this change needed?
> > After the change, the mark_last_busy could be removed.
>
> It could, in which case we'd be living with pm_runtime_mark_last_busy()
> called twice, for some time, and for some code, possibly even in a release
> kernel, depending on how well the patches "stick". It likely wouldn't be
> harmful. Still, to avoid making functional changes to more than 350 files I
> know little about, I've instead posted this set to prepare for
> pm_runtime_put_autosuspend() functionality change while keeping the
> functionality of the code exactly the same.
pm_runtime_mark_last_busy() is pretty cheap (it fetches current time and
stores it in the device power-related structure), so doing it twice
back-to-back should not be a problem.
I would prefer what Andreas suggested in the first place: remove call to
pm_runtime_mark_last_busy() once pm_runtime_put_autosuspend() does it
for us. I'd be OK with such change being merged through the same tree
that changes to pm_runtime_put_autosuspend() will be merged through.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2024-10-04 11:08 UTC|newest]
Thread overview: 122+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-04 9:41 [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend() Sakari Ailus
2024-10-04 9:41 ` Sakari Ailus
2024-10-04 9:41 ` Sakari Ailus
2024-10-04 9:41 ` Sakari Ailus
2024-10-04 9:41 ` [PATCH 04/51] hwrng: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 03/51] bus: sunxi-rsb: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 02/51] bluetooth: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 01/51] accel/ivpu: " Sakari Ailus
2024-10-04 9:51 ` Jacek Lawrynowicz
2024-10-04 9:41 ` [PATCH 05/51] clk: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 10/51] drm/nouveau: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 12/51] drm/panfrost: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 11/51] drm/radeon: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 09/51] drm/amd: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 08/51] gpio: " Sakari Ailus
2024-10-04 9:55 ` Bartosz Golaszewski
2024-10-04 10:08 ` Sakari Ailus
2024-10-04 9:41 ` [PATCH 06/51] crypto: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 07/51] dmaengine: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 14/51] HSI: omap_ssi_port: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 17/51] i3c: master: svc: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 18/51] i3c: dw: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 16/51] i2c: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 15/51] stm class: " Sakari Ailus
2024-10-24 10:59 ` Alexander Shishkin
2024-10-04 9:41 ` [PATCH 13/51] drivers: drm: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 25/51] media: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 19/51] iio: " Sakari Ailus
2024-10-04 13:45 ` Jonathan Cameron
2024-10-04 9:41 ` [PATCH 21/51] Input: cs40l50: " Sakari Ailus
2024-10-04 11:09 ` Dmitry Torokhov
2024-10-04 9:41 ` [PATCH 20/51] Input: omap4-keypad: " Sakari Ailus
2024-10-04 9:55 ` Andreas Kemnade
2024-10-04 10:26 ` Sakari Ailus
2024-10-04 10:54 ` Andreas Kemnade
2024-10-04 11:08 ` Dmitry Torokhov [this message]
2024-10-04 9:41 ` [PATCH 24/51] mailbox: mtk-cmdq-mailbox: " Sakari Ailus
2024-10-07 14:27 ` Matthias Brugger
2024-10-04 9:41 ` [PATCH 22/51] iommu/arm-smmu: " Sakari Ailus
2024-10-10 15:33 ` Pranjal Shrivastava
2024-10-23 16:48 ` Will Deacon
2024-10-24 15:26 ` Pranjal Shrivastava
2024-10-04 9:41 ` [PATCH 23/51] irqchip/imx-irqsteer: " Sakari Ailus
2024-10-06 19:52 ` Thomas Gleixner
2024-10-04 9:41 ` [PATCH 29/51] mtd: rawnand: gpmi: " Sakari Ailus
2024-10-04 11:12 ` Miquel Raynal
2024-10-04 9:41 ` [PATCH 28/51] mmc: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 27/51] mei: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 26/51] mfd: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 30/51] net: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 37/51] regulator: stm32-vrefbuf: " Sakari Ailus
2024-10-04 11:34 ` Mark Brown
2024-10-04 9:41 ` [PATCH 36/51] pwm: img: " Sakari Ailus
2024-10-04 12:38 ` Uwe Kleine-König
2024-10-04 9:41 ` [PATCH 35/51] power: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 34/51] phy: ti: phy-twl4030-usb: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 32/51] PCI/portdrv: " Sakari Ailus
2024-10-04 9:45 ` Ilpo Järvinen
2024-10-04 9:41 ` [PATCH 33/51] phy: motorola: phy-mapphone-mdm6600: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 31/51] nfc: trf7970a: " Sakari Ailus
2024-10-04 14:05 ` Krzysztof Kozlowski
2024-10-04 9:41 ` [PATCH 38/51] remoteproc: omap: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 40/51] soundwire: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 41/51] spi: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 42/51] staging: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 39/51] slimbus: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 44/51] serial: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 46/51] w1: omap-hdq: " Sakari Ailus
2024-10-04 14:05 ` Krzysztof Kozlowski
2024-10-04 9:41 ` [PATCH 48/51] ALSA: hda: " Sakari Ailus
2024-10-04 10:56 ` Takashi Iwai
2024-10-04 23:57 ` Mark Brown
2024-10-04 9:41 ` [PATCH 49/51] ASoC: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 43/51] thunderbolt: " Sakari Ailus
2024-10-04 10:07 ` Mika Westerberg
2024-10-04 9:41 ` [PATCH 45/51] usb: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 50/51] ALSA: intel_hdmi: " Sakari Ailus
2024-10-04 9:41 ` [PATCH 51/51] soc: apple: mailbox: " Sakari Ailus
2024-10-04 14:38 ` [PATCH 00/51] treewide: " Ulf Hansson
2024-10-04 14:38 ` Ulf Hansson
2024-10-04 14:38 ` Ulf Hansson
2024-10-04 14:38 ` Ulf Hansson
2024-10-07 18:49 ` Laurent Pinchart
2024-10-07 18:49 ` Laurent Pinchart
2024-10-07 18:49 ` Laurent Pinchart
2024-10-07 18:49 ` Laurent Pinchart
2024-10-07 22:08 ` Ulf Hansson
2024-10-07 22:08 ` Ulf Hansson
2024-10-07 22:08 ` Ulf Hansson
2024-10-07 22:08 ` Ulf Hansson
2024-10-07 22:25 ` Laurent Pinchart
2024-10-07 22:25 ` Laurent Pinchart
2024-10-07 22:25 ` Laurent Pinchart
2024-10-07 22:25 ` Laurent Pinchart
2024-10-07 22:34 ` Ulf Hansson
2024-10-07 22:34 ` Ulf Hansson
2024-10-07 22:34 ` Ulf Hansson
2024-10-07 22:34 ` Ulf Hansson
2024-10-08 18:24 ` Rafael J. Wysocki
2024-10-08 18:24 ` Rafael J. Wysocki
2024-10-08 18:24 ` Rafael J. Wysocki
2024-10-08 18:24 ` Rafael J. Wysocki
2024-10-09 10:20 ` Rafael J. Wysocki
2024-10-09 10:20 ` Rafael J. Wysocki
2024-10-09 10:20 ` Rafael J. Wysocki
2024-10-09 10:20 ` Rafael J. Wysocki
2024-10-09 10:27 ` Ulf Hansson
2024-10-09 10:27 ` Ulf Hansson
2024-10-09 10:27 ` Ulf Hansson
2024-10-09 10:27 ` Ulf Hansson
2024-10-09 12:48 ` Richard Fitzgerald
2024-10-09 12:48 ` Richard Fitzgerald
2024-10-09 12:48 ` Richard Fitzgerald
2024-10-09 12:48 ` Richard Fitzgerald
2024-10-09 13:34 ` Rafael J. Wysocki
2024-10-09 13:34 ` Rafael J. Wysocki
2024-10-09 13:34 ` Rafael J. Wysocki
2024-10-09 13:34 ` Rafael J. Wysocki
2024-10-08 20:38 ` Uwe Kleine-König
2024-10-08 20:38 ` Uwe Kleine-König
2024-10-08 20:38 ` Uwe Kleine-König
2024-10-08 20:38 ` Uwe Kleine-König
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=Zv_MrzN-rOLK54me@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=andreas@kemnade.info \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-input@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=tony@atomide.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 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.