diff mbox series

[6/6] dt-bindings: misc: correct the property name cmd-gpios to cmd-gpio

Message ID 20201013160845.1772-7-thunder.leizhen@huawei.com
State New
Headers show
Series fix all errors except one reported by dt_binding_check | expand

Commit Message

Zhen Lei Oct. 13, 2020, 4:08 p.m. UTC
The property name used in arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts is
cmd-gpio.

arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:235:
cmd-gpio = <&gpio 155 GPIO_ACTIVE_HIGH>;

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Zhen Lei Oct. 15, 2020, 3:23 a.m. UTC | #1
On 2020/10/14 21:50, Rob Herring wrote:
> On Wed, Oct 14, 2020 at 09:29:26AM +0800, Leizhen (ThunderTown) wrote:

>>

>>

>> On 2020/10/14 1:32, Dan Murphy wrote:

>>> Zhen

>>>

>>> On 10/13/20 11:08 AM, Zhen Lei wrote:

>>>> The property name used in arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts is

>>>> cmd-gpio.

>>>>

>>>> arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:235:

>>>> cmd-gpio = <&gpio 155 GPIO_ACTIVE_HIGH>;

>>>>

>>>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>

>>>> ---

>>>>   Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml | 6 +++---

>>>>   1 file changed, 3 insertions(+), 3 deletions(-)

>>>>

>>>> diff --git a/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml b/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml

>>>> index b3c45c046ba5e37..c7a06a9650db2ed 100644

>>>> --- a/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml

>>>> +++ b/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml

>>>> @@ -24,7 +24,7 @@ properties:

>>>>     compatible:

>>>>       const: olpc,xo1.75-ec

>>>>   -  cmd-gpios:

>>>> +  cmd-gpio:

>>>

>>> Preference is gpios not gpio. But Rob H accept or reject

>>

>> Look at the search result below. It seems that the driver have not been merged into mainline.

> 

> Yes, in drivers/platform/olpc/olpc-xo175-ec.c.

> 

> Your mistake is the gpiod api takes just 'cmd' as the GPIO core handles 

> both forms.


OK, thanks for your information. I have found that it defined by gpio_suffixes[].

> 

>> But the property name is really used as cmd-gpio at mmp2-olpc-xo-1-75.dts:235, I don't think

>> the mmp2-olpc-xo-1-75.dts can make a mistake. Otherwise, the driver will not work properly.

>> Meanwhile, Both names cmd-gpios and cmd-gpio seem to be in use. But I prefer cmd-gpio, after

>> all, only one gpio is assigned now. The motorola,cmd-gpios add "s" because it contains 3 gpio.

> 

> The preference is it is always '-gpios' just like it's always 

> 'interrupts' or 'clocks'.

> 

> However, whether to change this is really up to the OLPC folks. Given 

> the driver has always supported both forms, it should be okay to change 

> the dts. Though there could be other users besides the kernel.


If both "cmd-gpios" and "cmd-gpio" are supported, should we use enum to list both
of them in yaml? or use patternProperties?

I'm going to send v2 based on this idea.

> 

> Rob

> 

> .

>
Rob Herring Oct. 16, 2020, 2:13 p.m. UTC | #2
On Wed, Oct 14, 2020 at 10:23 PM Leizhen (ThunderTown)
<thunder.leizhen@huawei.com> wrote:
>

>

>

> On 2020/10/14 21:50, Rob Herring wrote:

> > On Wed, Oct 14, 2020 at 09:29:26AM +0800, Leizhen (ThunderTown) wrote:

> >>

> >>

> >> On 2020/10/14 1:32, Dan Murphy wrote:

> >>> Zhen

> >>>

> >>> On 10/13/20 11:08 AM, Zhen Lei wrote:

> >>>> The property name used in arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts is

> >>>> cmd-gpio.

> >>>>

> >>>> arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:235:

> >>>> cmd-gpio = <&gpio 155 GPIO_ACTIVE_HIGH>;

> >>>>

> >>>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>

> >>>> ---

> >>>>   Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml | 6 +++---

> >>>>   1 file changed, 3 insertions(+), 3 deletions(-)

> >>>>

> >>>> diff --git a/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml b/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml

> >>>> index b3c45c046ba5e37..c7a06a9650db2ed 100644

> >>>> --- a/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml

> >>>> +++ b/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml

> >>>> @@ -24,7 +24,7 @@ properties:

> >>>>     compatible:

> >>>>       const: olpc,xo1.75-ec

> >>>>   -  cmd-gpios:

> >>>> +  cmd-gpio:

> >>>

> >>> Preference is gpios not gpio. But Rob H accept or reject

> >>

> >> Look at the search result below. It seems that the driver have not been merged into mainline.

> >

> > Yes, in drivers/platform/olpc/olpc-xo175-ec.c.

> >

> > Your mistake is the gpiod api takes just 'cmd' as the GPIO core handles

> > both forms.

>

> OK, thanks for your information. I have found that it defined by gpio_suffixes[].

>

> >

> >> But the property name is really used as cmd-gpio at mmp2-olpc-xo-1-75.dts:235, I don't think

> >> the mmp2-olpc-xo-1-75.dts can make a mistake. Otherwise, the driver will not work properly.

> >> Meanwhile, Both names cmd-gpios and cmd-gpio seem to be in use. But I prefer cmd-gpio, after

> >> all, only one gpio is assigned now. The motorola,cmd-gpios add "s" because it contains 3 gpio.

> >

> > The preference is it is always '-gpios' just like it's always

> > 'interrupts' or 'clocks'.

> >

> > However, whether to change this is really up to the OLPC folks. Given

> > the driver has always supported both forms, it should be okay to change

> > the dts. Though there could be other users besides the kernel.

>

> If both "cmd-gpios" and "cmd-gpio" are supported, should we use enum to list both

> of them in yaml? or use patternProperties?


No, we pick one or the other. Given Lubomir is okay with a dts change,
we should use just 'cmd-gpios'.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml b/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml
index b3c45c046ba5e37..c7a06a9650db2ed 100644
--- a/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml
+++ b/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml
@@ -24,7 +24,7 @@  properties:
   compatible:
     const: olpc,xo1.75-ec
 
-  cmd-gpios:
+  cmd-gpio:
     description: GPIO uspecifier of the CMD pin
     maxItems: 1
 
@@ -32,7 +32,7 @@  properties:
 
 required:
   - compatible
-  - cmd-gpios
+  - cmd-gpio
 
 additionalProperties: false
 
@@ -49,7 +49,7 @@  examples:
       slave {
         compatible = "olpc,xo1.75-ec";
         spi-cpha;
-        cmd-gpios = <&gpio 155 GPIO_ACTIVE_HIGH>;
+        cmd-gpio = <&gpio 155 GPIO_ACTIVE_HIGH>;
       };
     };