]> git.baikalelectronics.ru Git - uboot.git/commit
sysreset: Add support for gpio-restart
authorMichal Simek <michal.simek@xilinx.com>
Fri, 13 Jul 2018 09:04:56 +0000 (11:04 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 19 Jul 2018 08:49:55 +0000 (10:49 +0200)
commit4e21b912e115b565dffc507b996d051e716ea127
tree39b8280cee5607447505728a07dcad51e205dc5d
parent28311dd508aed4cb37c0e047ba2c5733b6bb3136
sysreset: Add support for gpio-restart

The Linux kernel has binding for gpio-restart node.
This patch is adding basic support without supporting any optional
properties.
This driver was tested on Microblaze system where gpio is connected to
SoC reset logic.
Output value is handled via gpios cells values.

In gpio_reboot_request() set_value is writing 1 because
dm_gpio_set_value() is capable to changing it when it is ACTIVE_LOW.
...
if (desc->flags & GPIOD_ACTIVE_LOW)
value = !value;
...

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
MAINTAINERS
drivers/sysreset/Kconfig
drivers/sysreset/Makefile
drivers/sysreset/sysreset_gpio.c [new file with mode: 0644]