]> git.dujemihanovic.xyz Git - u-boot.git/commit
reboot-mode: read the boot mode from GPIOs status
authorNandor Han <nandor.han@vaisala.com>
Thu, 10 Jun 2021 13:56:44 +0000 (16:56 +0300)
committerTom Rini <trini@konsulko.com>
Fri, 23 Jul 2021 14:16:39 +0000 (10:16 -0400)
commitf9db2f16cb6fc7b6d05b0e70de65881bc97ba5c2
tree9058e40bb65185f1367697ce8cf33479a23362dc
parent2541ce2c1af87f74a9feb35a1cbfc20ff8d04e4b
reboot-mode: read the boot mode from GPIOs status

A use case for controlling the boot mode is when the user wants
to control the device boot by pushing a button without needing to
go in user-space.

Add a new backed for reboot mode where GPIOs are used to control the
reboot-mode. The driver is able to scan a predefined list of GPIOs
and return the magic value. Having the modes associated with
the magic value generated based on the GPIO values, allows the
reboot mode uclass to select the proper mode.

Signed-off-by: Nandor Han <nandor.han@vaisala.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/sandbox/dts/test.dts
configs/sandbox_defconfig
doc/device-tree-bindings/reboot-mode/reboot-mode-gpio.txt [new file with mode: 0644]
drivers/reboot-mode/Kconfig
drivers/reboot-mode/Makefile
drivers/reboot-mode/reboot-mode-gpio.c [new file with mode: 0644]
include/reboot-mode/reboot-mode-gpio.h [new file with mode: 0644]
test/dm/Makefile
test/dm/reboot-mode.c [new file with mode: 0644]