All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/6] Improved sysreset/watchdog uclass integration
@ 2021-11-04  3:55 Samuel Holland
  2021-11-04  3:55 ` [PATCH v3 1/6] sysreset: Add uclass Kconfig dependency to drivers Samuel Holland
                   ` (6 more replies)
  0 siblings, 7 replies; 46+ messages in thread
From: Samuel Holland @ 2021-11-04  3:55 UTC (permalink / raw)
  To: Stefan Roese, u-boot, Jagan Teki, Andre Przywara
  Cc: Bin Meng, Heinrich Schuchardt, Sean Anderson, Simon Glass,
	Samuel Holland

This series hooks up the watchdog uclass to automatically register
watchdog devices for use with sysreset, doing a bit of minor cleanup
along the way.

The goal is for this to replace the sunxi board-level non-DM reset_cpu()
function. I was surprised to find that the wdt_reboot driver requires
its own undocumented device tree node, which references the watchdog
device by phandle. This is problematic for us, because sunxi-u-boot.dtsi
file covers 20 different SoCs with varying watchdog node phandle names.
So it would have required adding a -u-boot.dtsi file for each board.

Hooking things up automatically makes sense to me; this is what Linux
does. However, I put the code behind a new option to avoid surprises for
other platforms.

Changes in v3:
 - Move condition to wdt-uclass.c to fix build errors.
 - Include watchdog name in error message.

Changes in v2:
 - Extend the "if SYSRESET" block to the end of the file.
 - Also make gpio_reboot_probe function static.
 - Rebase on top of 492ee6b8d0e7 (now handle all watchdogs).
 - Added patches 5-6 as an example of how the new option will be used.

Samuel Holland (6):
  sysreset: Add uclass Kconfig dependency to drivers
  sysreset: Mark driver probe functions as static
  sysreset: watchdog: Move watchdog reference to plat data
  watchdog: Automatically register device with sysreset
  sunxi: Avoid duplicate reset_cpu with SYSRESET enabled
  sunxi: Use sysreset framework for poweroff/reset

 arch/arm/Kconfig                     |  3 +++
 arch/arm/mach-sunxi/board.c          |  2 ++
 drivers/sysreset/Kconfig             | 11 ++++++--
 drivers/sysreset/sysreset_gpio.c     |  2 +-
 drivers/sysreset/sysreset_resetctl.c |  2 +-
 drivers/sysreset/sysreset_syscon.c   |  2 +-
 drivers/sysreset/sysreset_watchdog.c | 40 ++++++++++++++++++++++------
 drivers/watchdog/wdt-uclass.c        |  8 ++++++
 include/sysreset.h                   | 10 +++++++
 9 files changed, 67 insertions(+), 13 deletions(-)

-- 
2.32.0


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

end of thread, other threads:[~2021-11-09 15:10 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-04  3:55 [PATCH v3 0/6] Improved sysreset/watchdog uclass integration Samuel Holland
2021-11-04  3:55 ` [PATCH v3 1/6] sysreset: Add uclass Kconfig dependency to drivers Samuel Holland
2021-11-04  7:46   ` Stefan Roese
2021-11-04  3:55 ` [PATCH v3 2/6] sysreset: Mark driver probe functions as static Samuel Holland
2021-11-04  7:46   ` Stefan Roese
2021-11-04  3:55 ` [PATCH v3 3/6] sysreset: watchdog: Move watchdog reference to plat data Samuel Holland
2021-11-04  7:46   ` Stefan Roese
2021-11-04  3:55 ` [PATCH v3 4/6] watchdog: Automatically register device with sysreset Samuel Holland
2021-11-04  7:48   ` Stefan Roese
2021-11-04  9:34     ` Heinrich Schuchardt
2021-11-04  3:55 ` [PATCH v3 5/6] sunxi: Avoid duplicate reset_cpu with SYSRESET enabled Samuel Holland
2021-11-04  7:48   ` Stefan Roese
2021-11-04  3:55 ` [PATCH v3 6/6] sunxi: Use sysreset framework for poweroff/reset Samuel Holland
2021-11-04  7:48   ` Stefan Roese
2021-11-04 10:37 ` [PATCH v3 0/6] Improved sysreset/watchdog uclass integration Stefan Roese
2021-11-04 23:11   ` Andre Przywara
2021-11-05  1:21     ` Stefan Roese
2021-11-05  2:02       ` Simon Glass
2021-11-05 10:04         ` Andre Przywara
2021-11-05 11:14           ` Stefan Roese
2021-11-05 14:21             ` Tom Rini
2021-11-05 16:12               ` Simon Glass
2021-11-05 17:07                 ` Andre Przywara
2021-11-05 19:23                   ` Simon Glass
2021-11-05 18:37                 ` Heinrich Schuchardt
2021-11-05 19:17                   ` Tom Rini
2021-11-05 20:38                     ` Heinrich Schuchardt
2021-11-05 22:56                       ` Tom Rini
2021-11-06  1:52                         ` Andre Przywara
2021-11-06  3:55                           ` Heinrich Schuchardt
2021-11-06 13:53                             ` Tom Rini
2021-11-07 11:18                               ` Heinrich Schuchardt
2021-11-08 15:58                                 ` Simon Glass
2021-11-08 16:05                                   ` Tom Rini
2021-11-08 16:09                                     ` Simon Glass
2021-11-08 16:13                                       ` Tom Rini
2021-11-08 16:17                                     ` Heinrich Schuchardt
2021-11-09  0:09                                       ` Simon Glass
2021-11-09  0:25                                         ` Tom Rini
2021-11-09  1:37                                       ` Andre Przywara
2021-11-09  8:00                                         ` Heinrich Schuchardt
2021-11-09 13:50                                           ` Tom Rini
2021-11-09 14:26                                             ` Andre Przywara
2021-11-09 14:34                                               ` Heinrich Schuchardt
2021-11-09 15:09                                                 ` Grant Likely
2021-11-06 13:52                           ` Tom Rini

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.