LKML Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2 0/2] Support reboot power-off driver as module
@ 2019-11-08 23:40 Elliot Berman
  2019-11-08 23:40 ` [PATCH v2 1/2] reboot: Export reboot_mode Elliot Berman
  2019-11-08 23:40 ` [PATCH v2 2/2] power: reset: Enable tristate on restart power-off driver Elliot Berman
  0 siblings, 2 replies; 5+ messages in thread
From: Elliot Berman @ 2019-11-08 23:40 UTC (permalink / raw)
  To: sre, tkjos, gregkh
  Cc: tsoni, rananta, bjorn.andersson, linux-kernel, linux-pm, Elliot Berman

This series supports reboot power-off driver as a module by exporting
reboot_mode symbol.

Changes since V1:
 - EXPORT_SYMBOL -> EXPORT_SYMBOL_GPL

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(-)

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/2] reboot: Export reboot_mode
  2019-11-08 23:40 [PATCH v2 0/2] Support reboot power-off driver as module Elliot Berman
@ 2019-11-08 23:40 ` Elliot Berman
  2019-11-09  0:18   ` Bjorn Andersson
  2019-11-09  8:38   ` Greg KH
  2019-11-08 23:40 ` [PATCH v2 2/2] power: reset: Enable tristate on restart power-off driver Elliot Berman
  1 sibling, 2 replies; 5+ messages in thread
From: Elliot Berman @ 2019-11-08 23:40 UTC (permalink / raw)
  To: sre, tkjos, gregkh
  Cc: tsoni, rananta, bjorn.andersson, linux-kernel, linux-pm, Elliot Berman

Export reboot_mode to support kernel modules wishing to modify reboot_mode.

Signed-off-by: Elliot Berman <eberman@codeaurora.org>
---
 kernel/reboot.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/reboot.c b/kernel/reboot.c
index c4d472b..b1fbc22 100644
--- a/kernel/reboot.c
+++ b/kernel/reboot.c
@@ -32,7 +32,9 @@ EXPORT_SYMBOL(cad_pid);
 #define DEFAULT_REBOOT_MODE
 #endif
 enum reboot_mode reboot_mode DEFAULT_REBOOT_MODE;
+EXPORT_SYMBOL_GPL(reboot_mode);
 enum reboot_mode panic_reboot_mode = REBOOT_UNDEFINED;
+EXPORT_SYMBOL_GPL(panic_reboot_mode);
 
 /*
  * This variable is used privately to keep track of whether or not
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 2/2] power: reset: Enable tristate on restart power-off driver
  2019-11-08 23:40 [PATCH v2 0/2] Support reboot power-off driver as module Elliot Berman
  2019-11-08 23:40 ` [PATCH v2 1/2] reboot: Export reboot_mode Elliot Berman
@ 2019-11-08 23:40 ` Elliot Berman
  1 sibling, 0 replies; 5+ messages in thread
From: Elliot Berman @ 2019-11-08 23:40 UTC (permalink / raw)
  To: sre, tkjos, gregkh
  Cc: tsoni, rananta, bjorn.andersson, linux-kernel, linux-pm, Elliot Berman

Since reboot_mode is an exported symbol, restart power-off driver can be
compiled as module.

Signed-off-by: Elliot Berman <eberman@codeaurora.org>
---
 drivers/power/reset/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
index a564237..8db1d9d 100644
--- a/drivers/power/reset/Kconfig
+++ b/drivers/power/reset/Kconfig
@@ -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
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/2] reboot: Export reboot_mode
  2019-11-08 23:40 ` [PATCH v2 1/2] reboot: Export reboot_mode Elliot Berman
@ 2019-11-09  0:18   ` Bjorn Andersson
  2019-11-09  8:38   ` Greg KH
  1 sibling, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2019-11-09  0:18 UTC (permalink / raw)
  To: Elliot Berman; +Cc: sre, tkjos, gregkh, tsoni, rananta, linux-kernel, linux-pm

On Fri 08 Nov 15:40 PST 2019, Elliot Berman wrote:

> Export reboot_mode to support kernel modules wishing to modify reboot_mode.
> 

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> Signed-off-by: Elliot Berman <eberman@codeaurora.org>
> ---
>  kernel/reboot.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/reboot.c b/kernel/reboot.c
> index c4d472b..b1fbc22 100644
> --- a/kernel/reboot.c
> +++ b/kernel/reboot.c
> @@ -32,7 +32,9 @@ EXPORT_SYMBOL(cad_pid);
>  #define DEFAULT_REBOOT_MODE
>  #endif
>  enum reboot_mode reboot_mode DEFAULT_REBOOT_MODE;
> +EXPORT_SYMBOL_GPL(reboot_mode);
>  enum reboot_mode panic_reboot_mode = REBOOT_UNDEFINED;
> +EXPORT_SYMBOL_GPL(panic_reboot_mode);
>  
>  /*
>   * This variable is used privately to keep track of whether or not
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/2] reboot: Export reboot_mode
  2019-11-08 23:40 ` [PATCH v2 1/2] reboot: Export reboot_mode Elliot Berman
  2019-11-09  0:18   ` Bjorn Andersson
@ 2019-11-09  8:38   ` Greg KH
  1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2019-11-09  8:38 UTC (permalink / raw)
  To: Elliot Berman
  Cc: sre, tkjos, tsoni, rananta, bjorn.andersson, linux-kernel, linux-pm

On Fri, Nov 08, 2019 at 03:40:51PM -0800, Elliot Berman wrote:
> Export reboot_mode to support kernel modules wishing to modify reboot_mode.
> 
> Signed-off-by: Elliot Berman <eberman@codeaurora.org>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 23:40 [PATCH v2 0/2] Support reboot power-off driver as module Elliot Berman
2019-11-08 23:40 ` [PATCH v2 1/2] reboot: Export reboot_mode Elliot Berman
2019-11-09  0:18   ` Bjorn Andersson
2019-11-09  8:38   ` Greg KH
2019-11-08 23:40 ` [PATCH v2 2/2] power: reset: Enable tristate on restart power-off driver Elliot Berman

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git