linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Power off drivers for QNAP and LSXL.
@ 2012-12-28 12:25 Andrew Lunn
  2012-12-28 12:25 ` [PATCH 1/4] Power: Reset: Driver to turn QNAP board power off Andrew Lunn
                   ` (4 more replies)
  0 siblings, 5 replies; 26+ messages in thread
From: Andrew Lunn @ 2012-12-28 12:25 UTC (permalink / raw)
  To: linux-arm-kernel

This patchset contains two power off driver, moving existing code
out of mach-kirkwood into drivers/power/reset.

QNAP NAS boards have a microcontroller connected to a UART. Sending
the command to it turns the power off. There are Orion5x QNAP boards
which can later use this driver, once they are converted to DT.

Kirkwood Buffalo Linkstation LSXL devices power off by restarting and
letting the boot loader idle until the user hits a switch. There are
again Orion5x devices which could use this driver in the future, once
they are converted to DT. It also looks like some PXA devices could
use it.

Patches #1 and #3 are the drivers, and #2 and #4 make use of the
driver, removing C code and adding DT nodes.

The QNAP driver has been tested on a QNAP TS119+. The LSXL driver is
currently untested.

git://github.com/lunn/linux.git v3.8-rc1-qnap-poweroff

Andrew Lunn (4):
  Power: Reset: Driver to turn QNAP board power off.
  ARM: Kirkwood: Make use of the QNAP Power off driver.
  Power: Reset: Power off by restarting
  ARM: Kirkwood: Convert LSXL to restart-poweroff driver.

 .../bindings/power_supply/qnap-poweroff.txt        |   14 +++
 .../bindings/power_supply/restart-poweroff.txt     |    9 ++
 arch/arm/boot/dts/kirkwood-lsxl.dtsi               |    4 +
 arch/arm/boot/dts/kirkwood-ts219.dtsi              |    5 +
 arch/arm/mach-kirkwood/Kconfig                     |    2 +
 arch/arm/mach-kirkwood/board-lsxl.c                |   16 ---
 arch/arm/mach-kirkwood/board-ts219.c               |    3 -
 drivers/power/reset/Kconfig                        |   17 +++
 drivers/power/reset/Makefile                       |    2 +
 drivers/power/reset/qnap-poweroff.c                |  124 ++++++++++++++++++++
 drivers/power/reset/restart-poweroff.c             |   67 +++++++++++
 11 files changed, 244 insertions(+), 19 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt
 create mode 100644 Documentation/devicetree/bindings/power_supply/restart-poweroff.txt
 create mode 100644 drivers/power/reset/qnap-poweroff.c
 create mode 100644 drivers/power/reset/restart-poweroff.c

-- 
1.7.10.4

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

* [PATCH 1/4] Power: Reset: Driver to turn QNAP board power off.
  2012-12-28 12:25 [PATCH 0/4] Power off drivers for QNAP and LSXL Andrew Lunn
@ 2012-12-28 12:25 ` Andrew Lunn
  2013-01-06 21:55   ` Anton Vorontsov
  2012-12-28 12:25 ` [PATCH 2/4] ARM: Kirkwood: Make use of the QNAP Power off driver Andrew Lunn
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 26+ messages in thread
From: Andrew Lunn @ 2012-12-28 12:25 UTC (permalink / raw)
  To: linux-arm-kernel

From: Andrew Lunn <andrew.lunn@ruag.com>

The QNAP NAS boxes have a microcontroller attached to the SoCs second
serial port. By sending it a simple command, it will turn the power
for the board off. This driver registers a function for pm_power_off
to send such a command.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 .../bindings/power_supply/qnap-poweroff.txt        |   14 +++
 drivers/power/reset/Kconfig                        |    9 ++
 drivers/power/reset/Makefile                       |    1 +
 drivers/power/reset/qnap-poweroff.c                |  124 ++++++++++++++++++++
 4 files changed, 148 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt
 create mode 100644 drivers/power/reset/qnap-poweroff.c

diff --git a/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt b/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt
new file mode 100644
index 0000000..0951952
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt
@@ -0,0 +1,14 @@
+* QNAP Power Off
+
+QNAP NAS devices have a microcontroller controlling the main power
+supply. This microcontroller is connected to UART1 of the Kirkwood and
+Orion5x SoCs. Sending the charactor 'A', at 19200 baud, tells the
+microcontroller to turn the power off. This driver adds a handler to
+pm_power_off which is called to turn the power off.
+
+Required Properties:
+- compatible: Should be "qnap,power-off"
+
+- reg: Address and length of the register set for UART1
+- clocks: tclk clock
+
diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
index 6461b48..6453aac 100644
--- a/drivers/power/reset/Kconfig
+++ b/drivers/power/reset/Kconfig
@@ -13,3 +13,12 @@ config POWER_RESET_GPIO
 	  This driver supports turning off your board via a GPIO line.
 	  If your board needs a GPIO high/low to power down, say Y and
 	  create a binding in your devicetree.
+
+config POWER_RESET_QNAP
+	bool "QNAP power-off driver"
+	depends on OF_GPIO && POWER_RESET && PLAT_ORION
+	help
+	  This driver supports turning off QNAP NAS devices by sending
+	  commands to the microcontroller which controls the main power.
+
+	  Say Y if you have a QNAP NAS.
diff --git a/drivers/power/reset/Makefile b/drivers/power/reset/Makefile
index 751488a..c4d3b2d 100644
--- a/drivers/power/reset/Makefile
+++ b/drivers/power/reset/Makefile
@@ -1 +1,2 @@
 obj-$(CONFIG_POWER_RESET_GPIO) += gpio-poweroff.o
+obj-$(CONFIG_POWER_RESET_QNAP) += qnap-poweroff.o
diff --git a/drivers/power/reset/qnap-poweroff.c b/drivers/power/reset/qnap-poweroff.c
new file mode 100644
index 0000000..ca0b476
--- /dev/null
+++ b/drivers/power/reset/qnap-poweroff.c
@@ -0,0 +1,124 @@
+/*
+ * QNAP Turbo NAS Board power off
+ *
+ * Copyright (C) 2012 Andrew Lunn <andrew@lunn.ch>
+ *
+ * Based on the code from:
+ *
+ * Copyright (C) 2009  Martin Michlmayr <tbm@cyrius.com>
+ * Copyright (C) 2008  Byron Bradley <byron.bbradley@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/serial_reg.h>
+#include <linux/kallsyms.h>
+#include <linux/of.h>
+#include <linux/io.h>
+#include <linux/clk.h>
+
+#define UART1_REG(x)	(base + ((UART_##x) << 2))
+
+static void __iomem *base;
+static unsigned long tclk;
+
+static void
+qnap_power_off(void)
+{
+	/* 19200 baud divisor */
+	const unsigned divisor = ((tclk + (8 * 19200)) / (16 * 19200));
+
+	pr_err("%s: triggering power-off...\n", __func__);
+
+	/* hijack UART1 and reset into sane state (19200,8n1) */
+	writel(0x83, UART1_REG(LCR));
+	writel(divisor & 0xff, UART1_REG(DLL));
+	writel((divisor >> 8) & 0xff, UART1_REG(DLM));
+	writel(0x03, UART1_REG(LCR));
+	writel(0x00, UART1_REG(IER));
+	writel(0x00, UART1_REG(FCR));
+	writel(0x00, UART1_REG(MCR));
+
+	/* send the power-off command 'A' to PIC */
+	writel('A', UART1_REG(TX));
+}
+
+static int
+qnap_power_off_probe(struct platform_device *pdev)
+{
+	struct resource *res;
+	struct clk *clk;
+	char symname[KSYM_NAME_LEN];
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (res == NULL) {
+		dev_err(&pdev->dev, "Missing resource");
+		return -EINVAL;
+	}
+
+	base = devm_ioremap(&pdev->dev, res->start,
+			    resource_size(res));
+	if (base == NULL) {
+		dev_err(&pdev->dev, "Unable to map resource");
+		return -EINVAL;
+	}
+
+	/* We need to know tclk in order to calculate the UART
+	   divisor */
+	clk = devm_clk_get(&pdev->dev, NULL);
+	if (IS_ERR(clk)) {
+		dev_err(&pdev->dev, "Clk missing");
+		return PTR_ERR(clk);
+	}
+
+	tclk = clk_get_rate(clk);
+
+	/* Check that nothing else has already setup a handler */
+	if (pm_power_off != NULL) {
+		lookup_symbol_name(pm_power_off, symname);
+		dev_err(&pdev->dev,
+			"pm_power_off already claimed %p %s",
+			pm_power_off, symname);
+		return -EBUSY;
+	}
+	pm_power_off = qnap_power_off;
+
+	return 0;
+}
+
+static int
+qnap_power_off_remove(struct platform_device *pdev)
+{
+	pm_power_off = NULL;
+
+	return 0;
+}
+
+static const struct of_device_id qnap_power_off_of_match_table[] = {
+	{ .compatible = "qnap,power-off", },
+	{}
+};
+
+MODULE_DEVICE_TABLE(of, qnap_power_off_of_match_table);
+
+static struct platform_driver qnap_power_off_driver = {
+	.probe	= qnap_power_off_probe,
+	.remove	= qnap_power_off_remove,
+	.driver	= {
+		.owner	= THIS_MODULE,
+		.name	= "qnap_power_off",
+		.of_match_table = of_match_ptr(qnap_power_off_of_match_table),
+	},
+};
+
+module_platform_driver(qnap_power_off_driver);
+
+MODULE_AUTHOR("Andrew Lunn <andrew@lunn.ch>");
+MODULE_DESCRIPTION("QNAP Power off driver");
+MODULE_LICENSE("GPLv2+");
-- 
1.7.10.4

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

* [PATCH 2/4] ARM: Kirkwood: Make use of the QNAP Power off driver.
  2012-12-28 12:25 [PATCH 0/4] Power off drivers for QNAP and LSXL Andrew Lunn
  2012-12-28 12:25 ` [PATCH 1/4] Power: Reset: Driver to turn QNAP board power off Andrew Lunn
@ 2012-12-28 12:25 ` Andrew Lunn
  2012-12-28 12:25 ` [PATCH 3/4] Power: Reset: Power off by restarting Andrew Lunn
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 26+ messages in thread
From: Andrew Lunn @ 2012-12-28 12:25 UTC (permalink / raw)
  To: linux-arm-kernel

Add a node into the DT binding and remove C code.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/kirkwood-ts219.dtsi |    5 +++++
 arch/arm/mach-kirkwood/Kconfig        |    1 +
 arch/arm/mach-kirkwood/board-ts219.c  |    3 ---
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/kirkwood-ts219.dtsi b/arch/arm/boot/dts/kirkwood-ts219.dtsi
index 64ea27c..4e29460 100644
--- a/arch/arm/boot/dts/kirkwood-ts219.dtsi
+++ b/arch/arm/boot/dts/kirkwood-ts219.dtsi
@@ -31,6 +31,11 @@
 			clock-frequency = <200000000>;
 			status = "okay";
 		};
+		poweroff at 12100 {
+			compatible = "qnap,power-off";
+			reg = <0x12000 0x100>;
+			clocks = <&gate_clk 7>;
+		};
 		spi at 10600 {
 			status = "okay";
 
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index f91cdff..bb4de9c 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -92,6 +92,7 @@ config MACH_TS219_DT
 	select ARCH_KIRKWOOD_DT
 	select ARM_APPENDED_DTB
 	select ARM_ATAG_DTB_COMPAT
+	select POWER_RESET_QNAP
 	help
 	  Say 'Y' here if you want your kernel to support the QNAP
 	  TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and
diff --git a/arch/arm/mach-kirkwood/board-ts219.c b/arch/arm/mach-kirkwood/board-ts219.c
index acb0187..10fb397 100644
--- a/arch/arm/mach-kirkwood/board-ts219.c
+++ b/arch/arm/mach-kirkwood/board-ts219.c
@@ -23,7 +23,6 @@
 #include <asm/mach/arch.h>
 #include <mach/kirkwood.h>
 #include "common.h"
-#include "tsx1x-common.h"
 
 static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = {
 	.phy_addr	= MV643XX_ETH_PHY_ADDR(8),
@@ -38,8 +37,6 @@ void __init qnap_dt_ts219_init(void)
 		qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
 
 	kirkwood_ge00_init(&qnap_ts219_ge00_data);
-
-	pm_power_off = qnap_tsx1x_power_off;
 }
 
 /* FIXME: Will not work with DT. Maybe use MPP40_GPIO? */
-- 
1.7.10.4

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

* [PATCH 3/4] Power: Reset: Power off by restarting
  2012-12-28 12:25 [PATCH 0/4] Power off drivers for QNAP and LSXL Andrew Lunn
  2012-12-28 12:25 ` [PATCH 1/4] Power: Reset: Driver to turn QNAP board power off Andrew Lunn
  2012-12-28 12:25 ` [PATCH 2/4] ARM: Kirkwood: Make use of the QNAP Power off driver Andrew Lunn
@ 2012-12-28 12:25 ` Andrew Lunn
  2012-12-28 18:59   ` Michael Walle
  2012-12-28 12:25 ` [PATCH 4/4] ARM: Kirkwood: Convert LSXL to restart-poweroff driver Andrew Lunn
  2013-01-23 12:53 ` [PATCH 0/4] Power off drivers for QNAP and LSXL Jason Cooper
  4 siblings, 1 reply; 26+ messages in thread
From: Andrew Lunn @ 2012-12-28 12:25 UTC (permalink / raw)
  To: linux-arm-kernel

Some devices, Buffalo Linkstation LS-XHL and LS-CHLv2 for example,
power-off by restarting to letting u-boot hold the SoC until the user
presses a key. Add a generic driver to implement this. It binds a
function to pm_power_off, which calls arm_pm_restart.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 .../bindings/power_supply/restart-poweroff.txt     |    9 +++
 drivers/power/reset/Kconfig                        |    8 +++
 drivers/power/reset/Makefile                       |    1 +
 drivers/power/reset/restart-poweroff.c             |   67 ++++++++++++++++++++
 4 files changed, 85 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power_supply/restart-poweroff.txt
 create mode 100644 drivers/power/reset/restart-poweroff.c

diff --git a/Documentation/devicetree/bindings/power_supply/restart-poweroff.txt b/Documentation/devicetree/bindings/power_supply/restart-poweroff.txt
new file mode 100644
index 0000000..e4f1660
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/restart-poweroff.txt
@@ -0,0 +1,9 @@
+* Restart Power Off
+
+Buffalo Linkstation LS-XHL and LS-CHLv2, and other devices power off
+by restarting and letting u-boot keep hold of the machine until the
+user presses a button.
+
+Required Properties:
+- compatible: Should be "restart-poweroff"
+
diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
index 6453aac..1ae65b8 100644
--- a/drivers/power/reset/Kconfig
+++ b/drivers/power/reset/Kconfig
@@ -22,3 +22,11 @@ config POWER_RESET_QNAP
 	  commands to the microcontroller which controls the main power.
 
 	  Say Y if you have a QNAP NAS.
+
+config POWER_RESET_RESTART
+	bool "Restart power-off driver"
+	depends on ARM
+	help
+	  Some boards don't actually have the ability to power off.
+	  Instead they restart, and u-boot holds the SoC until the
+	  user presses a key. u-boot then boots into Linux.
diff --git a/drivers/power/reset/Makefile b/drivers/power/reset/Makefile
index c4d3b2d..0f317f5 100644
--- a/drivers/power/reset/Makefile
+++ b/drivers/power/reset/Makefile
@@ -1,2 +1,3 @@
 obj-$(CONFIG_POWER_RESET_GPIO) += gpio-poweroff.o
 obj-$(CONFIG_POWER_RESET_QNAP) += qnap-poweroff.o
+obj-$(CONFIG_POWER_RESET_RESTART) += restart-poweroff.o
\ No newline at end of file
diff --git a/drivers/power/reset/restart-poweroff.c b/drivers/power/reset/restart-poweroff.c
new file mode 100644
index 0000000..79b1a2e
--- /dev/null
+++ b/drivers/power/reset/restart-poweroff.c
@@ -0,0 +1,67 @@
+/*
+ * Power off by restarting and let u-boot keep hold of the machine
+ * until the user presses a button for example.
+ *
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * Copyright (C) 2012 Andrew Lunn
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <asm/system_misc.h>
+#include <linux/of_platform.h>
+#include <linux/module.h>
+
+static void restart_poweroff_do_poweroff(void)
+{
+	arm_pm_restart('h', NULL);
+}
+
+static int __devinit restart_poweroff_probe(struct platform_device *pdev)
+{
+	/* If a pm_power_off function has already been added, leave it alone */
+	if (pm_power_off != NULL) {
+		dev_err(&pdev->dev,
+			"pm_power_off function already registered");
+		return -EBUSY;
+	}
+
+	pm_power_off = &restart_poweroff_do_poweroff;
+	return 0;
+}
+
+static int __devexit restart_poweroff_remove(struct platform_device *pdev)
+{
+	if (pm_power_off == &restart_poweroff_do_poweroff)
+		pm_power_off = NULL;
+
+	return 0;
+}
+
+static const struct of_device_id of_restart_poweroff_match[] = {
+	{ .compatible = "restart-poweroff", },
+	{},
+};
+
+static struct platform_driver restart_poweroff_driver = {
+	.probe = restart_poweroff_probe,
+	.remove = __devexit_p(restart_poweroff_remove),
+	.driver = {
+		   .name = "poweroff-restart",
+		   .owner = THIS_MODULE,
+		   .of_match_table = of_restart_poweroff_match,
+		   },
+};
+
+module_platform_driver(restart_poweroff_driver);
+
+MODULE_AUTHOR("Andrew Lunn <andrew@lunn.ch");
+MODULE_DESCRIPTION("restart poweroff driver");
+MODULE_LICENSE("GPLv2");
+MODULE_ALIAS("platform:poweroff-restart");
-- 
1.7.10.4

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

* [PATCH 4/4] ARM: Kirkwood: Convert LSXL to restart-poweroff driver.
  2012-12-28 12:25 [PATCH 0/4] Power off drivers for QNAP and LSXL Andrew Lunn
                   ` (2 preceding siblings ...)
  2012-12-28 12:25 ` [PATCH 3/4] Power: Reset: Power off by restarting Andrew Lunn
@ 2012-12-28 12:25 ` Andrew Lunn
  2012-12-28 19:16   ` Michael Walle
  2013-01-23 12:53 ` [PATCH 0/4] Power off drivers for QNAP and LSXL Jason Cooper
  4 siblings, 1 reply; 26+ messages in thread
From: Andrew Lunn @ 2012-12-28 12:25 UTC (permalink / raw)
  To: linux-arm-kernel

Add a device tree node and remove the C code.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/kirkwood-lsxl.dtsi |    4 ++++
 arch/arm/mach-kirkwood/Kconfig       |    1 +
 arch/arm/mach-kirkwood/board-lsxl.c  |   16 ----------------
 3 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
index 37d45c4..996c7fe 100644
--- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi
+++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
@@ -172,6 +172,10 @@
 		alarm-gpios = <&gpio1 8 0>;
 	};
 
+	restart_poweroff {
+		compatible = "restart-poweroff";
+	};
+
 	regulators {
 		compatible = "simple-bus";
 		#address-cells = <1>;
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index bb4de9c..432bee0 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -119,6 +119,7 @@ config MACH_GOFLEXNET_DT
 config MACH_LSXL_DT
 	bool "Buffalo Linkstation LS-XHL, LS-CHLv2 (Flattened Device Tree)"
 	select ARCH_KIRKWOOD_DT
+	select POWER_RESET_RESTART
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  Buffalo Linkstation LS-XHL & LS-CHLv2 devices, using
diff --git a/arch/arm/mach-kirkwood/board-lsxl.c b/arch/arm/mach-kirkwood/board-lsxl.c
index 4ec8b7a..3483952 100644
--- a/arch/arm/mach-kirkwood/board-lsxl.c
+++ b/arch/arm/mach-kirkwood/board-lsxl.c
@@ -25,19 +25,6 @@ static struct mv643xx_eth_platform_data lsxl_ge01_data = {
 	.phy_addr	= MV643XX_ETH_PHY_ADDR(8),
 };
 
-/*
- * On the LS-XHL/LS-CHLv2, the shutdown process is following:
- * - Userland monitors key events until the power switch goes to off position
- * - The board reboots
- * - U-boot starts and goes into an idle mode waiting for the user
- *   to move the switch to ON position
- *
- */
-static void lsxl_power_off(void)
-{
-	kirkwood_restart('h', NULL);
-}
-
 void __init lsxl_init(void)
 {
 	/*
@@ -46,7 +33,4 @@ void __init lsxl_init(void)
 
 	kirkwood_ge00_init(&lsxl_ge00_data);
 	kirkwood_ge01_init(&lsxl_ge01_data);
-
-	/* register power-off method */
-	pm_power_off = lsxl_power_off;
 }
-- 
1.7.10.4

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

* [PATCH 3/4] Power: Reset: Power off by restarting
  2012-12-28 12:25 ` [PATCH 3/4] Power: Reset: Power off by restarting Andrew Lunn
@ 2012-12-28 18:59   ` Michael Walle
  2013-01-06 22:04     ` Anton Vorontsov
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Walle @ 2012-12-28 18:59 UTC (permalink / raw)
  To: linux-arm-kernel

Am Freitag 28 Dezember 2012, 13:25:11 schrieb Andrew Lunn:
> Some devices, Buffalo Linkstation LS-XHL and LS-CHLv2 for example,
> power-off by restarting to letting u-boot hold the SoC until the user
> presses a key. Add a generic driver to implement this. It binds a
> function to pm_power_off, which calls arm_pm_restart.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  .../bindings/power_supply/restart-poweroff.txt     |    9 +++
>  drivers/power/reset/Kconfig                        |    8 +++
>  drivers/power/reset/Makefile                       |    1 +
>  drivers/power/reset/restart-poweroff.c             |   67
> ++++++++++++++++++++ 4 files changed, 85 insertions(+)
>  create mode 100644
> Documentation/devicetree/bindings/power_supply/restart-poweroff.txt create
> mode 100644 drivers/power/reset/restart-poweroff.c
> 
> diff --git
> a/Documentation/devicetree/bindings/power_supply/restart-poweroff.txt
> b/Documentation/devicetree/bindings/power_supply/restart-poweroff.txt new
> file mode 100644
> index 0000000..e4f1660
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power_supply/restart-poweroff.txt
> @@ -0,0 +1,9 @@
> +* Restart Power Off
> +
> +Buffalo Linkstation LS-XHL and LS-CHLv2, and other devices power off
> +by restarting and letting u-boot keep hold of the machine until the
> +user presses a button.
> +
> +Required Properties:
> +- compatible: Should be "restart-poweroff"
> +
> diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
> index 6453aac..1ae65b8 100644
> --- a/drivers/power/reset/Kconfig
> +++ b/drivers/power/reset/Kconfig
> @@ -22,3 +22,11 @@ config POWER_RESET_QNAP
>  	  commands to the microcontroller which controls the main power.
> 
>  	  Say Y if you have a QNAP NAS.
> +
> +config POWER_RESET_RESTART
> +	bool "Restart power-off driver"
> +	depends on ARM
> +	help
> +	  Some boards don't actually have the ability to power off.
> +	  Instead they restart, and u-boot holds the SoC until the
> +	  user presses a key. u-boot then boots into Linux.
> diff --git a/drivers/power/reset/Makefile b/drivers/power/reset/Makefile
> index c4d3b2d..0f317f5 100644
> --- a/drivers/power/reset/Makefile
> +++ b/drivers/power/reset/Makefile
> @@ -1,2 +1,3 @@
>  obj-$(CONFIG_POWER_RESET_GPIO) += gpio-poweroff.o
>  obj-$(CONFIG_POWER_RESET_QNAP) += qnap-poweroff.o
> +obj-$(CONFIG_POWER_RESET_RESTART) += restart-poweroff.o
> \ No newline at end of file
> diff --git a/drivers/power/reset/restart-poweroff.c
> b/drivers/power/reset/restart-poweroff.c new file mode 100644
> index 0000000..79b1a2e
> --- /dev/null
> +++ b/drivers/power/reset/restart-poweroff.c
> @@ -0,0 +1,67 @@
> +/*
> + * Power off by restarting and let u-boot keep hold of the machine
> + * until the user presses a button for example.
> + *
> + * Andrew Lunn <andrew@lunn.ch>
> + *
> + * Copyright (C) 2012 Andrew Lunn
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + */
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/platform_device.h>
> +#include <asm/system_misc.h>
> +#include <linux/of_platform.h>
> +#include <linux/module.h>
> +
> +static void restart_poweroff_do_poweroff(void)
> +{
> +	arm_pm_restart('h', NULL);
> +}
> +
> +static int __devinit restart_poweroff_probe(struct platform_device *pdev)
> +{
> +	/* If a pm_power_off function has already been added, leave it alone 
*/
> +	if (pm_power_off != NULL) {
> +		dev_err(&pdev->dev,
> +			"pm_power_off function already registered");
> +		return -EBUSY;
> +	}
> +
> +	pm_power_off = &restart_poweroff_do_poweroff;
> +	return 0;
> +}
> +
> +static int __devexit restart_poweroff_remove(struct platform_device *pdev)
> +{
> +	if (pm_power_off == &restart_poweroff_do_poweroff)
> +		pm_power_off = NULL;
> +
> +	return 0;
> +}
> +
> +static const struct of_device_id of_restart_poweroff_match[] = {
> +	{ .compatible = "restart-poweroff", },
> +	{},
> +};
> +
> +static struct platform_driver restart_poweroff_driver = {
> +	.probe = restart_poweroff_probe,
> +	.remove = __devexit_p(restart_poweroff_remove),
> +	.driver = {
> +		   .name = "poweroff-restart",
> +		   .owner = THIS_MODULE,
> +		   .of_match_table = of_restart_poweroff_match,
> +		   },
> +};
> +
> +module_platform_driver(restart_poweroff_driver);
> +
> +MODULE_AUTHOR("Andrew Lunn <andrew@lunn.ch");
> +MODULE_DESCRIPTION("restart poweroff driver");
> +MODULE_LICENSE("GPLv2");
> +MODULE_ALIAS("platform:poweroff-restart");


Tested-by: Michael Walle <michael@walle.cc>

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

* [PATCH 4/4] ARM: Kirkwood: Convert LSXL to restart-poweroff driver.
  2012-12-28 12:25 ` [PATCH 4/4] ARM: Kirkwood: Convert LSXL to restart-poweroff driver Andrew Lunn
@ 2012-12-28 19:16   ` Michael Walle
  2012-12-28 19:39     ` Andrew Lunn
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Walle @ 2012-12-28 19:16 UTC (permalink / raw)
  To: linux-arm-kernel

Am Freitag 28 Dezember 2012, 13:25:12 schrieb Andrew Lunn:
> Add a device tree node and remove the C code.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  arch/arm/boot/dts/kirkwood-lsxl.dtsi |    4 ++++
>  arch/arm/mach-kirkwood/Kconfig       |    1 +
>  arch/arm/mach-kirkwood/board-lsxl.c  |   16 ----------------
>  3 files changed, 5 insertions(+), 16 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi
> b/arch/arm/boot/dts/kirkwood-lsxl.dtsi index 37d45c4..996c7fe 100644
> --- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi
> +++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
> @@ -172,6 +172,10 @@
>  		alarm-gpios = <&gpio1 8 0>;
>  	};
> 
> +	restart_poweroff {
> +		compatible = "restart-poweroff";
> +	};
> +
>  	regulators {
>  		compatible = "simple-bus";
>  		#address-cells = <1>;
> diff --git a/arch/arm/mach-kirkwood/Kconfig
> b/arch/arm/mach-kirkwood/Kconfig index bb4de9c..432bee0 100644
> --- a/arch/arm/mach-kirkwood/Kconfig
> +++ b/arch/arm/mach-kirkwood/Kconfig
> @@ -119,6 +119,7 @@ config MACH_GOFLEXNET_DT
>  config MACH_LSXL_DT
>  	bool "Buffalo Linkstation LS-XHL, LS-CHLv2 (Flattened Device Tree)"
>  	select ARCH_KIRKWOOD_DT
> +	select POWER_RESET_RESTART
>  	help
>  	  Say 'Y' here if you want your kernel to support the
>  	  Buffalo Linkstation LS-XHL & LS-CHLv2 devices, using
> diff --git a/arch/arm/mach-kirkwood/board-lsxl.c
> b/arch/arm/mach-kirkwood/board-lsxl.c index 4ec8b7a..3483952 100644
> --- a/arch/arm/mach-kirkwood/board-lsxl.c
> +++ b/arch/arm/mach-kirkwood/board-lsxl.c
> @@ -25,19 +25,6 @@ static struct mv643xx_eth_platform_data lsxl_ge01_data =
> { .phy_addr	= MV643XX_ETH_PHY_ADDR(8),
>  };
> 
> -/*
> - * On the LS-XHL/LS-CHLv2, the shutdown process is following:
> - * - Userland monitors key events until the power switch goes to off
> position - * - The board reboots
> - * - U-boot starts and goes into an idle mode waiting for the user
> - *   to move the switch to ON position
> - *
> - */
> -static void lsxl_power_off(void)
> -{
> -	kirkwood_restart('h', NULL);
> -}
> -
>  void __init lsxl_init(void)
>  {
>  	/*
> @@ -46,7 +33,4 @@ void __init lsxl_init(void)
> 
>  	kirkwood_ge00_init(&lsxl_ge00_data);
>  	kirkwood_ge01_init(&lsxl_ge01_data);
> -
> -	/* register power-off method */
> -	pm_power_off = lsxl_power_off;
>  }

Tested-by: Michael Walle <michael@walle.cc>

Sort of, device_shutdown() is blocking on my board (seems to be some kind of 
issue with orion-ehci), but that has nothing to do with this patch :)

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

* [PATCH 4/4] ARM: Kirkwood: Convert LSXL to restart-poweroff driver.
  2012-12-28 19:16   ` Michael Walle
@ 2012-12-28 19:39     ` Andrew Lunn
  2012-12-28 23:11       ` Michael Walle
  0 siblings, 1 reply; 26+ messages in thread
From: Andrew Lunn @ 2012-12-28 19:39 UTC (permalink / raw)
  To: linux-arm-kernel

> 
> Tested-by: Michael Walle <michael@walle.cc>

Hi Michael

Thanks for testing.


> Sort of, device_shutdown() is blocking on my board (seems to be some kind of 
> issue with orion-ehci), but that has nothing to do with this patch :)

Have you tried the USB clock fix:

http://www.spinics.net/lists/arm-kernel/msg213741.html

	Andrew 

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

* [PATCH 4/4] ARM: Kirkwood: Convert LSXL to restart-poweroff driver.
  2012-12-28 19:39     ` Andrew Lunn
@ 2012-12-28 23:11       ` Michael Walle
  0 siblings, 0 replies; 26+ messages in thread
From: Michael Walle @ 2012-12-28 23:11 UTC (permalink / raw)
  To: linux-arm-kernel

Am Freitag 28 Dezember 2012, 20:39:05 schrieb Andrew Lunn:
> > Tested-by: Michael Walle <michael@walle.cc>
> 
> Hi Michael
> 
> Thanks for testing.
> 
> > Sort of, device_shutdown() is blocking on my board (seems to be some kind
> > of issue with orion-ehci), but that has nothing to do with this patch :)
> 
> Have you tried the USB clock fix:
> 
> http://www.spinics.net/lists/arm-kernel/msg213741.html
> 
> 	Andrew

ah thanks, that fixed it.


-- 
Michael

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

* [PATCH 1/4] Power: Reset: Driver to turn QNAP board power off.
  2012-12-28 12:25 ` [PATCH 1/4] Power: Reset: Driver to turn QNAP board power off Andrew Lunn
@ 2013-01-06 21:55   ` Anton Vorontsov
  2013-01-08 18:15     ` [PATCH] power: reset: qnap-poweroff: Fix License String Andrew Lunn
  0 siblings, 1 reply; 26+ messages in thread
From: Anton Vorontsov @ 2013-01-06 21:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 28, 2012 at 01:25:09PM +0100, Andrew Lunn wrote:
> From: Andrew Lunn <andrew.lunn@ruag.com>
> 
> The QNAP NAS boxes have a microcontroller attached to the SoCs second
> serial port. By sending it a simple command, it will turn the power
> for the board off. This driver registers a function for pm_power_off
> to send such a command.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
[...]
> +MODULE_LICENSE("GPLv2+");

That doesn't make sense, and probably will result into a T (tainted) flag.
The kernel is under GPLv2 license, no '+'. Anyone who touches the code
assumes that it is "GPLv2 only". So, any changes on top of your code
automatically turns it into "GPLv2 only". IANAL, but that's how I believe
things work.

Anyway, fixed this warning:

  CC      drivers/power/reset/qnap-poweroff.o
drivers/power/reset/qnap-poweroff.c: In function ?qnap_power_off_probe?:
drivers/power/reset/qnap-poweroff.c:80:3: warning: passing argument 1 of ?lookup_symbol_name? makes integer from pointer without a cast [enabled by default]
In file included from drivers/power/reset/qnap-poweroff.c:21:0:
include/linux/kallsyms.h:45:5: note: expected ?long unsigned int? but argument is of type ?void (*)(void)?

... and have made a few cosmetic changes (see below). But I didn't change
the license string, you probably should send a patch for it.

diff --git a/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt b/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt
index 0951952..9a599d2 100644
--- a/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt
+++ b/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt
@@ -11,4 +11,3 @@ Required Properties:
 
 - reg: Address and length of the register set for UART1
 - clocks: tclk clock
-
diff --git a/drivers/power/reset/qnap-poweroff.c b/drivers/power/reset/qnap-poweroff.c
index ca0b476..cecb317 100644
--- a/drivers/power/reset/qnap-poweroff.c
+++ b/drivers/power/reset/qnap-poweroff.c
@@ -28,8 +28,7 @@
 static void __iomem *base;
 static unsigned long tclk;
 
-static void
-qnap_power_off(void)
+static void qnap_power_off(void)
 {
 	/* 19200 baud divisor */
 	const unsigned divisor = ((tclk + (8 * 19200)) / (16 * 19200));
@@ -49,28 +48,25 @@ qnap_power_off(void)
 	writel('A', UART1_REG(TX));
 }
 
-static int
-qnap_power_off_probe(struct platform_device *pdev)
+static int qnap_power_off_probe(struct platform_device *pdev)
 {
 	struct resource *res;
 	struct clk *clk;
 	char symname[KSYM_NAME_LEN];
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (res == NULL) {
+	if (!res) {
 		dev_err(&pdev->dev, "Missing resource");
 		return -EINVAL;
 	}
 
-	base = devm_ioremap(&pdev->dev, res->start,
-			    resource_size(res));
-	if (base == NULL) {
+	base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
+	if (!base) {
 		dev_err(&pdev->dev, "Unable to map resource");
 		return -EINVAL;
 	}
 
-	/* We need to know tclk in order to calculate the UART
-	   divisor */
+	/* We need to know tclk in order to calculate the UART divisor */
 	clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(clk)) {
 		dev_err(&pdev->dev, "Clk missing");
@@ -80,8 +76,8 @@ qnap_power_off_probe(struct platform_device *pdev)
 	tclk = clk_get_rate(clk);
 
 	/* Check that nothing else has already setup a handler */
-	if (pm_power_off != NULL) {
-		lookup_symbol_name(pm_power_off, symname);
+	if (pm_power_off) {
+		lookup_symbol_name((ulong)pm_power_off, symname);
 		dev_err(&pdev->dev,
 			"pm_power_off already claimed %p %s",
 			pm_power_off, symname);
@@ -92,11 +88,9 @@ qnap_power_off_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int
-qnap_power_off_remove(struct platform_device *pdev)
+static int qnap_power_off_remove(struct platform_device *pdev)
 {
 	pm_power_off = NULL;
-
 	return 0;
 }
 
@@ -104,7 +98,6 @@ static const struct of_device_id qnap_power_off_of_match_table[] = {
 	{ .compatible = "qnap,power-off", },
 	{}
 };
-
 MODULE_DEVICE_TABLE(of, qnap_power_off_of_match_table);
 
 static struct platform_driver qnap_power_off_driver = {
@@ -116,7 +109,6 @@ static struct platform_driver qnap_power_off_driver = {
 		.of_match_table = of_match_ptr(qnap_power_off_of_match_table),
 	},
 };
-
 module_platform_driver(qnap_power_off_driver);
 
 MODULE_AUTHOR("Andrew Lunn <andrew@lunn.ch>");

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

* [PATCH 3/4] Power: Reset: Power off by restarting
  2012-12-28 18:59   ` Michael Walle
@ 2013-01-06 22:04     ` Anton Vorontsov
  2013-01-07  6:42       ` Andrew Lunn
                         ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Anton Vorontsov @ 2013-01-06 22:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 28, 2012 at 07:59:37PM +0100, Michael Walle wrote:
> Am Freitag 28 Dezember 2012, 13:25:11 schrieb Andrew Lunn:
> > Some devices, Buffalo Linkstation LS-XHL and LS-CHLv2 for example,
> > power-off by restarting to letting u-boot hold the SoC until the user
> > presses a key. Add a generic driver to implement this. It binds a
> > function to pm_power_off, which calls arm_pm_restart.
> > 
> > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
[...]
> Tested-by: Michael Walle <michael@walle.cc>

Applied (with a small cosmetic cleanups), thanks a lot!

Note that I can also take the ARM patches together with the drivers (and
it would make sense to keep things bisectable). Should I?

Thanks,
Anton

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

* [PATCH 3/4] Power: Reset: Power off by restarting
  2013-01-06 22:04     ` Anton Vorontsov
@ 2013-01-07  6:42       ` Andrew Lunn
  2013-01-07  7:00         ` Anton Vorontsov
  2013-01-07 11:27       ` Jason Cooper
  2013-01-31 18:54       ` [PATCH] power/reset: restart: remove __dev{init,exit} Jason Cooper
  2 siblings, 1 reply; 26+ messages in thread
From: Andrew Lunn @ 2013-01-07  6:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Jan 06, 2013 at 02:04:27PM -0800, Anton Vorontsov wrote:
> On Fri, Dec 28, 2012 at 07:59:37PM +0100, Michael Walle wrote:
> > Am Freitag 28 Dezember 2012, 13:25:11 schrieb Andrew Lunn:
> > > Some devices, Buffalo Linkstation LS-XHL and LS-CHLv2 for example,
> > > power-off by restarting to letting u-boot hold the SoC until the user
> > > presses a key. Add a generic driver to implement this. It binds a
> > > function to pm_power_off, which calls arm_pm_restart.
> > > 
> > > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> [...]
> > Tested-by: Michael Walle <michael@walle.cc>
> 
> Applied (with a small cosmetic cleanups), thanks a lot!
> 
> Note that I can also take the ARM patches together with the drivers (and
> it would make sense to keep things bisectable). Should I?

Hi Anton

Do you have a stable branch containing these patches? There are likely
to be some remove/remove conflicts with the ARM patches, which we can
avoid if you have a stable branch we can merge.

      Thanks
	Andrew

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

* [PATCH 3/4] Power: Reset: Power off by restarting
  2013-01-07  6:42       ` Andrew Lunn
@ 2013-01-07  7:00         ` Anton Vorontsov
  0 siblings, 0 replies; 26+ messages in thread
From: Anton Vorontsov @ 2013-01-07  7:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 07, 2013 at 07:42:02AM +0100, Andrew Lunn wrote:
> On Sun, Jan 06, 2013 at 02:04:27PM -0800, Anton Vorontsov wrote:
> > On Fri, Dec 28, 2012 at 07:59:37PM +0100, Michael Walle wrote:
> > > Am Freitag 28 Dezember 2012, 13:25:11 schrieb Andrew Lunn:
> > > > Some devices, Buffalo Linkstation LS-XHL and LS-CHLv2 for example,
> > > > power-off by restarting to letting u-boot hold the SoC until the user
> > > > presses a key. Add a generic driver to implement this. It binds a
> > > > function to pm_power_off, which calls arm_pm_restart.
> > > > 
> > > > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > [...]
> > > Tested-by: Michael Walle <michael@walle.cc>
> > 
> > Applied (with a small cosmetic cleanups), thanks a lot!
> > 
> > Note that I can also take the ARM patches together with the drivers (and
> > it would make sense to keep things bisectable). Should I?
> 
> Hi Anton
> 
> Do you have a stable branch containing these patches?

Stable as in 'I don't rebase it'? Yes, I tend to not rebase the battery
tree. It is here:

	git://git.infradead.org/battery-2.6.git master

You can find the applied patches there.

Thanks,
Anton

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

* [PATCH 3/4] Power: Reset: Power off by restarting
  2013-01-06 22:04     ` Anton Vorontsov
  2013-01-07  6:42       ` Andrew Lunn
@ 2013-01-07 11:27       ` Jason Cooper
  2013-01-31 18:54       ` [PATCH] power/reset: restart: remove __dev{init,exit} Jason Cooper
  2 siblings, 0 replies; 26+ messages in thread
From: Jason Cooper @ 2013-01-07 11:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Jan 06, 2013 at 02:04:27PM -0800, Anton Vorontsov wrote:
> On Fri, Dec 28, 2012 at 07:59:37PM +0100, Michael Walle wrote:
> > Am Freitag 28 Dezember 2012, 13:25:11 schrieb Andrew Lunn:
> > > Some devices, Buffalo Linkstation LS-XHL and LS-CHLv2 for example,
> > > power-off by restarting to letting u-boot hold the SoC until the user
> > > presses a key. Add a generic driver to implement this. It binds a
> > > function to pm_power_off, which calls arm_pm_restart.
> > > 
> > > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> [...]
> > Tested-by: Michael Walle <michael@walle.cc>
> 
> Applied (with a small cosmetic cleanups), thanks a lot!
> 
> Note that I can also take the ARM patches together with the drivers (and
> it would make sense to keep things bisectable). Should I?

Please take patches 1 and 3 of this series (which it looks like you
have).  I'll take 2 and 4 and list your stable tree as a dependency.

thx,

Jason.

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

* [PATCH] power: reset: qnap-poweroff: Fix License String
  2013-01-06 21:55   ` Anton Vorontsov
@ 2013-01-08 18:15     ` Andrew Lunn
  2013-01-20  2:05       ` Anton Vorontsov
  2013-01-20 20:13       ` Uwe Kleine-König
  0 siblings, 2 replies; 26+ messages in thread
From: Andrew Lunn @ 2013-01-08 18:15 UTC (permalink / raw)
  To: linux-arm-kernel

GPLv2+ is not a valid license string. Replace it with one that is.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 drivers/power/reset/qnap-poweroff.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/reset/qnap-poweroff.c b/drivers/power/reset/qnap-poweroff.c
index ca0b476..8af772b 100644
--- a/drivers/power/reset/qnap-poweroff.c
+++ b/drivers/power/reset/qnap-poweroff.c
@@ -121,4 +121,4 @@ module_platform_driver(qnap_power_off_driver);
 
 MODULE_AUTHOR("Andrew Lunn <andrew@lunn.ch>");
 MODULE_DESCRIPTION("QNAP Power off driver");
-MODULE_LICENSE("GPLv2+");
+MODULE_LICENSE("GPL v2");
-- 
1.7.10.4

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

* [PATCH] power: reset: qnap-poweroff: Fix License String
  2013-01-08 18:15     ` [PATCH] power: reset: qnap-poweroff: Fix License String Andrew Lunn
@ 2013-01-20  2:05       ` Anton Vorontsov
  2013-01-20 20:13       ` Uwe Kleine-König
  1 sibling, 0 replies; 26+ messages in thread
From: Anton Vorontsov @ 2013-01-20  2:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 08, 2013 at 07:15:26PM +0100, Andrew Lunn wrote:
> GPLv2+ is not a valid license string. Replace it with one that is.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---

Applied, thanks a lot!

>  drivers/power/reset/qnap-poweroff.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/reset/qnap-poweroff.c b/drivers/power/reset/qnap-poweroff.c
> index ca0b476..8af772b 100644
> --- a/drivers/power/reset/qnap-poweroff.c
> +++ b/drivers/power/reset/qnap-poweroff.c
> @@ -121,4 +121,4 @@ module_platform_driver(qnap_power_off_driver);
>  
>  MODULE_AUTHOR("Andrew Lunn <andrew@lunn.ch>");
>  MODULE_DESCRIPTION("QNAP Power off driver");
> -MODULE_LICENSE("GPLv2+");
> +MODULE_LICENSE("GPL v2");
> -- 
> 1.7.10.4

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

* [PATCH] power: reset: qnap-poweroff: Fix License String
  2013-01-08 18:15     ` [PATCH] power: reset: qnap-poweroff: Fix License String Andrew Lunn
  2013-01-20  2:05       ` Anton Vorontsov
@ 2013-01-20 20:13       ` Uwe Kleine-König
  2013-01-20 20:47         ` Anton Vorontsov
  1 sibling, 1 reply; 26+ messages in thread
From: Uwe Kleine-König @ 2013-01-20 20:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 08, 2013 at 07:15:26PM +0100, Andrew Lunn wrote:
> GPLv2+ is not a valid license string. Replace it with one that is.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  drivers/power/reset/qnap-poweroff.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/reset/qnap-poweroff.c b/drivers/power/reset/qnap-poweroff.c
> index ca0b476..8af772b 100644
> --- a/drivers/power/reset/qnap-poweroff.c
> +++ b/drivers/power/reset/qnap-poweroff.c
> @@ -121,4 +121,4 @@ module_platform_driver(qnap_power_off_driver);
>  
>  MODULE_AUTHOR("Andrew Lunn <andrew@lunn.ch>");
>  MODULE_DESCRIPTION("QNAP Power off driver");
> -MODULE_LICENSE("GPLv2+");
> +MODULE_LICENSE("GPL v2");
This change is wrong.

According to include/linux/module.h "GPL v2" means exactly that: version
2. As the file specifies v2 or later in the header you have to use "GPL"
which means v2 or later.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* [PATCH] power: reset: qnap-poweroff: Fix License String
  2013-01-20 20:13       ` Uwe Kleine-König
@ 2013-01-20 20:47         ` Anton Vorontsov
  2013-01-21  8:11           ` Uwe Kleine-König
  0 siblings, 1 reply; 26+ messages in thread
From: Anton Vorontsov @ 2013-01-20 20:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Jan 20, 2013 at 09:13:36PM +0100, Uwe Kleine-K?nig wrote:
> On Tue, Jan 08, 2013 at 07:15:26PM +0100, Andrew Lunn wrote:
> > GPLv2+ is not a valid license string. Replace it with one that is.
> > 
> > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > ---
> >  drivers/power/reset/qnap-poweroff.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/power/reset/qnap-poweroff.c b/drivers/power/reset/qnap-poweroff.c
> > index ca0b476..8af772b 100644
> > --- a/drivers/power/reset/qnap-poweroff.c
> > +++ b/drivers/power/reset/qnap-poweroff.c
> > @@ -121,4 +121,4 @@ module_platform_driver(qnap_power_off_driver);
> >  
> >  MODULE_AUTHOR("Andrew Lunn <andrew@lunn.ch>");
> >  MODULE_DESCRIPTION("QNAP Power off driver");
> > -MODULE_LICENSE("GPLv2+");
> > +MODULE_LICENSE("GPL v2");
> This change is wrong.
> 
> According to include/linux/module.h "GPL v2" means exactly that: version
> 2. As the file specifies v2 or later in the header you have to use "GPL"
> which means v2 or later.

Does it even make sense to have the two separate things ("GPL v2" and
"GPL")?

Suppose there is a global change that modifies a bunch of drivers, some of
them are GPLv2+. Now, the author of the global change is submitting it
under "GPL v2 only" license, which, by definition, turns any GPLv2+ code
into "GPL v2 only", right?

So, changing from GPLv2+ to "GPL v2 only" is OK, but not the other way
around.

IANAL, tho.

Anton

p.s. Yes, in this particular driver it also makes sense to remove "or
later" words from the header, just to be consistent.

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

* [PATCH] power: reset: qnap-poweroff: Fix License String
  2013-01-20 20:47         ` Anton Vorontsov
@ 2013-01-21  8:11           ` Uwe Kleine-König
  0 siblings, 0 replies; 26+ messages in thread
From: Uwe Kleine-König @ 2013-01-21  8:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Anton,

On Sun, Jan 20, 2013 at 12:47:29PM -0800, Anton Vorontsov wrote:
> On Sun, Jan 20, 2013 at 09:13:36PM +0100, Uwe Kleine-K?nig wrote:
> > On Tue, Jan 08, 2013 at 07:15:26PM +0100, Andrew Lunn wrote:
> > > GPLv2+ is not a valid license string. Replace it with one that is.
> > > 
> > > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > > ---
> > >  drivers/power/reset/qnap-poweroff.c |    2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/power/reset/qnap-poweroff.c b/drivers/power/reset/qnap-poweroff.c
> > > index ca0b476..8af772b 100644
> > > --- a/drivers/power/reset/qnap-poweroff.c
> > > +++ b/drivers/power/reset/qnap-poweroff.c
> > > @@ -121,4 +121,4 @@ module_platform_driver(qnap_power_off_driver);
> > >  
> > >  MODULE_AUTHOR("Andrew Lunn <andrew@lunn.ch>");
> > >  MODULE_DESCRIPTION("QNAP Power off driver");
> > > -MODULE_LICENSE("GPLv2+");
> > > +MODULE_LICENSE("GPL v2");
> > This change is wrong.
> > 
> > According to include/linux/module.h "GPL v2" means exactly that: version
> > 2. As the file specifies v2 or later in the header you have to use "GPL"
> > which means v2 or later.
> 
> Does it even make sense to have the two separate things ("GPL v2" and
> "GPL")?
Yeah. If you had another OS project that uses GPL-4 you can just copy
over a GPL-2+ driver to it, not an GPL-2 driver. So assuming the kernel
will stay at GPL-2 forever it doesn't make any difference for the
kernel. But other projects might benefit. (And if in the future someone
might want to change the kernel to GPL-4, she only needs to contact the
GPL-2 authors and can legally change GPL-2+ to GPL-4+.)

> Suppose there is a global change that modifies a bunch of drivers, some of
> them are GPLv2+. Now, the author of the global change is submitting it
> under "GPL v2 only" license, which, by definition, turns any GPLv2+ code
> into "GPL v2 only", right?
See http://yarchive.net/comp/linux/dual_license_bsd_gpl.html for Linus'
POV. It's an old mail, but I think it still applies.

> So, changing from GPLv2+ to "GPL v2 only" is OK, but not the other way
> around.
OK as in (probably) legal. OK as in fair is questionable.

> IANAL, tho.
ditto.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* [PATCH 0/4] Power off drivers for QNAP and LSXL.
  2012-12-28 12:25 [PATCH 0/4] Power off drivers for QNAP and LSXL Andrew Lunn
                   ` (3 preceding siblings ...)
  2012-12-28 12:25 ` [PATCH 4/4] ARM: Kirkwood: Convert LSXL to restart-poweroff driver Andrew Lunn
@ 2013-01-23 12:53 ` Jason Cooper
  2013-05-26  1:19   ` Jason Cooper
  4 siblings, 1 reply; 26+ messages in thread
From: Jason Cooper @ 2013-01-23 12:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 28, 2012 at 01:25:08PM +0100, Andrew Lunn wrote:
> This patchset contains two power off driver, moving existing code
> out of mach-kirkwood into drivers/power/reset.
> 
> QNAP NAS boards have a microcontroller connected to a UART. Sending
> the command to it turns the power off. There are Orion5x QNAP boards
> which can later use this driver, once they are converted to DT.
> 
> Kirkwood Buffalo Linkstation LSXL devices power off by restarting and
> letting the boot loader idle until the user hits a switch. There are
> again Orion5x devices which could use this driver in the future, once
> they are converted to DT. It also looks like some PXA devices could
> use it.
> 
> Patches #1 and #3 are the drivers, and #2 and #4 make use of the
> driver, removing C code and adding DT nodes.
> 
> The QNAP driver has been tested on a QNAP TS119+. The LSXL driver is
> currently untested.
> 
> git://github.com/lunn/linux.git v3.8-rc1-qnap-poweroff
> 
> Andrew Lunn (4):
>   Power: Reset: Driver to turn QNAP board power off.
>   ARM: Kirkwood: Make use of the QNAP Power off driver.
>   Power: Reset: Power off by restarting
>   ARM: Kirkwood: Convert LSXL to restart-poweroff driver.
> 
>  .../bindings/power_supply/qnap-poweroff.txt        |   14 +++
>  .../bindings/power_supply/restart-poweroff.txt     |    9 ++
>  arch/arm/boot/dts/kirkwood-lsxl.dtsi               |    4 +
>  arch/arm/boot/dts/kirkwood-ts219.dtsi              |    5 +
>  arch/arm/mach-kirkwood/Kconfig                     |    2 +
>  arch/arm/mach-kirkwood/board-lsxl.c                |   16 ---
>  arch/arm/mach-kirkwood/board-ts219.c               |    3 -
>  drivers/power/reset/Kconfig                        |   17 +++
>  drivers/power/reset/Makefile                       |    2 +
>  drivers/power/reset/qnap-poweroff.c                |  124 ++++++++++++++++++++
>  drivers/power/reset/restart-poweroff.c             |   67 +++++++++++
>  11 files changed, 244 insertions(+), 19 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt
>  create mode 100644 Documentation/devicetree/bindings/power_supply/restart-poweroff.txt
>  create mode 100644 drivers/power/reset/qnap-poweroff.c
>  create mode 100644 drivers/power/reset/restart-poweroff.c

patches 2 and 4 applied to mvebu/dt with a dependency on:

  git://git.infradead.org/battery-2.6.git master

up to:

  ffd8f9a power/reset: Add a new driver implementing 'power off by restarting'

in order to pull in patches 1 and 3:

  ffd8f9a power/reset: Add a new driver implementing 'power off by restarting'
  e8fc721 power/reset: Add a new driver to turn QNAP board power off

thx,

Jason.

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

* [PATCH] power/reset: restart: remove __dev{init,exit}
  2013-01-06 22:04     ` Anton Vorontsov
  2013-01-07  6:42       ` Andrew Lunn
  2013-01-07 11:27       ` Jason Cooper
@ 2013-01-31 18:54       ` Jason Cooper
  2013-01-31 18:57         ` Jason Cooper
  2013-01-31 20:02         ` Andrew Lunn
  2 siblings, 2 replies; 26+ messages in thread
From: Jason Cooper @ 2013-01-31 18:54 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
---
 drivers/power/reset/restart-poweroff.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/power/reset/restart-poweroff.c b/drivers/power/reset/restart-poweroff.c
index b11b9e8..059cd15 100644
--- a/drivers/power/reset/restart-poweroff.c
+++ b/drivers/power/reset/restart-poweroff.c
@@ -22,7 +22,7 @@ static void restart_poweroff_do_poweroff(void)
 	arm_pm_restart('h', NULL);
 }
 
-static int __devinit restart_poweroff_probe(struct platform_device *pdev)
+static int restart_poweroff_probe(struct platform_device *pdev)
 {
 	/* If a pm_power_off function has already been added, leave it alone */
 	if (pm_power_off != NULL) {
@@ -35,7 +35,7 @@ static int __devinit restart_poweroff_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int __devexit restart_poweroff_remove(struct platform_device *pdev)
+static int restart_poweroff_remove(struct platform_device *pdev)
 {
 	if (pm_power_off == &restart_poweroff_do_poweroff)
 		pm_power_off = NULL;
@@ -50,7 +50,7 @@ static const struct of_device_id of_restart_poweroff_match[] = {
 
 static struct platform_driver restart_poweroff_driver = {
 	.probe = restart_poweroff_probe,
-	.remove = __devexit_p(restart_poweroff_remove),
+	.remove = restart_poweroff_remove,
 	.driver = {
 		.name = "poweroff-restart",
 		.owner = THIS_MODULE,
-- 
1.8.1.1

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

* [PATCH] power/reset: restart: remove __dev{init,exit}
  2013-01-31 18:54       ` [PATCH] power/reset: restart: remove __dev{init,exit} Jason Cooper
@ 2013-01-31 18:57         ` Jason Cooper
  2013-01-31 20:02         ` Andrew Lunn
  1 sibling, 0 replies; 26+ messages in thread
From: Jason Cooper @ 2013-01-31 18:57 UTC (permalink / raw)
  To: linux-arm-kernel

Anton,

I forgot to mention, this fixes a build breakage on battery/master.

thx,

Jason.

On Thu, Jan 31, 2013 at 06:54:29PM +0000, Jason Cooper wrote:
> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
> ---
>  drivers/power/reset/restart-poweroff.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/power/reset/restart-poweroff.c b/drivers/power/reset/restart-poweroff.c
> index b11b9e8..059cd15 100644
> --- a/drivers/power/reset/restart-poweroff.c
> +++ b/drivers/power/reset/restart-poweroff.c
> @@ -22,7 +22,7 @@ static void restart_poweroff_do_poweroff(void)
>  	arm_pm_restart('h', NULL);
>  }
>  
> -static int __devinit restart_poweroff_probe(struct platform_device *pdev)
> +static int restart_poweroff_probe(struct platform_device *pdev)
>  {
>  	/* If a pm_power_off function has already been added, leave it alone */
>  	if (pm_power_off != NULL) {
> @@ -35,7 +35,7 @@ static int __devinit restart_poweroff_probe(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static int __devexit restart_poweroff_remove(struct platform_device *pdev)
> +static int restart_poweroff_remove(struct platform_device *pdev)
>  {
>  	if (pm_power_off == &restart_poweroff_do_poweroff)
>  		pm_power_off = NULL;
> @@ -50,7 +50,7 @@ static const struct of_device_id of_restart_poweroff_match[] = {
>  
>  static struct platform_driver restart_poweroff_driver = {
>  	.probe = restart_poweroff_probe,
> -	.remove = __devexit_p(restart_poweroff_remove),
> +	.remove = restart_poweroff_remove,
>  	.driver = {
>  		.name = "poweroff-restart",
>  		.owner = THIS_MODULE,
> -- 
> 1.8.1.1
> 

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

* [PATCH] power/reset: restart: remove __dev{init,exit}
  2013-01-31 18:54       ` [PATCH] power/reset: restart: remove __dev{init,exit} Jason Cooper
  2013-01-31 18:57         ` Jason Cooper
@ 2013-01-31 20:02         ` Andrew Lunn
  2013-01-31 20:20           ` Jason Cooper
  1 sibling, 1 reply; 26+ messages in thread
From: Andrew Lunn @ 2013-01-31 20:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 31, 2013 at 06:54:29PM +0000, Jason Cooper wrote:
> Signed-off-by: Jason Cooper <jason@lakedaemon.net>

Hi Jason

I Acked-by: a very similar patch to this yesterday....

https://lkml.org/lkml/2013/1/30/233

	Andrew

> ---
>  drivers/power/reset/restart-poweroff.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/power/reset/restart-poweroff.c b/drivers/power/reset/restart-poweroff.c
> index b11b9e8..059cd15 100644
> --- a/drivers/power/reset/restart-poweroff.c
> +++ b/drivers/power/reset/restart-poweroff.c
> @@ -22,7 +22,7 @@ static void restart_poweroff_do_poweroff(void)
>  	arm_pm_restart('h', NULL);
>  }
>  
> -static int __devinit restart_poweroff_probe(struct platform_device *pdev)
> +static int restart_poweroff_probe(struct platform_device *pdev)
>  {
>  	/* If a pm_power_off function has already been added, leave it alone */
>  	if (pm_power_off != NULL) {
> @@ -35,7 +35,7 @@ static int __devinit restart_poweroff_probe(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static int __devexit restart_poweroff_remove(struct platform_device *pdev)
> +static int restart_poweroff_remove(struct platform_device *pdev)
>  {
>  	if (pm_power_off == &restart_poweroff_do_poweroff)
>  		pm_power_off = NULL;
> @@ -50,7 +50,7 @@ static const struct of_device_id of_restart_poweroff_match[] = {
>  
>  static struct platform_driver restart_poweroff_driver = {
>  	.probe = restart_poweroff_probe,
> -	.remove = __devexit_p(restart_poweroff_remove),
> +	.remove = restart_poweroff_remove,
>  	.driver = {
>  		.name = "poweroff-restart",
>  		.owner = THIS_MODULE,
> -- 
> 1.8.1.1
> 

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

* [PATCH] power/reset: restart: remove __dev{init,exit}
  2013-01-31 20:02         ` Andrew Lunn
@ 2013-01-31 20:20           ` Jason Cooper
  2013-02-03  3:43             ` Anton Vorontsov
  0 siblings, 1 reply; 26+ messages in thread
From: Jason Cooper @ 2013-01-31 20:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 31, 2013 at 09:02:50PM +0100, Andrew Lunn wrote:
> On Thu, Jan 31, 2013 at 06:54:29PM +0000, Jason Cooper wrote:
> > Signed-off-by: Jason Cooper <jason@lakedaemon.net>
> 
> Hi Jason
> 
> I Acked-by: a very similar patch to this yesterday....
> 
> https://lkml.org/lkml/2013/1/30/233

Hmm, I need to read more carefully.  My auto-flagging script didn't
catch it because it didn't have any of the mvebu/kirkwood/dove/orion
keywords in it :-(

Sorry for the noise.

thx,

Jason.

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

* [PATCH] power/reset: restart: remove __dev{init,exit}
  2013-01-31 20:20           ` Jason Cooper
@ 2013-02-03  3:43             ` Anton Vorontsov
  0 siblings, 0 replies; 26+ messages in thread
From: Anton Vorontsov @ 2013-02-03  3:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 31, 2013 at 03:20:00PM -0500, Jason Cooper wrote:
> On Thu, Jan 31, 2013 at 09:02:50PM +0100, Andrew Lunn wrote:
> > On Thu, Jan 31, 2013 at 06:54:29PM +0000, Jason Cooper wrote:
> > > Signed-off-by: Jason Cooper <jason@lakedaemon.net>
> > 
> > Hi Jason
> > 
> > I Acked-by: a very similar patch to this yesterday....
> > 
> > https://lkml.org/lkml/2013/1/30/233

I've added Jason's Signed-off-by to the Thierry's patch.

Thanks!

Anton

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

* [PATCH 0/4] Power off drivers for QNAP and LSXL.
  2013-01-23 12:53 ` [PATCH 0/4] Power off drivers for QNAP and LSXL Jason Cooper
@ 2013-05-26  1:19   ` Jason Cooper
  0 siblings, 0 replies; 26+ messages in thread
From: Jason Cooper @ 2013-05-26  1:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 23, 2013 at 07:53:28AM -0500, Jason Cooper wrote:
> On Fri, Dec 28, 2012 at 01:25:08PM +0100, Andrew Lunn wrote:
> > This patchset contains two power off driver, moving existing code
> > out of mach-kirkwood into drivers/power/reset.
> > 
> > QNAP NAS boards have a microcontroller connected to a UART. Sending
> > the command to it turns the power off. There are Orion5x QNAP boards
> > which can later use this driver, once they are converted to DT.
> > 
> > Kirkwood Buffalo Linkstation LSXL devices power off by restarting and
> > letting the boot loader idle until the user hits a switch. There are
> > again Orion5x devices which could use this driver in the future, once
> > they are converted to DT. It also looks like some PXA devices could
> > use it.
> > 
> > Patches #1 and #3 are the drivers, and #2 and #4 make use of the
> > driver, removing C code and adding DT nodes.
> > 
> > The QNAP driver has been tested on a QNAP TS119+. The LSXL driver is
> > currently untested.
> > 
> > git://github.com/lunn/linux.git v3.8-rc1-qnap-poweroff
> > 
> > Andrew Lunn (4):
> >   Power: Reset: Driver to turn QNAP board power off.
> >   ARM: Kirkwood: Make use of the QNAP Power off driver.
> >   Power: Reset: Power off by restarting
> >   ARM: Kirkwood: Convert LSXL to restart-poweroff driver.
> > 
> >  .../bindings/power_supply/qnap-poweroff.txt        |   14 +++
> >  .../bindings/power_supply/restart-poweroff.txt     |    9 ++
> >  arch/arm/boot/dts/kirkwood-lsxl.dtsi               |    4 +
> >  arch/arm/boot/dts/kirkwood-ts219.dtsi              |    5 +
> >  arch/arm/mach-kirkwood/Kconfig                     |    2 +
> >  arch/arm/mach-kirkwood/board-lsxl.c                |   16 ---
> >  arch/arm/mach-kirkwood/board-ts219.c               |    3 -
> >  drivers/power/reset/Kconfig                        |   17 +++
> >  drivers/power/reset/Makefile                       |    2 +
> >  drivers/power/reset/qnap-poweroff.c                |  124 ++++++++++++++++++++
> >  drivers/power/reset/restart-poweroff.c             |   67 +++++++++++
> >  11 files changed, 244 insertions(+), 19 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt
> >  create mode 100644 Documentation/devicetree/bindings/power_supply/restart-poweroff.txt
> >  create mode 100644 drivers/power/reset/qnap-poweroff.c
> >  create mode 100644 drivers/power/reset/restart-poweroff.c
> 
> patches 2 and 4 applied to mvebu/dt with a dependency on:
> 
>   git://git.infradead.org/battery-2.6.git master
> 
> up to:
> 
>   ffd8f9a power/reset: Add a new driver implementing 'power off by restarting'
> 
> in order to pull in patches 1 and 3:
> 
>   ffd8f9a power/reset: Add a new driver implementing 'power off by restarting'
>   e8fc721 power/reset: Add a new driver to turn QNAP board power off

Yeah.... So thanks to Andrew for bringing this to my attention.
Somewhere along the line, I must've dropped patches 2 and 4.

Thankfully, patches 1 and 3 made it in, so I've just applied 2 and 4 to
mvebu/boards.

thx, and sorry for the delay.

Jason.

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

end of thread, other threads:[~2013-05-26  1:19 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-28 12:25 [PATCH 0/4] Power off drivers for QNAP and LSXL Andrew Lunn
2012-12-28 12:25 ` [PATCH 1/4] Power: Reset: Driver to turn QNAP board power off Andrew Lunn
2013-01-06 21:55   ` Anton Vorontsov
2013-01-08 18:15     ` [PATCH] power: reset: qnap-poweroff: Fix License String Andrew Lunn
2013-01-20  2:05       ` Anton Vorontsov
2013-01-20 20:13       ` Uwe Kleine-König
2013-01-20 20:47         ` Anton Vorontsov
2013-01-21  8:11           ` Uwe Kleine-König
2012-12-28 12:25 ` [PATCH 2/4] ARM: Kirkwood: Make use of the QNAP Power off driver Andrew Lunn
2012-12-28 12:25 ` [PATCH 3/4] Power: Reset: Power off by restarting Andrew Lunn
2012-12-28 18:59   ` Michael Walle
2013-01-06 22:04     ` Anton Vorontsov
2013-01-07  6:42       ` Andrew Lunn
2013-01-07  7:00         ` Anton Vorontsov
2013-01-07 11:27       ` Jason Cooper
2013-01-31 18:54       ` [PATCH] power/reset: restart: remove __dev{init,exit} Jason Cooper
2013-01-31 18:57         ` Jason Cooper
2013-01-31 20:02         ` Andrew Lunn
2013-01-31 20:20           ` Jason Cooper
2013-02-03  3:43             ` Anton Vorontsov
2012-12-28 12:25 ` [PATCH 4/4] ARM: Kirkwood: Convert LSXL to restart-poweroff driver Andrew Lunn
2012-12-28 19:16   ` Michael Walle
2012-12-28 19:39     ` Andrew Lunn
2012-12-28 23:11       ` Michael Walle
2013-01-23 12:53 ` [PATCH 0/4] Power off drivers for QNAP and LSXL Jason Cooper
2013-05-26  1:19   ` Jason Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).