2013-08-21 12:40:40

by Johannes Thumshirn

[permalink] [raw]
Subject: [PATCH] documentation/devicetree: Move DT bindigns from gpio to watchdog

I accidently put the devicetree bindings for the MEN A21 watchdog driver in
Documentation/devicetree/bindings/gpio instead of
Documentation/devicetree/bindings/watchdog, this patch addresses this error.

Signed-off-by: Johannes Thumshirn <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Pawel Moll <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Ian Campbell <[email protected]>
Cc: Rob Landley <[email protected]>
Cc: Wim Van Sebroeck <[email protected]>
Cc: Guenter Roeck <[email protected]>
---
.../bindings/{gpio => watchdog}/men-a021-wdt.txt | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename Documentation/devicetree/bindings/{gpio => watchdog}/men-a021-wdt.txt (100%)

diff --git a/Documentation/devicetree/bindings/gpio/men-a021-wdt.txt b/Documentation/devicetree/bindings/watchdog/men-a021-wdt.txt
similarity index 100%
rename from Documentation/devicetree/bindings/gpio/men-a021-wdt.txt
rename to Documentation/devicetree/bindings/watchdog/men-a021-wdt.txt
--
1.7.9.5


2013-08-21 17:34:07

by Stephen Warren

[permalink] [raw]
Subject: Re: [PATCH] documentation/devicetree: Move DT bindigns from gpio to watchdog

On 08/21/2013 06:42 AM, Johannes Thumshirn wrote:
> I accidently put the devicetree bindings for the MEN A21 watchdog driver in
> Documentation/devicetree/bindings/gpio instead of
> Documentation/devicetree/bindings/watchdog, this patch addresses this error.

The rename sounds fine, so that part,
Acked-by: Stephen Warren <[email protected]>

However, the binding itself doesn't look right; it appears to have a
single "gpios" property rather than using separate named xxx-gpios
properties for different things...

2013-08-22 07:38:26

by Johannes Thumshirn

[permalink] [raw]
Subject: Re: [PATCH] documentation/devicetree: Move DT bindigns from gpio to watchdog

On Wed, Aug 21, 2013 at 11:34:00AM -0600, Stephen Warren wrote:
> On 08/21/2013 06:42 AM, Johannes Thumshirn wrote:
> > I accidently put the devicetree bindings for the MEN A21 watchdog driver in
> > Documentation/devicetree/bindings/gpio instead of
> > Documentation/devicetree/bindings/watchdog, this patch addresses this error.
>
> The rename sounds fine, so that part,
> Acked-by: Stephen Warren <[email protected]>
>
> However, the binding itself doesn't look right; it appears to have a
> single "gpios" property rather than using separate named xxx-gpios
> properties for different things...

Ok, so I'll need something like the following?

watchdog {
compatible ="men,a021-wdt";
enable-gpios = <&gpio3 9 1>; /* WD_EN */
fast-gpios = <&gpio3 10 1>; /* WD_FAST */
trig-gpios = <&gpio3 11 1>; /* WD_TRIG */
rst0-gpio = <&gpio3 6 1>; /* RST_CAUSE[0] */
rst1-gpio = <&gpio3 7 1>; /* RST_CAUSE[1] */
rst2-gpio = <&gpio3 8 1>; /* RST_CAUSE[2] */
};

Or is there something like of_get_named_gpios(...) so I can put all 3 rst-gpios
into one property? A quick grep only revealed of_get_named_gpio(...).

Thanks,
Johannes

2013-08-22 20:20:56

by Stephen Warren

[permalink] [raw]
Subject: Re: [PATCH] documentation/devicetree: Move DT bindigns from gpio to watchdog

On 08/22/2013 01:37 AM, Johannes Thumshirn wrote:
> On Wed, Aug 21, 2013 at 11:34:00AM -0600, Stephen Warren wrote:
>> On 08/21/2013 06:42 AM, Johannes Thumshirn wrote:
>>> I accidently put the devicetree bindings for the MEN A21 watchdog driver in
>>> Documentation/devicetree/bindings/gpio instead of
>>> Documentation/devicetree/bindings/watchdog, this patch addresses this error.
>>
>> The rename sounds fine, so that part,
>> Acked-by: Stephen Warren <[email protected]>
>>
>> However, the binding itself doesn't look right; it appears to have a
>> single "gpios" property rather than using separate named xxx-gpios
>> properties for different things...
>
> Ok, so I'll need something like the following?
>
> watchdog {
> compatible ="men,a021-wdt";
> enable-gpios = <&gpio3 9 1>; /* WD_EN */
> fast-gpios = <&gpio3 10 1>; /* WD_FAST */
> trig-gpios = <&gpio3 11 1>; /* WD_TRIG */
> rst0-gpio = <&gpio3 6 1>; /* RST_CAUSE[0] */
> rst1-gpio = <&gpio3 7 1>; /* RST_CAUSE[1] */
> rst2-gpio = <&gpio3 8 1>; /* RST_CAUSE[2] */
> };

Yes, that looks more like what I'd expect, albeit I'd probably expect to
see a rst-gpio property with 3 entries.

> Or is there something like of_get_named_gpios(...) so I can put all 3 rst-gpios
> into one property? A quick grep only revealed of_get_named_gpio(...).

The availablity of APIs within Linux shouldn't impact the binding
definitions. I would imagine it's easy enough to add
of_get_named_gpio_by_index() or similar to Linux.

2013-08-27 11:17:47

by Johannes Thumshirn

[permalink] [raw]
Subject: [RFC][PATCH v2] documentation/devicetree: Move DT bindigns from gpio to watchdog

I accidently put the devicetree bindings for the MEN A21 watchdog driver in
Documentation/devicetree/bindings/gpio instead of
Documentation/devicetree/bindings/watchdog, this patch addresses this error.

Signed-off-by: Johannes Thumshirn <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Pawel Moll <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Ian Campbell <[email protected]>
Cc: Rob Landley <[email protected]>
Cc: Wim Van Sebroeck <[email protected]>
Cc: Guenter Roeck <[email protected]>
---
Changes to v1:
- Use named gpios, as suggested by Stephen Warren

.../bindings/{gpio => watchdog}/men-a021-wdt.txt | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
rename Documentation/devicetree/bindings/{gpio => watchdog}/men-a021-wdt.txt (61%)

diff --git a/Documentation/devicetree/bindings/gpio/men-a021-wdt.txt b/Documentation/devicetree/bindings/watchdog/men-a021-wdt.txt
similarity index 61%
rename from Documentation/devicetree/bindings/gpio/men-a021-wdt.txt
rename to Documentation/devicetree/bindings/watchdog/men-a021-wdt.txt
index 370dee3..0008f28 100644
--- a/Documentation/devicetree/bindings/gpio/men-a021-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/men-a021-wdt.txt
@@ -16,10 +16,10 @@ Optional properties:
Example:
watchdog {
compatible ="men,a021-wdt";
- gpios = <&gpio3 9 1 /* WD_EN */
- &gpio3 10 1 /* WD_FAST */
- &gpio3 11 1 /* WD_TRIG */
- &gpio3 6 1 /* RST_CAUSE[0] */
- &gpio3 7 1 /* RST_CAUSE[1] */
- &gpio3 8 1>; /* RST_CAUSE[2] */
+ enable-gpio = <&gpio3 9 1>; /* WD_EN */
+ fast-gpio = <&gpio3 10 1>; /* WD_FAST */
+ trig-gpio = <&gpio3 11 1>; /* WD_TRIG */
+ rst-gpios = <&gpio3 6 1 /* RST_CAUSE[0] */
+ &gpio3 7 1 /* RST_CAUSE[1] */
+ &gpio3 8 1>; /* RST_CAUSE[2] */
};
--
1.7.9.5

2013-08-27 21:41:49

by Stephen Warren

[permalink] [raw]
Subject: Re: [RFC][PATCH v2] documentation/devicetree: Move DT bindigns from gpio to watchdog

On 08/27/2013 05:10 AM, Johannes Thumshirn wrote:
> I accidently put the devicetree bindings for the MEN A21 watchdog driver in
> Documentation/devicetree/bindings/gpio instead of
> Documentation/devicetree/bindings/watchdog, this patch addresses this error.

> Changes to v1:
> - Use named gpios, as suggested by Stephen Warren

The move and the change to the binding should probably be separate
patches since they're logically separate things. I didn't intend you to
update the rename patch to fix the binding issue I pointed out.

Is the driver updated for this binding change? Are there DTs in released
kernels that won't work now, or is the driver very new; there may be a
need for the driver to support the old binding and the binding doc to
document the old gpios property, but mark it deprecated.

2013-08-28 06:29:13

by Johannes Thumshirn

[permalink] [raw]
Subject: Re: [RFC][PATCH v2] documentation/devicetree: Move DT bindigns from gpio to watchdog

On Tue, Aug 27, 2013 at 03:41:42PM -0600, Stephen Warren wrote:
> On 08/27/2013 05:10 AM, Johannes Thumshirn wrote:
> > I accidently put the devicetree bindings for the MEN A21 watchdog driver in
> > Documentation/devicetree/bindings/gpio instead of
> > Documentation/devicetree/bindings/watchdog, this patch addresses this error.
>
> > Changes to v1:
> > - Use named gpios, as suggested by Stephen Warren
>
> The move and the change to the binding should probably be separate
> patches since they're logically separate things. I didn't intend you to
> update the rename patch to fix the binding issue I pointed out.
>

Oops. Looks like I've misunderstood you there. I'll re-send the rename patch
then.

> Is the driver updated for this binding change? Are there DTs in released
> kernels that won't work now, or is the driver very new; there may be a
> need for the driver to support the old binding and the binding doc to
> document the old gpios property, but mark it deprecated.

The driver is not yet updated, this is why I've sent it as an RFC. Are the
bindings acceptable this way? If yes I'll update the driver and re-send the
bindings with the driver as a new patch series.

Johannes

2013-08-28 14:38:59

by Stephen Warren

[permalink] [raw]
Subject: Re: [RFC][PATCH v2] documentation/devicetree: Move DT bindigns from gpio to watchdog

On 08/28/2013 12:22 AM, Johannes Thumshirn wrote:
> On Tue, Aug 27, 2013 at 03:41:42PM -0600, Stephen Warren wrote:
>> On 08/27/2013 05:10 AM, Johannes Thumshirn wrote:
>>> I accidently put the devicetree bindings for the MEN A21 watchdog driver in
>>> Documentation/devicetree/bindings/gpio instead of
>>> Documentation/devicetree/bindings/watchdog, this patch addresses this error.
>>
>>> Changes to v1:
>>> - Use named gpios, as suggested by Stephen Warren
>>
>> The move and the change to the binding should probably be separate
>> patches since they're logically separate things. I didn't intend you to
>> update the rename patch to fix the binding issue I pointed out.
>>
>
> Oops. Looks like I've misunderstood you there. I'll re-send the rename patch
> then.
>
>> Is the driver updated for this binding change? Are there DTs in released
>> kernels that won't work now, or is the driver very new; there may be a
>> need for the driver to support the old binding and the binding doc to
>> document the old gpios property, but mark it deprecated.
>
> The driver is not yet updated, this is why I've sent it as an RFC. Are the
> bindings acceptable this way? If yes I'll update the driver and re-send the
> bindings with the driver as a new patch series.

Well, XXX says:

> GPIO properties should be named "[<name>-]gpios"

whereas in this patch, some of the renamed properties were "-gpio"
rather than "-gpios". Aside from that, the new binding looks reasonable.

However, I see that the existing binding will be released as part of
v3.11. That implies that we should continue to support the old binding
for compatibility. As such, I'm not convinced whether it's worth
changing this binding now.

2013-08-28 15:01:30

by Johannes Thumshirn

[permalink] [raw]
Subject: Re: [RFC][PATCH v2] documentation/devicetree: Move DT bindigns from gpio to watchdog

On Wed, Aug 28, 2013 at 08:38:56AM -0600, Stephen Warren wrote:
> On 08/28/2013 12:22 AM, Johannes Thumshirn wrote:
> > On Tue, Aug 27, 2013 at 03:41:42PM -0600, Stephen Warren wrote:
> >> On 08/27/2013 05:10 AM, Johannes Thumshirn wrote:
> >>> I accidently put the devicetree bindings for the MEN A21 watchdog driver in
> >>> Documentation/devicetree/bindings/gpio instead of
> >>> Documentation/devicetree/bindings/watchdog, this patch addresses this error.
> >>
> >>> Changes to v1:
> >>> - Use named gpios, as suggested by Stephen Warren
> >>
> >> The move and the change to the binding should probably be separate
> >> patches since they're logically separate things. I didn't intend you to
> >> update the rename patch to fix the binding issue I pointed out.
> >>
> >
> > Oops. Looks like I've misunderstood you there. I'll re-send the rename patch
> > then.
> >
> >> Is the driver updated for this binding change? Are there DTs in released
> >> kernels that won't work now, or is the driver very new; there may be a
> >> need for the driver to support the old binding and the binding doc to
> >> document the old gpios property, but mark it deprecated.
> >
> > The driver is not yet updated, this is why I've sent it as an RFC. Are the
> > bindings acceptable this way? If yes I'll update the driver and re-send the
> > bindings with the driver as a new patch series.
>
> Well, XXX says:
>
> > GPIO properties should be named "[<name>-]gpios"
>
> whereas in this patch, some of the renamed properties were "-gpio"
> rather than "-gpios". Aside from that, the new binding looks reasonable.
>
> However, I see that the existing binding will be released as part of
> v3.11. That implies that we should continue to support the old binding
> for compatibility. As such, I'm not convinced whether it's worth
> changing this binding now.

Well I'm be perfectly happy with not changing the bindings and therefore not
changing the driver. If this O.K. for you.

Should I resend my 1st patch, or is it O.K. to pick up the old one?

Johannes

2013-10-01 16:18:43

by Guenter Roeck

[permalink] [raw]
Subject: Re: [RFC, v2] documentation/devicetree: Move DT bindigns from gpio to watchdog

On Tue, Aug 27, 2013 at 07:10:37PM -0000, [email protected] wrote:
> I accidently put the devicetree bindings for the MEN A21 watchdog driver in
> Documentation/devicetree/bindings/gpio instead of
> Documentation/devicetree/bindings/watchdog, this patch addresses this error.
>
> Signed-off-by: Johannes Thumshirn <[email protected]>
> Cc: Rob Herring <[email protected]>
> Cc: Pawel Moll <[email protected]>
> Cc: Mark Rutland <[email protected]>
> Cc: Stephen Warren <[email protected]>
> Cc: Ian Campbell <[email protected]>
> Cc: Rob Landley <[email protected]>
> Cc: Wim Van Sebroeck <[email protected]>
> Cc: Guenter Roeck <[email protected]>
>
Reviewed-by: Guenter Roeck <[email protected]>

2013-10-29 07:42:04

by Wim Van Sebroeck

[permalink] [raw]
Subject: Re: [PATCH] documentation/devicetree: Move DT bindigns from gpio to watchdog

Hi Johannes,

> I accidently put the devicetree bindings for the MEN A21 watchdog driver in
> Documentation/devicetree/bindings/gpio instead of
> Documentation/devicetree/bindings/watchdog, this patch addresses this error.
>
> Signed-off-by: Johannes Thumshirn <[email protected]>
> Cc: Rob Herring <[email protected]>
> Cc: Pawel Moll <[email protected]>
> Cc: Mark Rutland <[email protected]>
> Cc: Stephen Warren <[email protected]>
> Cc: Ian Campbell <[email protected]>
> Cc: Rob Landley <[email protected]>
> Cc: Wim Van Sebroeck <[email protected]>
> Cc: Guenter Roeck <[email protected]>
> ---
> .../bindings/{gpio => watchdog}/men-a021-wdt.txt | 0
> 1 file changed, 0 insertions(+), 0 deletions(-)
> rename Documentation/devicetree/bindings/{gpio => watchdog}/men-a021-wdt.txt (100%)
>
> diff --git a/Documentation/devicetree/bindings/gpio/men-a021-wdt.txt b/Documentation/devicetree/bindings/watchdog/men-a021-wdt.txt
> similarity index 100%
> rename from Documentation/devicetree/bindings/gpio/men-a021-wdt.txt
> rename to Documentation/devicetree/bindings/watchdog/men-a021-wdt.txt

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.

2013-10-29 09:42:32

by Johannes Thumshirn

[permalink] [raw]
Subject: Re: [PATCH] documentation/devicetree: Move DT bindigns from gpio to watchdog

On Tue, Oct 29, 2013 at 08:41:53AM +0100, Wim Van Sebroeck wrote:
> Hi Johannes,
>
> > I accidently put the devicetree bindings for the MEN A21 watchdog driver in
> > Documentation/devicetree/bindings/gpio instead of
> > Documentation/devicetree/bindings/watchdog, this patch addresses this error.
> >
> > Signed-off-by: Johannes Thumshirn <[email protected]>
> > Cc: Rob Herring <[email protected]>
> > Cc: Pawel Moll <[email protected]>
> > Cc: Mark Rutland <[email protected]>
> > Cc: Stephen Warren <[email protected]>
> > Cc: Ian Campbell <[email protected]>
> > Cc: Rob Landley <[email protected]>
> > Cc: Wim Van Sebroeck <[email protected]>
> > Cc: Guenter Roeck <[email protected]>
> > ---
> > .../bindings/{gpio => watchdog}/men-a021-wdt.txt | 0
> > 1 file changed, 0 insertions(+), 0 deletions(-)
> > rename Documentation/devicetree/bindings/{gpio => watchdog}/men-a021-wdt.txt (100%)
> >
> > diff --git a/Documentation/devicetree/bindings/gpio/men-a021-wdt.txt b/Documentation/devicetree/bindings/watchdog/men-a021-wdt.txt
> > similarity index 100%
> > rename from Documentation/devicetree/bindings/gpio/men-a021-wdt.txt
> > rename to Documentation/devicetree/bindings/watchdog/men-a021-wdt.txt
>
> This patch has been added to linux-watchdog-next.
>
> Kind regards,
> Wim.
>

Thanks Wim

Johannes