dm: sysreset: Add a Kconfig option for the 'reset' command
authorBin Meng <bmeng.cn@gmail.com>
Thu, 25 Feb 2021 09:22:52 +0000 (17:22 +0800)
committerPriyanka Jain <priyanka.jain@nxp.com>
Fri, 5 Mar 2021 04:55:43 +0000 (10:25 +0530)
commit5f1a08b6ab1c3923735edb676a4de87df4bb96f7
tree3746f6d31eb5412b252a19997575cbb1098cbbf8
parente022403adb6e4df6dad449322aa9323aa9d16f20
dm: sysreset: Add a Kconfig option for the 'reset' command

sysreset uclass driver provides an implementation of 'reset'
command using the sysreset_ APIs unconditionally. It also
supports the 'poweroff' command using the sysreset_ APIs,
but under a Kconfig option CONFIG_SYSRESET_CMD_POWEROFF.

Let's do the same for the 'reset' command, by introducing a
new Kconfig option CONFIG_SYSRESET_CMD_RESET, and set it to
on by default, to allow a board that don't have a sysreset
reset driver yet, but have a sysreset poweroff driver to
compile without any issue.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
drivers/sysreset/Kconfig
drivers/sysreset/sysreset-uclass.c