public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] input: gpio-keys - fix pm ordering
@ 2023-04-27 22:16 Doug Berger
  2023-04-27 22:16 ` [RFC PATCH 1/3] input: gpio-keys - use device_pm_move_to_tail Doug Berger
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Doug Berger @ 2023-04-27 22:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki, Dmitry Torokhov
  Cc: Lad Prabhakar, Gergo Koteles, Jonathan Cameron, Andy Shevchenko,
	Dan Williams, Hans de Goede, Thomas Gleixner, Kees Cook,
	Kishon Vijay Abraham I, Saravana Kannan, Florian Fainelli,
	linux-kernel, linux-input, Doug Berger

Commit 52cdbdd49853 ("driver core: correct device's shutdown
order") allowed for proper sequencing of the gpio-keys device
shutdown callbacks by moving the device to the end of the
devices_kset list at probe which was delayed by child
dependencies.

However, commit 722e5f2b1eec ("driver core: Partially revert
"driver core: correct device's shutdown order"") removed this
portion of that commit causing a reversion in the gpio-keys
behavior which can prevent waking from shutdown.

This RFC is an attempt to find a better solution for properly
creating gpio-keys device links to ensure its suspend/resume and
shutdown services are invoked before those of its suppliers.

The first patch here is pretty brute force but simple and has
the advantage that it should be easily backportable to the
versions where the regression first occurred.

The second patch is perhaps better in spirit though still a bit
inelegant, but it can only be backported to versions of the
kernel that contain the commit in its 'Fixes:' tag. That isn't
really a valid 'Fixes:' tag since that commit did not cause the
regression, but it does represent how far the patch could be
backported.

Both commits shouldn't really exist in the same kernel so the
third patch reverts the first in an attempt to make that clear
(though it may be a source of confusion for some).

Hopefully someone with a better understanding of device links
will see a less intrusive way to automatically capture these
dependencies for parent device drivers that implement the
functions of child node devices.

Doug Berger (3):
  input: gpio-keys - use device_pm_move_to_tail
  input: gpio-keys - add device links of children
  Revert "input: gpio-keys - use device_pm_move_to_tail"

 drivers/input/keyboard/gpio_keys.c | 7 +++++++
 1 file changed, 7 insertions(+)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-05-03 22:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-27 22:16 [RFC PATCH 0/3] input: gpio-keys - fix pm ordering Doug Berger
2023-04-27 22:16 ` [RFC PATCH 1/3] input: gpio-keys - use device_pm_move_to_tail Doug Berger
2023-04-27 22:16 ` [RFC PATCH 2/3] input: gpio-keys - add device links of children Doug Berger
2023-04-27 22:16 ` [RFC PATCH 3/3] Revert "input: gpio-keys - use device_pm_move_to_tail" Doug Berger
2023-04-28  4:47   ` Greg Kroah-Hartman
2023-04-28 11:40     ` Rafael J. Wysocki
2023-04-28 17:22       ` Doug Berger
2023-05-01 20:40 ` [RFC PATCH 0/3] input: gpio-keys - fix pm ordering Saravana Kannan
2023-05-03  2:18   ` Saravana Kannan
2023-05-03 22:20     ` Doug Berger
2023-05-03 22:31       ` Saravana Kannan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox