Support reboot power-off driver as module
cover Support reboot power-off driver as module
This series supports reboot power-off driver as a module by exporting reboot_mode symbol.
Elliot Berman (2):
reboot: Export reboot_mode
power: reset: Enable tristate on restart power-off driver
drivers/power/reset/Kconfig | 2 +- kernel/reboot.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH 1/2 reboot: Export reboot_mode
Export reboot_mode to support DLKMs wishing to modify reboot_mode.
--- kernel/reboot.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/reboot.c +2 -0
@@ -32,7 +32,9 @@ EXPORT_SYMBOL(cad_pid);#define DEFAULT_REBOOT_MODE #endif enum reboot_mode reboot_mode DEFAULT_REBOOT_MODE; +EXPORT_SYMBOL (reboot_mode);enum reboot_mode panic_reboot_mode =REBOOT_UNDEFINED ; +EXPORT_SYMBOL (panic_reboot_mode);/* * This variable is used privately to keep track of whether or not
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH 1/2] reboot: Export reboot_mode
Quoted 1 line · Elliot Berman
Export
reboot_modeto support DLKMs wishing to modifyreboot_mode.
"DLKMs"? What's that?
A kernel module?
Quoted 11 lines
Signed-off-by Elliot Berman <[email protected]>--- kernel/reboot.c | 2 ++ 1 file changed, 2 insertions(+)kernel/reboot.c +0
-0
kernel/reboot.c EXPORT_SYMBOL(cad_pid); · line 37
Quoted 6 lines
kernel/reboot.c +2
-0@@ -32,7 +32,9 @@ EXPORT_SYMBOL(cad_pid);#define DEFAULT_REBOOT_MODE #endif enum reboot_mode reboot_mode DEFAULT_REBOOT_MODE; +EXPORT_SYMBOL (reboot_mode);enum reboot_mode panic_reboot_mode =REBOOT_UNDEFINED ; +EXPORT_SYMBOL (panic_reboot_mode);
EXPORT_SYMBOL_GPL() perhaps?
thanks,
greg k-h
Re: [PATCH 1/2] reboot: Export reboot_mode
Quoted 5 lines · Greg KH
Quoted 5 lines
kernel/reboot.c +0
-0@@ -32,7 +32,9 @@ EXPORT_SYMBOL(cad_pid);
Quoted 8 lines
kernel/reboot.c EXPORT_SYMBOL(cad_pid); · line 37
Quoted 6 lines
kernel/reboot.c +2
-0#define DEFAULT_REBOOT_MODE #endif enum reboot_mode reboot_mode DEFAULT_REBOOT_MODE; +EXPORT_SYMBOL (reboot_mode);enum reboot_mode panic_reboot_mode =REBOOT_UNDEFINED ; +EXPORT_SYMBOL (panic_reboot_mode);
EXPORT_SYMBOL_GPL()perhaps?
Absolutely. But then again drivers/power/reset/reboot-mode.c, which he wants to make modular in patch 2 is just a trivial abstraction that avoids drivers directly poking into these values. I really don't see a point to make that modular to start with.
PATCH 2/2 power: reset: Enable tristate on restart power-off driver
In reply to Elliot BermanSince reboot_mode is an exported symbol, restart power-off driver can be compiled as module.
--- drivers/power/reset/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/Kconfig +1 -1
@@ -150,7 +150,7 @@ config POWER_RESET_QNAP Say Y if you have a QNAP NAS. config POWER_RESET_RESTART - bool "Restart power-off driver" + tristate "Restart power-off driver" help Some boards don't actually have the ability to power off. Instead they restart, and u-boot holds the SoC until the
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project