
On 17 July 2018 at 06:59, Michal Simek michal.simek@xilinx.com wrote:
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
Changes in v2:
- Record file in MAINTAINERS
- Fix comment reported by Simon
- Kconfig fragment fix - use reset instead of restart
MAINTAINERS | 1 + drivers/sysreset/Kconfig | 8 ++++++ drivers/sysreset/Makefile | 1 + drivers/sysreset/sysreset_gpio.c | 59 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 drivers/sysreset/sysreset_gpio.c
Reviewed-by: Simon Glass sjg@chromium.org