All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/6] Introduce power off call chain API
@ 2021-10-07  6:02 Dmitry Osipenko
  2021-10-07  6:02 ` [PATCH v1 1/6] notifier: Add blocking_notifier_call_chain_empty() Dmitry Osipenko
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Dmitry Osipenko @ 2021-10-07  6:02 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Lee Jones, Rafael J . Wysocki,
	Mark Brown, Andrew Morton, Guenter Roeck, Russell King,
	Daniel Lezcano, Andy Shevchenko, Ulf Hansson
  Cc: linux-pm, linux-kernel, linux-tegra

Introduce power off call chain API that is inspired by the restart API.
It allows to have multiple power off handlers invoked along the chain
until system is powered off. For the starter this series converts couple
NVIDIA Tegra drivers to the new API. Existing pm_power_off() method
stays around and may be removed once all users will adopt the new API.

There were couple attempts in the past to add power off API from
Guenter Roeck and Thierry Reding, but they were never completed. This
is a somewhat simplified version which doesn't try to convert whole kernel
to the new API at once, but solves immediate practical problem that we
have on Nexus 7 Android tablet where device needs to chain power off
methods.

Dmitry Osipenko (6):
  notifier: Add blocking_notifier_call_chain_empty()
  kernel: Add power off handler call chain API
  kernel: Add devm_register_restart_handler()
  mfd: max77620: Use power off call chain API
  soc/tegra: pmc: Use devm_register_restart_handler()
  soc/tegra: pmc: Add power off handler

 drivers/mfd/max77620.c       |  22 ++++--
 drivers/soc/tegra/pmc.c      |  62 ++++++++++++----
 include/linux/mfd/max77620.h |   2 +
 include/linux/notifier.h     |   2 +
 include/linux/reboot.h       |   7 ++
 kernel/notifier.c            |  14 ++++
 kernel/reboot.c              | 138 ++++++++++++++++++++++++++++++++++-
 7 files changed, 225 insertions(+), 22 deletions(-)

-- 
2.32.0


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

end of thread, other threads:[~2021-10-19 20:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07  6:02 [PATCH v1 0/6] Introduce power off call chain API Dmitry Osipenko
2021-10-07  6:02 ` [PATCH v1 1/6] notifier: Add blocking_notifier_call_chain_empty() Dmitry Osipenko
2021-10-07  6:02 ` [PATCH v1 2/6] kernel: Add power off handler call chain API Dmitry Osipenko
2021-10-07  6:02 ` [PATCH v1 3/6] kernel: Add devm_register_restart_handler() Dmitry Osipenko
2021-10-07  6:02 ` [PATCH v1 4/6] mfd: max77620: Use power off call chain API Dmitry Osipenko
2021-10-19 15:31   ` Lee Jones
2021-10-19 20:51     ` Dmitry Osipenko
2021-10-07  6:02 ` [PATCH v1 5/6] soc/tegra: pmc: Use devm_register_restart_handler() Dmitry Osipenko
2021-10-07  6:02 ` [PATCH v1 6/6] soc/tegra: pmc: Add power off handler Dmitry Osipenko
2021-10-07  7:18 ` [PATCH v1 0/6] Introduce power off call chain API Andy Shevchenko
2021-10-07  8:52   ` Dmitry Osipenko
2021-10-07  9:11     ` Andy Shevchenko
2021-10-07 10:11       ` Dmitry Osipenko

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.