2014-10-22 15:23:24

by Romain Perier

[permalink] [raw]
Subject: [PATCH v1 1/5] mfd: tps65910: Convert ti,system-power-controller DT property to poweroff-source

No longer use custom property to define poweroff capability, use the standard
DT property instead.

Signed-off-by: Romain Perier <[email protected]>
---
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..b8dca8a 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_system_has_poweroff_source(np);

return board_info;
}
--
1.9.1


2014-10-22 15:23:27

by Romain Perier

[permalink] [raw]
Subject: [PATCH v1 2/5] ARM: dts: tegra: Use poweroff-source DT property in tps65911 for tegra30 apalis

Signed-off-by: Romain Perier <[email protected]>
---
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..796e83b 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;
+ poweroff-source;

#gpio-cells = <2>;
gpio-controller;
--
1.9.1

2014-10-22 15:23:31

by Romain Perier

[permalink] [raw]
Subject: [PATCH v1 4/5] ARM: dts: tegra: Use poweroff-source DT property in tps65911 for tegra30 cardhu

Signed-off-by: Romain Perier <[email protected]>
---
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..276784d 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;
+ poweroff-source;

#gpio-cells = <2>;
gpio-controller;
--
1.9.1

2014-10-22 15:23:35

by Romain Perier

[permalink] [raw]
Subject: [PATCH v1 5/5] ARM: dts: tegra: Use poweroff-source DT property in tps65911 for tegra30 colibri

Signed-off-by: Romain Perier <[email protected]>
---
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..e35c4d4 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;
+ poweroff-source;

#gpio-cells = <2>;
gpio-controller;
--
1.9.1

2014-10-22 15:24:01

by Romain Perier

[permalink] [raw]
Subject: [PATCH v1 3/5] ARM: dts: tegra: Use poweroff-source DT property in tps65911 for tegra30 beaver

Signed-off-by: Romain Perier <[email protected]>
---
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..47e01b6 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;
+ poweroff-source;

#gpio-cells = <2>;
gpio-controller;
--
1.9.1

2014-10-22 15:25:15

by Romain Perier

[permalink] [raw]
Subject: Re: [PATCH v1 1/5] mfd: tps65910: Convert ti,system-power-controller DT property to poweroff-source

This is related to the following subject "[RFC v3 PATCH 1/5] of: Add
standard property for poweroff capability" and depends on the
corresponding patch.

2014-10-22 17:26 GMT+02:00 Romain Perier <[email protected]>:
> No longer use custom property to define poweroff capability, use the standard
> DT property instead.
>
> Signed-off-by: Romain Perier <[email protected]>
> ---
> 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..b8dca8a 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_system_has_poweroff_source(np);
>
> return board_info;
> }
> --
> 1.9.1
>

2014-10-22 15:51:09

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH v1 1/5] mfd: tps65910: Convert ti,system-power-controller DT property to poweroff-source

On Wed, 22 Oct 2014, PERIER Romain wrote:

> This is related to the following subject "[RFC v3 PATCH 1/5] of: Add
> standard property for poweroff capability" and depends on the
> corresponding patch.

Then it should be sent in the same patch-set.

There's nothing I can do with this patch as is.

> 2014-10-22 17:26 GMT+02:00 Romain Perier <[email protected]>:
> > No longer use custom property to define poweroff capability, use the standard
> > DT property instead.
> >
> > Signed-off-by: Romain Perier <[email protected]>
> > ---
> > 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..b8dca8a 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_system_has_poweroff_source(np);
> >
> > return board_info;
> > }
> >

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

2014-10-23 07:30:16

by Romain Perier

[permalink] [raw]
Subject: Re: [PATCH v1 1/5] mfd: tps65910: Convert ti,system-power-controller DT property to poweroff-source

2014-10-22 17:50 GMT+02:00 Lee Jones <[email protected]>:
> On Wed, 22 Oct 2014, PERIER Romain wrote:
>
>> This is related to the following subject "[RFC v3 PATCH 1/5] of: Add
>> standard property for poweroff capability" and depends on the
>> corresponding patch.
>
> Then it should be sent in the same patch-set.
>
> There's nothing I can do with this patch as is.
>

Even if this patch is already commited and present in "linux-next" ?
(or in Mark Brown's regulator tree)

Romain

2014-10-23 08:12:45

by Peter De Schrijver

[permalink] [raw]
Subject: Re: [PATCH v1 1/5] mfd: tps65910: Convert ti,system-power-controller DT property to poweroff-source

On Wed, Oct 22, 2014 at 03:26:23PM +0000, Romain Perier wrote:
> No longer use custom property to define poweroff capability, use the standard
> DT property instead.
>

This breaks DT ABI stability right? An existing device tree using ti,system-power-controller won't work anymore after this patch right? I don't think that's acceptable.

CHeers,

Peter.

2014-10-23 09:39:38

by Romain Perier

[permalink] [raw]
Subject: Re: [PATCH v1 1/5] mfd: tps65910: Convert ti,system-power-controller DT property to poweroff-source

Hi Peter,

2014-10-23 10:12 GMT+02:00 Peter De Schrijver <[email protected]>:
> This breaks DT ABI stability right? An existing device tree using ti,system-power-controller won't work anymore after this patch right? I don't think that's acceptable.
>

This is why I converted all dts which use "ti,system-power-controller"
and tps65910/tps65911 to the new property (everything is in the
patches serie). However, with an existing dtb it will no longer work,
yes.
What do you suggest ? keep these two properties in the driver ? :/

I mean, this is a standardization, so all the corresponding dts must
be updated and rebuilt... Like when you change something in a
dt-binding, you should update and rebuilt the dts... I Don't compute.

Romain

2014-10-23 10:02:43

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH v1 1/5] mfd: tps65910: Convert ti,system-power-controller DT property to poweroff-source

On Thu, 23 Oct 2014, PERIER Romain wrote:

> 2014-10-22 17:50 GMT+02:00 Lee Jones <[email protected]>:
> > On Wed, 22 Oct 2014, PERIER Romain wrote:
> >
> >> This is related to the following subject "[RFC v3 PATCH 1/5] of: Add
> >> standard property for poweroff capability" and depends on the
> >> corresponding patch.
> >
> > Then it should be sent in the same patch-set.
> >
> > There's nothing I can do with this patch as is.
> >
>
> Even if this patch is already commited and present in "linux-next" ?
> (or in Mark Brown's regulator tree)

Usually it wouldn't be possible to take this, as it would be
difficult to ensure bisectability. The way we usually deal with this
is to have a shared immutable branch between the effected subsystems,
but we can only do this if the patches are sent as a set. However, it
appears as though Mark has "of: Add standard property for poweroff
capability" on a tagged branch on its own. This means, after checking
with Mark that this branch in indeed stable, I can merge it in and
base this commit on top of it. Not many people setup their repos like
Mark does, so I guess you are lucky this time.

Once I've heard back from Mark, I'll let you know when I apply the
patch.

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

2014-10-24 02:11:55

by Alexandre Courbot

[permalink] [raw]
Subject: Re: [PATCH v1 1/5] mfd: tps65910: Convert ti,system-power-controller DT property to poweroff-source

On Thu, Oct 23, 2014 at 6:39 PM, PERIER Romain <[email protected]> wrote:
> Hi Peter,
>
> 2014-10-23 10:12 GMT+02:00 Peter De Schrijver <[email protected]>:
>> This breaks DT ABI stability right? An existing device tree using ti,system-power-controller won't work anymore after this patch right? I don't think that's acceptable.
>>
>
> This is why I converted all dts which use "ti,system-power-controller"
> and tps65910/tps65911 to the new property (everything is in the
> patches serie). However, with an existing dtb it will no longer work,
> yes.
> What do you suggest ? keep these two properties in the driver ? :/
>
> I mean, this is a standardization, so all the corresponding dts must
> be updated and rebuilt... Like when you change something in a
> dt-binding, you should update and rebuilt the dts... I Don't compute.

DT ABI stability rule: any DTB that worked with kernel x must also
work with kernel x+1. It seems like this patch would break that rule.

It's ok to manage new properties and to deprecate the use of older
ones if it makes sense (and in this case it seems like it does). But
the old property must still be handled for compatibility reasons.

2014-10-24 09:04:24

by Romain Perier

[permalink] [raw]
Subject: Re: [PATCH v1 1/5] mfd: tps65910: Convert ti,system-power-controller DT property to poweroff-source

Okay, will do these changes.

2014-10-24 10:02 GMT+02:00 Peter De Schrijver <[email protected]>:
> On Thu, Oct 23, 2014 at 11:39:34AM +0200, PERIER Romain wrote:
>> Hi Peter,
>>
>> 2014-10-23 10:12 GMT+02:00 Peter De Schrijver <[email protected]>:
>> > This breaks DT ABI stability right? An existing device tree using ti,system-power-controller won't work anymore after this patch right? I don't think that's acceptable.
>> >
>>
>> This is why I converted all dts which use "ti,system-power-controller"
>> and tps65910/tps65911 to the new property (everything is in the
>> patches serie). However, with an existing dtb it will no longer work,
>> yes.
>> What do you suggest ? keep these two properties in the driver ? :/
>>
>
> Yes. Existing DTs should work with new kernels. So there's no other choice
> than leaving support for the existing property in place. Obviously DTs for new
> boards can use the new standardized property.
>
> Cheers,
>
> Peter.