diff mbox

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

Message ID 1413991587-11110-1-git-send-email-romain.perier@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Romain Perier Oct. 22, 2014, 3:26 p.m. UTC
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(-)

Comments

Romain Perier Oct. 22, 2014, 3:25 p.m. UTC | #1
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 <romain.perier@gmail.com>:
> 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..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
>
Lee Jones Oct. 22, 2014, 3:50 p.m. UTC | #2
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 <romain.perier@gmail.com>:
> > 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..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;
> >  }
> >
Romain Perier Oct. 23, 2014, 7:30 a.m. UTC | #3
2014-10-22 17:50 GMT+02:00 Lee Jones <lee.jones@linaro.org>:
> 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
Peter De Schrijver Oct. 23, 2014, 8:12 a.m. UTC | #4
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.
Romain Perier Oct. 23, 2014, 9:39 a.m. UTC | #5
Hi Peter,

2014-10-23 10:12 GMT+02:00 Peter De Schrijver <pdeschrijver@nvidia.com>:
> 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
Lee Jones Oct. 23, 2014, 10:02 a.m. UTC | #6
On Thu, 23 Oct 2014, PERIER Romain wrote:

> 2014-10-22 17:50 GMT+02:00 Lee Jones <lee.jones@linaro.org>:
> > 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.
Alexandre Courbot Oct. 24, 2014, 2:11 a.m. UTC | #7
On Thu, Oct 23, 2014 at 6:39 PM, PERIER Romain <romain.perier@gmail.com> wrote:
> Hi Peter,
>
> 2014-10-23 10:12 GMT+02:00 Peter De Schrijver <pdeschrijver@nvidia.com>:
>> 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.
Peter De Schrijver Oct. 24, 2014, 8:02 a.m. UTC | #8
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 <pdeschrijver@nvidia.com>:
> > 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.
Romain Perier Oct. 24, 2014, 9:04 a.m. UTC | #9
Okay, will do these changes.

2014-10-24 10:02 GMT+02:00 Peter De Schrijver <pdeschrijver@nvidia.com>:
> 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 <pdeschrijver@nvidia.com>:
>> > 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.
diff mbox

Patch

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;
 }