Message ID | 20201013160845.1772-1-thunder.leizhen@huawei.com |
---|---|
Headers | show |
Series | fix all errors except one reported by dt_binding_check | expand |
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 Dan
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. 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. Without this patch: git grep -wn "cmd-gpios" Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml:27: cmd-gpios: Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml:35: - cmd-gpios Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml:52: cmd-gpios = <&gpio 155 GPIO_ACTIVE_HIGH>; Documentation/devicetree/bindings/phy/phy-mapphone-mdm6600.txt:10:- motorola,cmd-gpios Three GPIOs to control the power state of the MDM6600 Documentation/devicetree/bindings/phy/phy-mapphone-mdm6600.txt:22: motorola,cmd-gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>, arch/arm/boot/dts/motorola-mapphone-common.dtsi:78: motorola,cmd-gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>, git grep -wn "cmd-gpio" Documentation/devicetree/bindings/leds/leds-ns2.txt:9:- cmd-gpio: Command LED GPIO. See OF device-tree GPIO specification. Documentation/devicetree/bindings/leds/leds-ns2.txt:12: the corresponding cmd-gpio/slow-gpio values. All the GPIO values combinations Documentation/devicetree/bindings/leds/leds-ns2.txt:29: cmd-gpio = <&gpio0 30 0>; arch/arm/boot/dts/armada-370-seagate-nas-4bay.dts:90: cmd-gpio = <&pca9554 1 GPIO_ACTIVE_HIGH>; arch/arm/boot/dts/armada-370-seagate-nas-4bay.dts:100: cmd-gpio = <&pca9554 4 GPIO_ACTIVE_HIGH>; arch/arm/boot/dts/kirkwood-d2net.dts:29: cmd-gpio = <&gpio0 30 GPIO_ACTIVE_HIGH>; arch/arm/boot/dts/kirkwood-is2.dts:31: cmd-gpio = <&gpio0 30 0>; arch/arm/boot/dts/kirkwood-ns2.dts:31: cmd-gpio = <&gpio0 30 0>; arch/arm/boot/dts/kirkwood-ns2max.dts:50: cmd-gpio = <&gpio0 30 0>; arch/arm/boot/dts/kirkwood-ns2mini.dts:51: cmd-gpio = <&gpio0 30 0>; arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:235: cmd-gpio = <&gpio 155 GPIO_ACTIVE_HIGH>; > > Dan > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > >
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. > 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. Rob
Hi, On Wed, Oct 14, 2020 at 12:08:45AM +0800, 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> Thanks for the patch. I've sent out an equivalent one some time ago: https://lore.kernel.org/lkml/20200925234805.228251-3-lkundrak@v3.sk/ In any case, either is fine with me. Acked-by: Lubomir Rintel <lkundrak@v3.sk> > --- > 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: > 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>; > }; > }; > > -- > 1.8.3 > >
On 2020/10/15 15:12, Lubomir Rintel wrote: > Hi, > > On Wed, Oct 14, 2020 at 12:08:45AM +0800, 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> > > Thanks for the patch. > > I've sent out an equivalent one some time ago: > https://lore.kernel.org/lkml/20200925234805.228251-3-lkundrak@v3.sk/ > > In any case, either is fine with me. Geert Uytterhoeven just replied me that the *-gpio form is deprecated. So your patch is the correct one. > > Acked-by: Lubomir Rintel <lkundrak@v3.sk> > >> --- >> 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: >> 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>; >> }; >> }; >> >> -- >> 1.8.3 >> >> > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > > . >
Hi everybody: Can somebody apply this patch? When I do any YAML dtbs_check on arm, below Warnings always reported. arch/arm/boot/dts/mmp2.dtsi:472.23-480.6: Warning (spi_bus_bridge): /soc/apb@d4000000/spi@d4037000: incorrect #address-cells for SPI bus also defined at arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:225.7-237.3 arch/arm/boot/dts/mmp2.dtsi:472.23-480.6: Warning (spi_bus_bridge): /soc/apb@d4000000/spi@d4037000: incorrect #size-cells for SPI bus also defined at arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:225.7-237.3 arch/arm/boot/dts/mmp2-olpc-xo-1-75.dt.yaml: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge' On 2020/10/14 0:08, Zhen Lei wrote: > Delete the old property "#address-cells" and then explicitly add it with > zero value. The value of "#size-cells" is already zero, so keep it no > change. > > Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> > --- > arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts > index f1a41152e9dd70d..be88b6e551d58e9 100644 > --- a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts > +++ b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts > @@ -224,7 +224,7 @@ > > &ssp3 { > /delete-property/ #address-cells; > - /delete-property/ #size-cells; > + #address-cells = <0>; > spi-slave; > status = "okay"; > ready-gpio = <&gpio 125 GPIO_ACTIVE_HIGH>; >