* [PATCH v1 02/10] dt-bindings: Document the standard property "system-power-controller"
2014-10-27 16:26 [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller" Romain Perier
@ 2014-10-27 16:26 ` Romain Perier
[not found] ` <1414427215-14380-2-git-send-email-romain.perier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-27 16:26 ` [PATCH v1 03/10] regulator: act8865: Use of_is_system_power_controller helper function Romain Perier
` (9 subsequent siblings)
10 siblings, 1 reply; 36+ messages in thread
From: Romain Perier @ 2014-10-27 16:26 UTC (permalink / raw)
To: heiko
Cc: devicetree, broonie, lgirdwood, linux-kernel, grant.likely, robh,
mark.rutland, johan, linux-pm, linux, lee.jones, balbi, robh+dt,
pawel.moll, ijc+devicetree, galak, linux, swarren, thierry.reding,
gnurou, linux-arm-kernel, linux-tegra
This simply renames the previous documentation to something more generic and adds
updates according to last changes.
Signed-off-by: Romain Perier <romain.perier@gmail.com>
---
.../devicetree/bindings/power/power-controller.txt | 18 ++++++++++++++++++
Documentation/devicetree/bindings/power/poweroff.txt | 18 ------------------
2 files changed, 18 insertions(+), 18 deletions(-)
create mode 100644 Documentation/devicetree/bindings/power/power-controller.txt
delete mode 100644 Documentation/devicetree/bindings/power/poweroff.txt
diff --git a/Documentation/devicetree/bindings/power/power-controller.txt b/Documentation/devicetree/bindings/power/power-controller.txt
new file mode 100644
index 0000000..e0a1abe
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/power-controller.txt
@@ -0,0 +1,18 @@
+* Generic system power control capability
+
+Power-management integrated circuits or miscellaneous harware components are
+sometimes able to control the system power. The device driver associated to these
+components might needs to define this capability, which tells to the kernel
+how to switch off the system. The corresponding driver must have the standard
+property "system-power-controller" in its device node. This property marks the device as
+able to controller the system-power. In order to test if this property is found
+programmatically, use the helper function "of_is_system_power_controller" from
+of.h .
+
+Example:
+
+act8846: act8846@5 {
+ compatible = "active-semi,act8846";
+ status = "okay";
+ system-power-controller;
+}
diff --git a/Documentation/devicetree/bindings/power/poweroff.txt b/Documentation/devicetree/bindings/power/poweroff.txt
deleted file mode 100644
index 845868b..0000000
--- a/Documentation/devicetree/bindings/power/poweroff.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-* Generic Poweroff capability
-
-Power-management integrated circuits or miscellaneous harware components are
-sometimes able to control the system power. The device driver associated to these
-components might needs to define poweroff capability, which tells to the kernel
-how to switch off the system. The corresponding driver must have the standard
-property "poweroff-source" in its device node. This property marks the device as
-able to shutdown the system. In order to test if this property is found
-programmatically, use the helper function "of_system_has_poweroff_source" from
-of.h .
-
-Example:
-
-act8846: act8846@5 {
- compatible = "active-semi,act8846";
- status = "okay";
- poweroff-source;
-}
--
1.9.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v1 03/10] regulator: act8865: Use of_is_system_power_controller helper function
2014-10-27 16:26 [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller" Romain Perier
2014-10-27 16:26 ` [PATCH v1 02/10] dt-bindings: Document the standard property "system-power-controller" Romain Perier
@ 2014-10-27 16:26 ` Romain Perier
[not found] ` <1414427215-14380-3-git-send-email-romain.perier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-27 16:26 ` [PATCH v2 04/10] ARM: dts: rockchip: Enable power off in pmic for Radxa Rock Romain Perier
` (8 subsequent siblings)
10 siblings, 1 reply; 36+ messages in thread
From: Romain Perier @ 2014-10-27 16:26 UTC (permalink / raw)
To: heiko
Cc: mark.rutland, linux-kernel, thierry.reding, lee.jones, robh,
linux, swarren, grant.likely, linux, devicetree, pawel.moll,
ijc+devicetree, johan, robh+dt, linux-tegra, linux-arm-kernel,
linux-pm, lgirdwood, balbi, broonie, galak, gnurou
Signed-off-by: Romain Perier <romain.perier@gmail.com>
---
drivers/regulator/act8865-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c
index 76301ed..435aba1 100644
--- a/drivers/regulator/act8865-regulator.c
+++ b/drivers/regulator/act8865-regulator.c
@@ -365,7 +365,7 @@ static int act8865_pmic_probe(struct i2c_client *client,
return ret;
}
- if (of_system_has_poweroff_source(dev->of_node)) {
+ if (of_is_system_power_controller(dev->of_node)) {
if (!pm_power_off) {
act8865_i2c_client = client;
act8865->off_reg = off_reg;
--
1.9.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v2 04/10] ARM: dts: rockchip: Enable power off in pmic for Radxa Rock
2014-10-27 16:26 [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller" Romain Perier
2014-10-27 16:26 ` [PATCH v1 02/10] dt-bindings: Document the standard property "system-power-controller" Romain Perier
2014-10-27 16:26 ` [PATCH v1 03/10] regulator: act8865: Use of_is_system_power_controller helper function Romain Perier
@ 2014-10-27 16:26 ` Romain Perier
2014-10-27 16:26 ` [PATCH v1 05/10] dt-bindings: act8865: Update documentation about property system-power-controller Romain Perier
` (7 subsequent siblings)
10 siblings, 0 replies; 36+ messages in thread
From: Romain Perier @ 2014-10-27 16:26 UTC (permalink / raw)
To: heiko
Cc: devicetree, broonie, lgirdwood, linux-kernel, grant.likely, robh,
mark.rutland, johan, linux-pm, linux, lee.jones, balbi, robh+dt,
pawel.moll, ijc+devicetree, galak, linux, swarren, thierry.reding,
gnurou, linux-arm-kernel, linux-tegra
Add "system-power-controller" property to act8846 node.
poweroff command is now handled for this board.
Signed-off-by: Romain Perier <romain.perier@gmail.com>
---
arch/arm/boot/dts/rk3188-radxarock.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/rk3188-radxarock.dts b/arch/arm/boot/dts/rk3188-radxarock.dts
index 15910c9..a6ead3a 100644
--- a/arch/arm/boot/dts/rk3188-radxarock.dts
+++ b/arch/arm/boot/dts/rk3188-radxarock.dts
@@ -141,6 +141,8 @@
pinctrl-names = "default";
pinctrl-0 = <&act8846_dvs0_ctl>;
+ system-power-controller;
+
regulators {
vcc_ddr: REG1 {
regulator-name = "VCC_DDR";
--
1.9.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v1 05/10] dt-bindings: act8865: Update documentation about property system-power-controller
2014-10-27 16:26 [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller" Romain Perier
` (2 preceding siblings ...)
2014-10-27 16:26 ` [PATCH v2 04/10] ARM: dts: rockchip: Enable power off in pmic for Radxa Rock Romain Perier
@ 2014-10-27 16:26 ` Romain Perier
2014-10-27 16:26 ` [PATCH v2 06/10] mfd: tps65910: Use the standard DT " Romain Perier
` (6 subsequent siblings)
10 siblings, 0 replies; 36+ messages in thread
From: Romain Perier @ 2014-10-27 16:26 UTC (permalink / raw)
To: heiko
Cc: mark.rutland, linux-kernel, thierry.reding, lee.jones, robh,
linux, swarren, grant.likely, linux, devicetree, pawel.moll,
ijc+devicetree, johan, robh+dt, linux-tegra, linux-arm-kernel,
linux-pm, lgirdwood, balbi, broonie, galak, gnurou
Signed-off-by: Romain Perier <romain.perier@gmail.com>
---
Documentation/devicetree/bindings/regulator/act8865-regulator.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/regulator/act8865-regulator.txt b/Documentation/devicetree/bindings/regulator/act8865-regulator.txt
index 01a5b07..45369d8 100644
--- a/Documentation/devicetree/bindings/regulator/act8865-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/act8865-regulator.txt
@@ -6,8 +6,8 @@ Required properties:
- reg: I2C slave address
Optional properties:
-- poweroff-source: Telling whether or not this pmic is controlling
- the system power. See Documentation/devicetree/bindings/power/poweroff.txt .
+- system-power-controller: Telling whether or not this pmic is controlling the
+ system power. See Documentation/devicetree/bindings/power/power-controller.txt.
Any standard regulator properties can be used to configure the single regulator.
--
1.9.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v2 06/10] mfd: tps65910: Use the standard DT property system-power-controller
2014-10-27 16:26 [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller" Romain Perier
` (3 preceding siblings ...)
2014-10-27 16:26 ` [PATCH v1 05/10] dt-bindings: act8865: Update documentation about property system-power-controller Romain Perier
@ 2014-10-27 16:26 ` Romain Perier
[not found] ` <1414427215-14380-6-git-send-email-romain.perier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-27 16:41 ` Felipe Balbi
2014-10-27 16:26 ` [PATCH v2 07/10] ARM: dts: tegra: Use standard power-off property in tps65911 for tegra30 apalis Romain Perier
` (5 subsequent siblings)
10 siblings, 2 replies; 36+ messages in thread
From: Romain Perier @ 2014-10-27 16:26 UTC (permalink / raw)
To: heiko
Cc: devicetree, broonie, lgirdwood, linux-kernel, grant.likely, robh,
mark.rutland, johan, linux-pm, linux, lee.jones, balbi, robh+dt,
pawel.moll, ijc+devicetree, galak, linux, swarren, thierry.reding,
gnurou, linux-arm-kernel, linux-tegra
No longer use custom property to define poweroff capability, use the standard
DT property instead.
Signed-off-by: Romain Perier <romain.perier@gmail.com>
---
drivers/mfd/tps65910.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
index 7612d89..a7faff2 100644
--- a/drivers/mfd/tps65910.c
+++ b/drivers/mfd/tps65910.c
@@ -423,8 +423,7 @@ static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
board_info->irq = client->irq;
board_info->irq_base = -1;
- board_info->pm_off = of_property_read_bool(np,
- "ti,system-power-controller");
+ board_info->pm_off = of_is_system_power_controller();
return board_info;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
[parent not found: <1414427215-14380-6-git-send-email-romain.perier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH v2 06/10] mfd: tps65910: Use the standard DT property system-power-controller
[not found] ` <1414427215-14380-6-git-send-email-romain.perier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2014-10-27 16:35 ` Lucas Stach
2014-10-27 16:41 ` Felipe Balbi
0 siblings, 1 reply; 36+ messages in thread
From: Lucas Stach @ 2014-10-27 16:35 UTC (permalink / raw)
To: Romain Perier
Cc: heiko-4mtYJXux2i+zQB+pC5nmwQ, devicetree-u79uwXL29TY76Z2rM5mHXA,
broonie-DgEjT+Ai2ygdnm+yROfE0A, lgirdwood-Re5JQEeQqe8AvxtiuMwx3w,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
grant.likely-QSEj5FYQhm4dnm+yROfE0A, robh-DgEjT+Ai2ygdnm+yROfE0A,
mark.rutland-5wv7dgnIgG8, johan-DgEjT+Ai2ygdnm+yROfE0A,
linux-pm-u79uwXL29TY76Z2rM5mHXA, linux-0h96xk9xTtrk1uMJSBkQmQ,
lee.jones-QSEj5FYQhm4dnm+yROfE0A, balbi-l0cyMroinI0,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-lFZ/pmaqli7XmaaqVzeoHQ,
swarren-3lzwWm7+Weoh9ZMKESR00Q,
thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
gnurou-Re5JQEeQqe8AvxtiuMwx3w,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
Am Montag, den 27.10.2014, 16:26 +0000 schrieb Romain Perier:
> No longer use custom property to define poweroff capability, use the standard
> DT property instead.
>
> Signed-off-by: Romain Perier <romain.perier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/mfd/tps65910.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
> index 7612d89..a7faff2 100644
> --- a/drivers/mfd/tps65910.c
> +++ b/drivers/mfd/tps65910.c
> @@ -423,8 +423,7 @@ static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
>
> board_info->irq = client->irq;
> board_info->irq_base = -1;
> - board_info->pm_off = of_property_read_bool(np,
> - "ti,system-power-controller");
> + board_info->pm_off = of_is_system_power_controller();
>
> return board_info;
> }
You are breaking compatibility with older DTs here. This is not
acceptable.
You may change all in-tree DTs to use the new property and also patch
the driver to understand it, but you must make sure that the driver
still understands the old, custom property. And especially in this case
it isn't really hard to do.
Regards,
Lucas
--
Pengutronix e.K. | Lucas Stach |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v2 06/10] mfd: tps65910: Use the standard DT property system-power-controller
2014-10-27 16:35 ` Lucas Stach
@ 2014-10-27 16:41 ` Felipe Balbi
2014-10-27 16:43 ` Johan Hovold
2014-10-27 16:49 ` Heiko Stübner
0 siblings, 2 replies; 36+ messages in thread
From: Felipe Balbi @ 2014-10-27 16:41 UTC (permalink / raw)
To: Lucas Stach
Cc: Romain Perier, heiko, devicetree, broonie, lgirdwood,
linux-kernel, grant.likely, robh, mark.rutland, johan, linux-pm,
linux, lee.jones, balbi, robh+dt, pawel.moll, ijc+devicetree,
galak, linux, swarren, thierry.reding, gnurou, linux-arm-kernel,
linux-tegra
[-- Attachment #1: Type: text/plain, Size: 1393 bytes --]
On Mon, Oct 27, 2014 at 05:35:49PM +0100, Lucas Stach wrote:
> Am Montag, den 27.10.2014, 16:26 +0000 schrieb Romain Perier:
> > No longer use custom property to define poweroff capability, use the standard
> > DT property instead.
> >
> > Signed-off-by: Romain Perier <romain.perier@gmail.com>
> > ---
> > drivers/mfd/tps65910.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
> > index 7612d89..a7faff2 100644
> > --- a/drivers/mfd/tps65910.c
> > +++ b/drivers/mfd/tps65910.c
> > @@ -423,8 +423,7 @@ static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
> >
> > board_info->irq = client->irq;
> > board_info->irq_base = -1;
> > - board_info->pm_off = of_property_read_bool(np,
> > - "ti,system-power-controller");
> > + board_info->pm_off = of_is_system_power_controller();
> >
> > return board_info;
> > }
> You are breaking compatibility with older DTs here. This is not
> acceptable.
>
> You may change all in-tree DTs to use the new property and also patch
> the driver to understand it, but you must make sure that the driver
> still understands the old, custom property. And especially in this case
> it isn't really hard to do.
correct, it should be simple to hide that under
of_is_system_power_controller() itself.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v2 06/10] mfd: tps65910: Use the standard DT property system-power-controller
2014-10-27 16:41 ` Felipe Balbi
@ 2014-10-27 16:43 ` Johan Hovold
2014-10-27 16:53 ` Romain Perier
2014-10-27 16:49 ` Heiko Stübner
1 sibling, 1 reply; 36+ messages in thread
From: Johan Hovold @ 2014-10-27 16:43 UTC (permalink / raw)
To: Felipe Balbi
Cc: Lucas Stach, Romain Perier, heiko, devicetree, broonie, lgirdwood,
linux-kernel, grant.likely, robh, mark.rutland, johan, linux-pm,
linux, lee.jones, robh+dt, pawel.moll, ijc+devicetree, galak,
linux, swarren, thierry.reding, gnurou, linux-arm-kernel,
linux-tegra
On Mon, Oct 27, 2014 at 11:41:53AM -0500, Felipe Balbi wrote:
> On Mon, Oct 27, 2014 at 05:35:49PM +0100, Lucas Stach wrote:
> > Am Montag, den 27.10.2014, 16:26 +0000 schrieb Romain Perier:
> > > No longer use custom property to define poweroff capability, use the standard
> > > DT property instead.
> > >
> > > Signed-off-by: Romain Perier <romain.perier@gmail.com>
> > > ---
> > > drivers/mfd/tps65910.c | 3 +--
> > > 1 file changed, 1 insertion(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
> > > index 7612d89..a7faff2 100644
> > > --- a/drivers/mfd/tps65910.c
> > > +++ b/drivers/mfd/tps65910.c
> > > @@ -423,8 +423,7 @@ static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
> > >
> > > board_info->irq = client->irq;
> > > board_info->irq_base = -1;
> > > - board_info->pm_off = of_property_read_bool(np,
> > > - "ti,system-power-controller");
> > > + board_info->pm_off = of_is_system_power_controller();
> > >
> > > return board_info;
> > > }
> > You are breaking compatibility with older DTs here. This is not
> > acceptable.
> >
> > You may change all in-tree DTs to use the new property and also patch
> > the driver to understand it, but you must make sure that the driver
> > still understands the old, custom property. And especially in this case
> > it isn't really hard to do.
>
> correct, it should be simple to hide that under
> of_is_system_power_controller() itself.
Guys, take a look at the code (PATCH 1/10). ;)
Johan
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v2 06/10] mfd: tps65910: Use the standard DT property system-power-controller
2014-10-27 16:43 ` Johan Hovold
@ 2014-10-27 16:53 ` Romain Perier
0 siblings, 0 replies; 36+ messages in thread
From: Romain Perier @ 2014-10-27 16:53 UTC (permalink / raw)
To: Johan Hovold
Cc: Felipe Balbi, Lucas Stach, Heiko Stübner, devicetree,
Mark Brown, Liam Girdwood, Linux Kernel Mailing List,
Grant Likely, robh, mark.rutland, linux-pm, Guenter Roeck,
Lee Jones, robh+dt, pawel.moll, ijc+devicetree, Kumar Gala,
Russell King - ARM Linux, Stephen Warren, Thierry Reding,
Alexandre Courbot, linux-arm-kernel, linux-tegra@vger.kernel.org
Please take a look at "PATCH v1 1/10" of this serie, read it
carefully... it's already handled ^^
2014-10-27 17:43 GMT+01:00 Johan Hovold <johan@kernel.org>:
> On Mon, Oct 27, 2014 at 11:41:53AM -0500, Felipe Balbi wrote:
>> On Mon, Oct 27, 2014 at 05:35:49PM +0100, Lucas Stach wrote:
>> > Am Montag, den 27.10.2014, 16:26 +0000 schrieb Romain Perier:
>> > > No longer use custom property to define poweroff capability, use the standard
>> > > DT property instead.
>> > >
>> > > Signed-off-by: Romain Perier <romain.perier@gmail.com>
>> > > ---
>> > > drivers/mfd/tps65910.c | 3 +--
>> > > 1 file changed, 1 insertion(+), 2 deletions(-)
>> > >
>> > > diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
>> > > index 7612d89..a7faff2 100644
>> > > --- a/drivers/mfd/tps65910.c
>> > > +++ b/drivers/mfd/tps65910.c
>> > > @@ -423,8 +423,7 @@ static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
>> > >
>> > > board_info->irq = client->irq;
>> > > board_info->irq_base = -1;
>> > > - board_info->pm_off = of_property_read_bool(np,
>> > > - "ti,system-power-controller");
>> > > + board_info->pm_off = of_is_system_power_controller();
>> > >
>> > > return board_info;
>> > > }
>> > You are breaking compatibility with older DTs here. This is not
>> > acceptable.
>> >
>> > You may change all in-tree DTs to use the new property and also patch
>> > the driver to understand it, but you must make sure that the driver
>> > still understands the old, custom property. And especially in this case
>> > it isn't really hard to do.
>>
>> correct, it should be simple to hide that under
>> of_is_system_power_controller() itself.
>
> Guys, take a look at the code (PATCH 1/10). ;)
>
> Johan
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v2 06/10] mfd: tps65910: Use the standard DT property system-power-controller
2014-10-27 16:41 ` Felipe Balbi
2014-10-27 16:43 ` Johan Hovold
@ 2014-10-27 16:49 ` Heiko Stübner
2014-10-27 16:49 ` Felipe Balbi
1 sibling, 1 reply; 36+ messages in thread
From: Heiko Stübner @ 2014-10-27 16:49 UTC (permalink / raw)
To: balbi
Cc: Lucas Stach, Romain Perier, devicetree, broonie, lgirdwood,
linux-kernel, grant.likely, robh, mark.rutland, johan, linux-pm,
linux, lee.jones, robh+dt, pawel.moll, ijc+devicetree, galak,
linux, swarren, thierry.reding, gnurou, linux-arm-kernel,
linux-tegra
Am Montag, 27. Oktober 2014, 11:41:53 schrieb Felipe Balbi:
> On Mon, Oct 27, 2014 at 05:35:49PM +0100, Lucas Stach wrote:
> > Am Montag, den 27.10.2014, 16:26 +0000 schrieb Romain Perier:
> > > No longer use custom property to define poweroff capability, use the
> > > standard DT property instead.
> > >
> > > Signed-off-by: Romain Perier <romain.perier@gmail.com>
> > > ---
> > >
> > > drivers/mfd/tps65910.c | 3 +--
> > > 1 file changed, 1 insertion(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
> > > index 7612d89..a7faff2 100644
> > > --- a/drivers/mfd/tps65910.c
> > > +++ b/drivers/mfd/tps65910.c
> > > @@ -423,8 +423,7 @@ static struct tps65910_board
> > > *tps65910_parse_dt(struct i2c_client *client,> >
> > > board_info->irq = client->irq;
> > > board_info->irq_base = -1;
> > >
> > > - board_info->pm_off = of_property_read_bool(np,
> > > - "ti,system-power-controller");
> > > + board_info->pm_off = of_is_system_power_controller();
> > >
> > > return board_info;
> > >
> > > }
> >
> > You are breaking compatibility with older DTs here. This is not
> > acceptable.
> >
> > You may change all in-tree DTs to use the new property and also patch
> > the driver to understand it, but you must make sure that the driver
> > still understands the old, custom property. And especially in this case
> > it isn't really hard to do.
>
> correct, it should be simple to hide that under
> of_is_system_power_controller() itself.
If I'm reading patch 1 correctly, it already does handle the generic "system-
power-controller", as well as any foo,system-power-controller properties.
Heiko
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v2 06/10] mfd: tps65910: Use the standard DT property system-power-controller
2014-10-27 16:49 ` Heiko Stübner
@ 2014-10-27 16:49 ` Felipe Balbi
0 siblings, 0 replies; 36+ messages in thread
From: Felipe Balbi @ 2014-10-27 16:49 UTC (permalink / raw)
To: Heiko Stübner
Cc: balbi, Lucas Stach, Romain Perier, devicetree, broonie, lgirdwood,
linux-kernel, grant.likely, robh, mark.rutland, johan, linux-pm,
linux, lee.jones, robh+dt, pawel.moll, ijc+devicetree, galak,
linux, swarren, thierry.reding, gnurou, linux-arm-kernel,
linux-tegra
[-- Attachment #1: Type: text/plain, Size: 2395 bytes --]
On Mon, Oct 27, 2014 at 05:49:34PM +0100, Heiko Stübner wrote:
> Am Montag, 27. Oktober 2014, 11:41:53 schrieb Felipe Balbi:
> > On Mon, Oct 27, 2014 at 05:35:49PM +0100, Lucas Stach wrote:
> > > Am Montag, den 27.10.2014, 16:26 +0000 schrieb Romain Perier:
> > > > No longer use custom property to define poweroff capability, use the
> > > > standard DT property instead.
> > > >
> > > > Signed-off-by: Romain Perier <romain.perier@gmail.com>
> > > > ---
> > > >
> > > > drivers/mfd/tps65910.c | 3 +--
> > > > 1 file changed, 1 insertion(+), 2 deletions(-)
> > > >
> > > > diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
> > > > index 7612d89..a7faff2 100644
> > > > --- a/drivers/mfd/tps65910.c
> > > > +++ b/drivers/mfd/tps65910.c
> > > > @@ -423,8 +423,7 @@ static struct tps65910_board
> > > > *tps65910_parse_dt(struct i2c_client *client,> >
> > > > board_info->irq = client->irq;
> > > > board_info->irq_base = -1;
> > > >
> > > > - board_info->pm_off = of_property_read_bool(np,
> > > > - "ti,system-power-controller");
> > > > + board_info->pm_off = of_is_system_power_controller();
> > > >
> > > > return board_info;
> > > >
> > > > }
> > >
> > > You are breaking compatibility with older DTs here. This is not
> > > acceptable.
> > >
> > > You may change all in-tree DTs to use the new property and also patch
> > > the driver to understand it, but you must make sure that the driver
> > > still understands the old, custom property. And especially in this case
> > > it isn't really hard to do.
> >
> > correct, it should be simple to hide that under
> > of_is_system_power_controller() itself.
>
> If I'm reading patch 1 correctly, it already does handle the generic "system-
> power-controller", as well as any foo,system-power-controller properties.
that's very true, but it doesn't handle poweroff-source which, one way
or another, will be merged into Linus' tree creating a bisection point
where things won't work.
The best solution would be for those patches to be removed from
whichever tree they are, otherwise there will always be a commit in the
mainline kernel with that binding and, even if unlikely, there will
always be the possibility of people using that commit or a developer
having to bisect an issue only to find a few commits where things don't
even build.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v2 06/10] mfd: tps65910: Use the standard DT property system-power-controller
2014-10-27 16:26 ` [PATCH v2 06/10] mfd: tps65910: Use the standard DT " Romain Perier
[not found] ` <1414427215-14380-6-git-send-email-romain.perier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2014-10-27 16:41 ` Felipe Balbi
1 sibling, 0 replies; 36+ messages in thread
From: Felipe Balbi @ 2014-10-27 16:41 UTC (permalink / raw)
To: Romain Perier
Cc: heiko, devicetree, broonie, lgirdwood, linux-kernel, grant.likely,
robh, mark.rutland, johan, linux-pm, linux, lee.jones, balbi,
robh+dt, pawel.moll, ijc+devicetree, galak, linux, swarren,
thierry.reding, gnurou, linux-arm-kernel, linux-tegra
[-- Attachment #1: Type: text/plain, Size: 864 bytes --]
On Mon, Oct 27, 2014 at 04:26:51PM +0000, Romain Perier wrote:
> No longer use custom property to define poweroff capability, use the standard
> DT property instead.
>
> Signed-off-by: Romain Perier <romain.perier@gmail.com>
> ---
> drivers/mfd/tps65910.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
> index 7612d89..a7faff2 100644
> --- a/drivers/mfd/tps65910.c
> +++ b/drivers/mfd/tps65910.c
> @@ -423,8 +423,7 @@ static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
>
> board_info->irq = client->irq;
> board_info->irq_base = -1;
> - board_info->pm_off = of_property_read_bool(np,
> - "ti,system-power-controller");
> + board_info->pm_off = of_is_system_power_controller();
you didn't build-test this, did you ?
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v2 07/10] ARM: dts: tegra: Use standard power-off property in tps65911 for tegra30 apalis
2014-10-27 16:26 [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller" Romain Perier
` (4 preceding siblings ...)
2014-10-27 16:26 ` [PATCH v2 06/10] mfd: tps65910: Use the standard DT " Romain Perier
@ 2014-10-27 16:26 ` Romain Perier
[not found] ` <1414427215-14380-7-git-send-email-romain.perier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-27 16:26 ` [PATCH v2 08/10] ARM: dts: tegra: Use standard power-off property in tps65911 for tegra30 beaver Romain Perier
` (4 subsequent siblings)
10 siblings, 1 reply; 36+ messages in thread
From: Romain Perier @ 2014-10-27 16:26 UTC (permalink / raw)
To: heiko
Cc: devicetree, broonie, lgirdwood, linux-kernel, grant.likely, robh,
mark.rutland, johan, linux-pm, linux, lee.jones, balbi, robh+dt,
pawel.moll, ijc+devicetree, galak, linux, swarren, thierry.reding,
gnurou, linux-arm-kernel, linux-tegra
Signed-off-by: Romain Perier <romain.perier@gmail.com>
---
arch/arm/boot/dts/tegra30-apalis.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi
index a5446cb..ced4436 100644
--- a/arch/arm/boot/dts/tegra30-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis.dtsi
@@ -412,7 +412,7 @@
#interrupt-cells = <2>;
interrupt-controller;
- ti,system-power-controller;
+ system-power-controller;
#gpio-cells = <2>;
gpio-controller;
--
1.9.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v2 08/10] ARM: dts: tegra: Use standard power-off property in tps65911 for tegra30 beaver
2014-10-27 16:26 [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller" Romain Perier
` (5 preceding siblings ...)
2014-10-27 16:26 ` [PATCH v2 07/10] ARM: dts: tegra: Use standard power-off property in tps65911 for tegra30 apalis Romain Perier
@ 2014-10-27 16:26 ` Romain Perier
2014-10-27 16:42 ` Felipe Balbi
2014-10-27 16:26 ` [PATCH v2 09/10] ARM: dts: tegra: Use standard power-off property in tps65911 for tegra30 cardhu Romain Perier
` (3 subsequent siblings)
10 siblings, 1 reply; 36+ messages in thread
From: Romain Perier @ 2014-10-27 16:26 UTC (permalink / raw)
To: heiko
Cc: devicetree, broonie, lgirdwood, linux-kernel, grant.likely, robh,
mark.rutland, johan, linux-pm, linux, lee.jones, balbi, robh+dt,
pawel.moll, ijc+devicetree, galak, linux, swarren, thierry.reding,
gnurou, linux-arm-kernel, linux-tegra
Signed-off-by: Romain Perier <romain.perier@gmail.com>
---
arch/arm/boot/dts/tegra30-beaver.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/tegra30-beaver.dts b/arch/arm/boot/dts/tegra30-beaver.dts
index cee8f22..4abaf7f 100644
--- a/arch/arm/boot/dts/tegra30-beaver.dts
+++ b/arch/arm/boot/dts/tegra30-beaver.dts
@@ -188,7 +188,7 @@
#interrupt-cells = <2>;
interrupt-controller;
- ti,system-power-controller;
+ system-power-controller;
#gpio-cells = <2>;
gpio-controller;
--
1.9.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [PATCH v2 08/10] ARM: dts: tegra: Use standard power-off property in tps65911 for tegra30 beaver
2014-10-27 16:26 ` [PATCH v2 08/10] ARM: dts: tegra: Use standard power-off property in tps65911 for tegra30 beaver Romain Perier
@ 2014-10-27 16:42 ` Felipe Balbi
0 siblings, 0 replies; 36+ messages in thread
From: Felipe Balbi @ 2014-10-27 16:42 UTC (permalink / raw)
To: Romain Perier
Cc: heiko, devicetree, broonie, lgirdwood, linux-kernel, grant.likely,
robh, mark.rutland, johan, linux-pm, linux, lee.jones, balbi,
robh+dt, pawel.moll, ijc+devicetree, galak, linux, swarren,
thierry.reding, gnurou, linux-arm-kernel, linux-tegra
[-- Attachment #1: Type: text/plain, Size: 793 bytes --]
On Mon, Oct 27, 2014 at 04:26:53PM +0000, Romain Perier wrote:
> Signed-off-by: Romain Perier <romain.perier@gmail.com>
> ---
> arch/arm/boot/dts/tegra30-beaver.dts | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/tegra30-beaver.dts b/arch/arm/boot/dts/tegra30-beaver.dts
> index cee8f22..4abaf7f 100644
> --- a/arch/arm/boot/dts/tegra30-beaver.dts
> +++ b/arch/arm/boot/dts/tegra30-beaver.dts
> @@ -188,7 +188,7 @@
> #interrupt-cells = <2>;
> interrupt-controller;
>
> - ti,system-power-controller;
> + system-power-controller;
and this... likewise to all others. You should add regressions midway
through your series and you can't simply drop a DT binding which has
been shipped on stable kernels.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v2 09/10] ARM: dts: tegra: Use standard power-off property in tps65911 for tegra30 cardhu
2014-10-27 16:26 [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller" Romain Perier
` (6 preceding siblings ...)
2014-10-27 16:26 ` [PATCH v2 08/10] ARM: dts: tegra: Use standard power-off property in tps65911 for tegra30 beaver Romain Perier
@ 2014-10-27 16:26 ` Romain Perier
2014-10-27 16:26 ` [PATCH v2 10/10] ARM: dts: tegra: Use standard power-off property in tps65911 for tegra30 colibri Romain Perier
` (2 subsequent siblings)
10 siblings, 0 replies; 36+ messages in thread
From: Romain Perier @ 2014-10-27 16:26 UTC (permalink / raw)
To: heiko
Cc: devicetree, broonie, lgirdwood, linux-kernel, grant.likely, robh,
mark.rutland, johan, linux-pm, linux, lee.jones, balbi, robh+dt,
pawel.moll, ijc+devicetree, galak, linux, swarren, thierry.reding,
gnurou, linux-arm-kernel, linux-tegra
Signed-off-by: Romain Perier <romain.perier@gmail.com>
---
arch/arm/boot/dts/tegra30-cardhu.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi
index 2063795..46b4ff1 100644
--- a/arch/arm/boot/dts/tegra30-cardhu.dtsi
+++ b/arch/arm/boot/dts/tegra30-cardhu.dtsi
@@ -232,7 +232,7 @@
#interrupt-cells = <2>;
interrupt-controller;
- ti,system-power-controller;
+ system-power-controller;
#gpio-cells = <2>;
gpio-controller;
--
1.9.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v2 10/10] ARM: dts: tegra: Use standard power-off property in tps65911 for tegra30 colibri
2014-10-27 16:26 [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller" Romain Perier
` (7 preceding siblings ...)
2014-10-27 16:26 ` [PATCH v2 09/10] ARM: dts: tegra: Use standard power-off property in tps65911 for tegra30 cardhu Romain Perier
@ 2014-10-27 16:26 ` Romain Perier
2014-10-27 16:38 ` [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller" Felipe Balbi
2014-10-27 17:16 ` Johan Hovold
10 siblings, 0 replies; 36+ messages in thread
From: Romain Perier @ 2014-10-27 16:26 UTC (permalink / raw)
To: heiko
Cc: devicetree, broonie, lgirdwood, linux-kernel, grant.likely, robh,
mark.rutland, johan, linux-pm, linux, lee.jones, balbi, robh+dt,
pawel.moll, ijc+devicetree, galak, linux, swarren, thierry.reding,
gnurou, linux-arm-kernel, linux-tegra
Signed-off-by: Romain Perier <romain.perier@gmail.com>
---
arch/arm/boot/dts/tegra30-colibri.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/tegra30-colibri.dtsi b/arch/arm/boot/dts/tegra30-colibri.dtsi
index c4ed1be..7833fc3 100644
--- a/arch/arm/boot/dts/tegra30-colibri.dtsi
+++ b/arch/arm/boot/dts/tegra30-colibri.dtsi
@@ -190,7 +190,7 @@
#interrupt-cells = <2>;
interrupt-controller;
- ti,system-power-controller;
+ system-power-controller;
#gpio-cells = <2>;
gpio-controller;
--
1.9.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller"
2014-10-27 16:26 [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller" Romain Perier
` (8 preceding siblings ...)
2014-10-27 16:26 ` [PATCH v2 10/10] ARM: dts: tegra: Use standard power-off property in tps65911 for tegra30 colibri Romain Perier
@ 2014-10-27 16:38 ` Felipe Balbi
2014-10-27 16:41 ` Johan Hovold
2014-10-27 17:16 ` Johan Hovold
10 siblings, 1 reply; 36+ messages in thread
From: Felipe Balbi @ 2014-10-27 16:38 UTC (permalink / raw)
To: Romain Perier
Cc: heiko, devicetree, broonie, lgirdwood, linux-kernel, grant.likely,
robh, mark.rutland, johan, linux-pm, linux, lee.jones, balbi,
robh+dt, pawel.moll, ijc+devicetree, galak, linux, swarren,
thierry.reding, gnurou, linux-arm-kernel, linux-tegra
[-- Attachment #1: Type: text/plain, Size: 2752 bytes --]
On Mon, Oct 27, 2014 at 04:26:46PM +0000, Romain Perier wrote:
> As discussed on the mailing list, it makes more sense to rename this property
> to "system-power-controller". Problem being that the word "source" usually tends
> to be used for inputs and that is out of control of the OS. The poweroff
> capability is an output which simply turns the system-power off. Also, this
> property might be used by drivers which power-off the system and power back on
> subsequent RTC alarms. This seems to suggest to remove "poweroff" from the
> property name and to choose "system-power-controller" as the more generic name.
> This patchs adds the required renaming changes and defines an helper function
> which is compatible with both properties, the old one prefixed by a vendor name
> and the new one without any prefix.
>
> Signed-off-by: Romain Perier <romain.perier@gmail.com>
> ---
> include/linux/of.h | 27 +++++++++++++++++++++++----
> 1 file changed, 23 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 27b3ba1..c1ed2a5 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -867,14 +867,33 @@ static inline int of_changeset_update_property(struct of_changeset *ocs,
> extern int of_resolve_phandles(struct device_node *tree);
>
> /**
> - * of_system_has_poweroff_source - Tells if poweroff-source is found for device_node
> + * of_is_system_power_controller - Tells if the property for controlling system
> + * power is found in device_node.
> * @np: Pointer to the given device_node
> *
> * return true if present false otherwise
> */
> -static inline bool of_system_has_poweroff_source(const struct device_node *np)
> -{
> - return of_property_read_bool(np, "poweroff-source");
> +static inline bool of_is_system_power_controller(const struct device_node *np)
> +{
> + struct property *pp;
> + unsigned long flags;
> + char *sep;
> + bool found = false;
> +
> + raw_spin_lock_irqsave(&devtree_lock, flags);
> + for_each_property_of_node(np, pp) {
> + if (of_prop_cmp(pp->name, "system-power-controller") == 0) {
> + found = true;
> + break;
> + }
> + sep = strchr(pp->name, ',');
> + if (sep && sep - pp->name && of_prop_cmp(sep + 1, "system-power-controller") == 0) {
> + found = true;
> + break;
> + }
> + }
> + raw_spin_unlock_irqrestore(&devtree_lock, flags);
> + return found;
> }
>
> #endif /* _LINUX_OF_H */
I think you still need to support poweroff-source since it has been
released on a stable kernel. Perhaps add a warning message telling users
it's deprecated and asking them to switch over to
system-power-controller ? Still, simply removing it isn't very nice.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller"
2014-10-27 16:38 ` [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller" Felipe Balbi
@ 2014-10-27 16:41 ` Johan Hovold
2014-10-27 16:47 ` Felipe Balbi
0 siblings, 1 reply; 36+ messages in thread
From: Johan Hovold @ 2014-10-27 16:41 UTC (permalink / raw)
To: Felipe Balbi
Cc: Romain Perier, heiko, devicetree, broonie, lgirdwood,
linux-kernel, grant.likely, robh, mark.rutland, johan, linux-pm,
linux, lee.jones, robh+dt, pawel.moll, ijc+devicetree, galak,
linux, swarren, thierry.reding, gnurou, linux-arm-kernel,
linux-tegra
On Mon, Oct 27, 2014 at 11:38:40AM -0500, Felipe Balbi wrote:
> On Mon, Oct 27, 2014 at 04:26:46PM +0000, Romain Perier wrote:
> > As discussed on the mailing list, it makes more sense to rename this property
> > to "system-power-controller". Problem being that the word "source" usually tends
> > to be used for inputs and that is out of control of the OS. The poweroff
> > capability is an output which simply turns the system-power off. Also, this
> > property might be used by drivers which power-off the system and power back on
> > subsequent RTC alarms. This seems to suggest to remove "poweroff" from the
> > property name and to choose "system-power-controller" as the more generic name.
> > This patchs adds the required renaming changes and defines an helper function
> > which is compatible with both properties, the old one prefixed by a vendor name
> > and the new one without any prefix.
> I think you still need to support poweroff-source since it has been
> released on a stable kernel. Perhaps add a warning message telling users
> it's deprecated and asking them to switch over to
> system-power-controller ? Still, simply removing it isn't very nice.
No, Romain sent a patch that replaced "<vendor>,system-power-controller"
with "poweroff-source". It's now in Mark's tree (for v3.19), and this
series "reverts" to the old name minus the vendor-prefix.
Johan
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller"
2014-10-27 16:41 ` Johan Hovold
@ 2014-10-27 16:47 ` Felipe Balbi
2014-10-27 17:02 ` Johan Hovold
2014-10-27 17:05 ` Heiko Stübner
0 siblings, 2 replies; 36+ messages in thread
From: Felipe Balbi @ 2014-10-27 16:47 UTC (permalink / raw)
To: Johan Hovold
Cc: Felipe Balbi, Romain Perier, heiko, devicetree, broonie,
lgirdwood, linux-kernel, grant.likely, robh, mark.rutland,
linux-pm, linux, lee.jones, robh+dt, pawel.moll, ijc+devicetree,
galak, linux, swarren, thierry.reding, gnurou, linux-arm-kernel,
linux-tegra
[-- Attachment #1: Type: text/plain, Size: 1882 bytes --]
On Mon, Oct 27, 2014 at 05:41:03PM +0100, Johan Hovold wrote:
> On Mon, Oct 27, 2014 at 11:38:40AM -0500, Felipe Balbi wrote:
> > On Mon, Oct 27, 2014 at 04:26:46PM +0000, Romain Perier wrote:
> > > As discussed on the mailing list, it makes more sense to rename this property
> > > to "system-power-controller". Problem being that the word "source" usually tends
> > > to be used for inputs and that is out of control of the OS. The poweroff
> > > capability is an output which simply turns the system-power off. Also, this
> > > property might be used by drivers which power-off the system and power back on
> > > subsequent RTC alarms. This seems to suggest to remove "poweroff" from the
> > > property name and to choose "system-power-controller" as the more generic name.
> > > This patchs adds the required renaming changes and defines an helper function
> > > which is compatible with both properties, the old one prefixed by a vendor name
> > > and the new one without any prefix.
>
> > I think you still need to support poweroff-source since it has been
> > released on a stable kernel. Perhaps add a warning message telling users
> > it's deprecated and asking them to switch over to
> > system-power-controller ? Still, simply removing it isn't very nice.
>
> No, Romain sent a patch that replaced "<vendor>,system-power-controller"
> with "poweroff-source". It's now in Mark's tree (for v3.19), and this
> series "reverts" to the old name minus the vendor-prefix.
oh, so poweroff-source isn't in Linus' tree yet ? (/me goes grep)
Then it should be fine. My bad.
Many of the other comments are still valid because even though
poweroff-source isn't in mainline yet, this series still creates
bisection points which are broken. The best solution would be to drop
all those patches from Mark's tree. Read, not revert, drop.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller"
2014-10-27 16:47 ` Felipe Balbi
@ 2014-10-27 17:02 ` Johan Hovold
2014-10-27 17:05 ` Heiko Stübner
1 sibling, 0 replies; 36+ messages in thread
From: Johan Hovold @ 2014-10-27 17:02 UTC (permalink / raw)
To: Felipe Balbi
Cc: Johan Hovold, Romain Perier, heiko-4mtYJXux2i+zQB+pC5nmwQ,
devicetree-u79uwXL29TY76Z2rM5mHXA, broonie-DgEjT+Ai2ygdnm+yROfE0A,
lgirdwood-Re5JQEeQqe8AvxtiuMwx3w,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
grant.likely-QSEj5FYQhm4dnm+yROfE0A, robh-DgEjT+Ai2ygdnm+yROfE0A,
mark.rutland-5wv7dgnIgG8, linux-pm-u79uwXL29TY76Z2rM5mHXA,
linux-0h96xk9xTtrk1uMJSBkQmQ, lee.jones-QSEj5FYQhm4dnm+yROfE0A,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-lFZ/pmaqli7XmaaqVzeoHQ,
swarren-3lzwWm7+Weoh9ZMKESR00Q,
thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
gnurou-Re5JQEeQqe8AvxtiuMwx3w,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
On Mon, Oct 27, 2014 at 11:47:41AM -0500, Felipe Balbi wrote:
> On Mon, Oct 27, 2014 at 05:41:03PM +0100, Johan Hovold wrote:
> > On Mon, Oct 27, 2014 at 11:38:40AM -0500, Felipe Balbi wrote:
> > > On Mon, Oct 27, 2014 at 04:26:46PM +0000, Romain Perier wrote:
> > > > As discussed on the mailing list, it makes more sense to rename this property
> > > > to "system-power-controller". Problem being that the word "source" usually tends
> > > > to be used for inputs and that is out of control of the OS. The poweroff
> > > > capability is an output which simply turns the system-power off. Also, this
> > > > property might be used by drivers which power-off the system and power back on
> > > > subsequent RTC alarms. This seems to suggest to remove "poweroff" from the
> > > > property name and to choose "system-power-controller" as the more generic name.
> > > > This patchs adds the required renaming changes and defines an helper function
> > > > which is compatible with both properties, the old one prefixed by a vendor name
> > > > and the new one without any prefix.
> >
> > > I think you still need to support poweroff-source since it has been
> > > released on a stable kernel. Perhaps add a warning message telling users
> > > it's deprecated and asking them to switch over to
> > > system-power-controller ? Still, simply removing it isn't very nice.
> >
> > No, Romain sent a patch that replaced "<vendor>,system-power-controller"
> > with "poweroff-source". It's now in Mark's tree (for v3.19), and this
> > series "reverts" to the old name minus the vendor-prefix.
>
> oh, so poweroff-source isn't in Linus' tree yet ? (/me goes grep)
>
> Then it should be fine. My bad.
>
> Many of the other comments are still valid because even though
> poweroff-source isn't in mainline yet, this series still creates
> bisection points which are broken. The best solution would be to drop
> all those patches from Mark's tree. Read, not revert, drop.
I agree.
Johan
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller"
2014-10-27 16:47 ` Felipe Balbi
2014-10-27 17:02 ` Johan Hovold
@ 2014-10-27 17:05 ` Heiko Stübner
2014-10-27 17:08 ` Felipe Balbi
1 sibling, 1 reply; 36+ messages in thread
From: Heiko Stübner @ 2014-10-27 17:05 UTC (permalink / raw)
To: balbi
Cc: Johan Hovold, Romain Perier, devicetree, broonie, lgirdwood,
linux-kernel, grant.likely, robh, mark.rutland, linux-pm, linux,
lee.jones, robh+dt, pawel.moll, ijc+devicetree, galak, linux,
swarren, thierry.reding, gnurou, linux-arm-kernel, linux-tegra
Am Montag, 27. Oktober 2014, 11:47:41 schrieb Felipe Balbi:
> On Mon, Oct 27, 2014 at 05:41:03PM +0100, Johan Hovold wrote:
> > On Mon, Oct 27, 2014 at 11:38:40AM -0500, Felipe Balbi wrote:
> > > On Mon, Oct 27, 2014 at 04:26:46PM +0000, Romain Perier wrote:
> > > > As discussed on the mailing list, it makes more sense to rename this
> > > > property to "system-power-controller". Problem being that the word
> > > > "source" usually tends to be used for inputs and that is out of
> > > > control of the OS. The poweroff capability is an output which simply
> > > > turns the system-power off. Also, this property might be used by
> > > > drivers which power-off the system and power back on subsequent RTC
> > > > alarms. This seems to suggest to remove "poweroff" from the property
> > > > name and to choose "system-power-controller" as the more generic
> > > > name. This patchs adds the required renaming changes and defines an
> > > > helper function which is compatible with both properties, the old one
> > > > prefixed by a vendor name and the new one without any prefix.
> > >
> > > I think you still need to support poweroff-source since it has been
> > > released on a stable kernel. Perhaps add a warning message telling users
> > > it's deprecated and asking them to switch over to
> > > system-power-controller ? Still, simply removing it isn't very nice.
> >
> > No, Romain sent a patch that replaced "<vendor>,system-power-controller"
> > with "poweroff-source". It's now in Mark's tree (for v3.19), and this
> > series "reverts" to the old name minus the vendor-prefix.
>
> oh, so poweroff-source isn't in Linus' tree yet ? (/me goes grep)
>
> Then it should be fine. My bad.
>
> Many of the other comments are still valid because even though
> poweroff-source isn't in mainline yet, this series still creates
> bisection points which are broken. The best solution would be to drop
> all those patches from Mark's tree. Read, not revert, drop.
There have never been any users of the poweroff-source. The act8846 in the
radxarock would have been the first, but I held off with the dts patch as the
naming issue came up at the same time.
So I guess if Romain keeps the renaming together there shouldn't be any other
bad bisection points?
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller"
2014-10-27 17:05 ` Heiko Stübner
@ 2014-10-27 17:08 ` Felipe Balbi
0 siblings, 0 replies; 36+ messages in thread
From: Felipe Balbi @ 2014-10-27 17:08 UTC (permalink / raw)
To: Heiko Stübner
Cc: balbi-l0cyMroinI0, Johan Hovold, Romain Perier,
devicetree-u79uwXL29TY76Z2rM5mHXA, broonie-DgEjT+Ai2ygdnm+yROfE0A,
lgirdwood-Re5JQEeQqe8AvxtiuMwx3w,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
grant.likely-QSEj5FYQhm4dnm+yROfE0A, robh-DgEjT+Ai2ygdnm+yROfE0A,
mark.rutland-5wv7dgnIgG8, linux-pm-u79uwXL29TY76Z2rM5mHXA,
linux-0h96xk9xTtrk1uMJSBkQmQ, lee.jones-QSEj5FYQhm4dnm+yROfE0A,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-lFZ/pmaqli7XmaaqVzeoHQ,
swarren-3lzwWm7+Weoh9ZMKESR00Q,
thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
gnurou-Re5JQEeQqe8AvxtiuMwx3w,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 4096 bytes --]
On Mon, Oct 27, 2014 at 06:05:35PM +0100, Heiko Stübner wrote:
> Am Montag, 27. Oktober 2014, 11:47:41 schrieb Felipe Balbi:
> > On Mon, Oct 27, 2014 at 05:41:03PM +0100, Johan Hovold wrote:
> > > On Mon, Oct 27, 2014 at 11:38:40AM -0500, Felipe Balbi wrote:
> > > > On Mon, Oct 27, 2014 at 04:26:46PM +0000, Romain Perier wrote:
> > > > > As discussed on the mailing list, it makes more sense to rename this
> > > > > property to "system-power-controller". Problem being that the word
> > > > > "source" usually tends to be used for inputs and that is out of
> > > > > control of the OS. The poweroff capability is an output which simply
> > > > > turns the system-power off. Also, this property might be used by
> > > > > drivers which power-off the system and power back on subsequent RTC
> > > > > alarms. This seems to suggest to remove "poweroff" from the property
> > > > > name and to choose "system-power-controller" as the more generic
> > > > > name. This patchs adds the required renaming changes and defines an
> > > > > helper function which is compatible with both properties, the old one
> > > > > prefixed by a vendor name and the new one without any prefix.
> > > >
> > > > I think you still need to support poweroff-source since it has been
> > > > released on a stable kernel. Perhaps add a warning message telling users
> > > > it's deprecated and asking them to switch over to
> > > > system-power-controller ? Still, simply removing it isn't very nice.
> > >
> > > No, Romain sent a patch that replaced "<vendor>,system-power-controller"
> > > with "poweroff-source". It's now in Mark's tree (for v3.19), and this
> > > series "reverts" to the old name minus the vendor-prefix.
> >
> > oh, so poweroff-source isn't in Linus' tree yet ? (/me goes grep)
> >
> > Then it should be fine. My bad.
> >
> > Many of the other comments are still valid because even though
> > poweroff-source isn't in mainline yet, this series still creates
> > bisection points which are broken. The best solution would be to drop
> > all those patches from Mark's tree. Read, not revert, drop.
>
> There have never been any users of the poweroff-source. The act8846 in the
> radxarock would have been the first, but I held off with the dts patch as the
> naming issue came up at the same time.
>
> So I guess if Romain keeps the renaming together there shouldn't be any other
> bad bisection points?
Not build breaks, but there will always be the commit below:
commit a88f5c6deb2a44f694b01aac48231ec97059b26a
Author: Romain Perier <romain.perier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Tue Oct 14 06:31:12 2014 +0000
dt-bindings: Document the standard property "poweroff-source"
Signed-off-by: Romain Perier <romain.perier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
diff --git a/Documentation/devicetree/bindings/power/poweroff.txt b/Documentation/devicetree/bindings/power/poweroff.txt
new file mode 100644
index 0000000..845868b
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/poweroff.txt
@@ -0,0 +1,18 @@
+* Generic Poweroff capability
+
+Power-management integrated circuits or miscellaneous harware components are
+sometimes able to control the system power. The device driver associated to these
+components might needs to define poweroff capability, which tells to the kernel
+how to switch off the system. The corresponding driver must have the standard
+property "poweroff-source" in its device node. This property marks the device as
+able to shutdown the system. In order to test if this property is found
+programmatically, use the helper function "of_system_has_poweroff_source" from
+of.h .
+
+Example:
+
+act8846: act8846@5 {
+ compatible = "active-semi,act8846";
+ status = "okay";
+ poweroff-source;
+}
Even if for a small time frame, there will always be a commit where we
called "poweroff-source" a standard binding and, as such, as should
support it.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller"
2014-10-27 16:26 [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller" Romain Perier
` (9 preceding siblings ...)
2014-10-27 16:38 ` [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller" Felipe Balbi
@ 2014-10-27 17:16 ` Johan Hovold
2014-10-27 18:16 ` Romain Perier
10 siblings, 1 reply; 36+ messages in thread
From: Johan Hovold @ 2014-10-27 17:16 UTC (permalink / raw)
To: Romain Perier
Cc: heiko, devicetree, broonie, lgirdwood, linux-kernel, grant.likely,
robh, mark.rutland, johan, linux-pm, linux, lee.jones, balbi,
robh+dt, pawel.moll, ijc+devicetree, galak, linux, swarren,
thierry.reding, gnurou, linux-arm-kernel, linux-tegra
On Mon, Oct 27, 2014 at 04:26:46PM +0000, Romain Perier wrote:
> As discussed on the mailing list, it makes more sense to rename this property
> to "system-power-controller". Problem being that the word "source" usually tends
> to be used for inputs and that is out of control of the OS. The poweroff
> capability is an output which simply turns the system-power off. Also, this
> property might be used by drivers which power-off the system and power back on
> subsequent RTC alarms. This seems to suggest to remove "poweroff" from the
> property name and to choose "system-power-controller" as the more generic name.
> This patchs adds the required renaming changes and defines an helper function
> which is compatible with both properties, the old one prefixed by a vendor name
> and the new one without any prefix.
>
> Signed-off-by: Romain Perier <romain.perier@gmail.com>
> ---
> include/linux/of.h | 27 +++++++++++++++++++++++----
> 1 file changed, 23 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 27b3ba1..c1ed2a5 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -867,14 +867,33 @@ static inline int of_changeset_update_property(struct of_changeset *ocs,
> extern int of_resolve_phandles(struct device_node *tree);
>
> /**
> - * of_system_has_poweroff_source - Tells if poweroff-source is found for device_node
> + * of_is_system_power_controller - Tells if the property for controlling system
> + * power is found in device_node.
> * @np: Pointer to the given device_node
> *
> * return true if present false otherwise
> */
> -static inline bool of_system_has_poweroff_source(const struct device_node *np)
> -{
> - return of_property_read_bool(np, "poweroff-source");
> +static inline bool of_is_system_power_controller(const struct device_node *np)
> +{
> + struct property *pp;
> + unsigned long flags;
> + char *sep;
> + bool found = false;
> +
> + raw_spin_lock_irqsave(&devtree_lock, flags);
> + for_each_property_of_node(np, pp) {
> + if (of_prop_cmp(pp->name, "system-power-controller") == 0) {
> + found = true;
> + break;
> + }
> + sep = strchr(pp->name, ',');
> + if (sep && sep - pp->name && of_prop_cmp(sep + 1, "system-power-controller") == 0) {
> + found = true;
> + break;
> + }
> + }
> + raw_spin_unlock_irqrestore(&devtree_lock, flags);
> + return found;
> }
You probably don't want this to be inline.
Johan
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller"
2014-10-27 17:16 ` Johan Hovold
@ 2014-10-27 18:16 ` Romain Perier
0 siblings, 0 replies; 36+ messages in thread
From: Romain Perier @ 2014-10-27 18:16 UTC (permalink / raw)
To: Johan Hovold
Cc: Heiko Stübner, devicetree, Mark Brown, Liam Girdwood,
Linux Kernel Mailing List, Grant Likely, robh,
mark.rutland-5wv7dgnIgG8, linux-pm-u79uwXL29TY76Z2rM5mHXA,
Guenter Roeck, Lee Jones, Felipe Balbi,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll, ijc+devicetree,
Kumar Gala, Russell King - ARM Linux, Stephen Warren,
Thierry Reding, Alexandre Courbot,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
2014-10-27 18:16 GMT+01:00 Johan Hovold <johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>:
> You probably don't want this to be inline.
>
Yeah this is what I thought, I agree, it's a bit big to be inline... I
will fix it, I just wait a bit to see what is decided for this
serie...
^ permalink raw reply [flat|nested] 36+ messages in thread