[U-Boot] [PATCH v2] sysreset: Add support for gpio-restart
Simon Glass
sjg at chromium.org
Thu Jul 19 01:32:08 UTC 2018
On 17 July 2018 at 06:59, Michal Simek <michal.simek at 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 at xilinx.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
> Reviewed-by: Simon Glass <sjg at 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 at chromium.org>
More information about the U-Boot
mailing list