linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Kemnade <andreas@kemnade.info>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"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 12:54:35 +0200	[thread overview]
Message-ID: <20241004125435.763c49b3@akair> (raw)
In-Reply-To: <Zv_C4vcdgw6lT-Gx@kekkonen.localdomain>

Am Fri, 4 Oct 2024 10:26:42 +0000
schrieb Sakari Ailus <sakari.ailus@linux.intel.com>:

> 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.
> 
> Also added Ilpo who had a similar question.
> 
Ah, ok, I did not get the cover letter.

> Once this conversion is done and pm_runtime_put_autosuspend()
> re-purposed, I'll post another set to merge the calls to
> __pm_runtime_put_autosuspend() and pm_runtime_mark_last_busy()

with that all this makes sense to me. So:

Reviewed-by: Andreas Kemnade <andreas@kemnade.info>

  reply	other threads:[~2024-10-04 10:54 UTC|newest]

Thread overview: 19+ 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 ` [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 [this message]
2024-10-04 11:08       ` Dmitry Torokhov
2024-10-04 14:38 ` [PATCH 00/51] treewide: " Ulf Hansson
2024-10-07 18:49   ` Laurent Pinchart
2024-10-07 22:08     ` Ulf Hansson
2024-10-07 22:25       ` Laurent Pinchart
2024-10-07 22:34         ` Ulf Hansson
2024-10-08 18:24           ` Rafael J. Wysocki
2024-10-09 10:20             ` Rafael J. Wysocki
2024-10-09 10:27             ` Ulf Hansson
2024-10-09 12:48             ` Richard Fitzgerald
2024-10-09 13:34               ` Rafael J. Wysocki
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=20241004125435.763c49b3@akair \
    --to=andreas@kemnade.info \
    --cc=dmitry.torokhov@gmail.com \
    --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 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).