Linux-SPI Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/6] fix all errors except one reported by dt_binding_check
@ 2020-10-13 16:08 Zhen Lei
  2020-10-13 16:08 ` [PATCH 1/6] dt-bindings: leds: choose correct color value of multi-led Zhen Lei
                   ` (5 more replies)
  0 siblings, 6 replies; 24+ messages in thread
From: Zhen Lei @ 2020-10-13 16:08 UTC (permalink / raw)
  To: Rob Herring, Pavel Machek, Dan Murphy, linux-leds, Lee Jones,
	Benson Leung, Enric Balletbo i Serra, Guenter Roeck, Mark Brown,
	linux-spi, Lubomir Rintel, devicetree, linux-arm-kernel,
	linux-kernel
  Cc: Zhen Lei

When people add multiple or common YAML files, they usually perform a full
dt_binding_check. Unfortunately, some YAML files cannot pass the self-check.
The errors or warning are listed below. It is necessary to eliminate them,
so that people's time and energy are not wasted every time when execute
comprehensive dt_binding_check.

This error is fixed by Patch 1:
/root/leizhen/linux-next/Documentation/devicetree/bindings/leds/leds-lp55xx.example.dt.yaml: led-controller@33: multi-led@2:color:0:0: 9 is greater than the maximum of 8
        From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml

These errors are fixed by Patch 2:
/root/leizhen/linux-next/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.example.dt.yaml: ec@0: 'typec' does not match any of the regexes: 'pinctrl-[0-9]+'
        From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
/root/leizhen/linux-next/Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.example.dt.yaml: cros-ec@0: 'extcon0', 'extcon1' do not match any of the regexes: 'pinctrl-[0-9]+'
        From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
/root/leizhen/linux-next/Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.example.dt.yaml: cros-ec@0: 'ec-pwm' does not match any of the regexes: 'pinctrl-[0-9]+'
        From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
/root/leizhen/linux-next/Documentation/devicetree/bindings/regulator/google,cros-ec-regulator.example.dt.yaml: ec@0: '#address-cells', '#size-cells', 'regulator@0' do not match any of the regexes: 'pinctrl-[0-9]+'
        From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
/root/leizhen/linux-next/Documentation/devicetree/bindings/sound/google,cros-ec-codec.example.dt.yaml: cros-ec@0: '#address-cells', '#size-cells', 'ec-codec@10500000' do not match any of the regexes: 'pinctrl-[0-9]+'
        From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml

These errors are fixed by Patch 3 and 4:
Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.example.dts:21.13-30.11: Warning (spi_bus_bridge): /example-0/spi: incorrect #address-cells for SPI bus
Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.example.dts:21.13-30.11: Warning (spi_bus_bridge): /example-0/spi: incorrect #size-cells for SPI bus
Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.example.dt.yaml: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge'

Patch 5 and 6 fix the dtbs_check errors detected by Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml
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.dtb: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge'
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'
/root/leizhen/linux-next/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dt.yaml: slave: 'cmd-gpios' is a required property
        From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml
/root/leizhen/linux-next/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dt.yaml: slave: 'cmd-gpio' does not match any of the regexes: 'pinctrl-[0-9]+'
        From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml

I have no good idea for this one, so leave it.
Documentation/devicetree/bindings/pci/xilinx-versal-cpm.example.dts:43.62-47.30: Warning (pci_device_reg): /example-0/versal/pcie@fca10000/interrupt-controller: missing PCI reg property


Zhen Lei (6):
  dt-bindings: leds: choose correct color value of multi-led
  dt-bindings: mfd: google,cros-ec: explicitly allow additional
    properties
  spi: dt-bindings: spi-controller: explicitly require
    #address-cells=<0> for slave mode
  dt-bindings: misc: explicitly add #address-cells for slave mode
  ARM: dts: mmp2-olpc-xo-1-75: explicitly add #address-cells=<0> for
    slave mode
  dt-bindings: misc: correct the property name cmd-gpios to cmd-gpio

 .../devicetree/bindings/leds/leds-lp55xx.yaml        |  2 +-
 .../devicetree/bindings/mfd/google,cros-ec.yaml      |  2 +-
 .../devicetree/bindings/misc/olpc,xo1.75-ec.yaml     |  8 +++++---
 .../devicetree/bindings/spi/spi-controller.yaml      | 20 ++++++++++++++------
 arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts              |  2 +-
 5 files changed, 22 insertions(+), 12 deletions(-)

-- 
1.8.3



^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/6] dt-bindings: leds: choose correct color value of multi-led
  2020-10-13 16:08 [PATCH 0/6] fix all errors except one reported by dt_binding_check Zhen Lei
@ 2020-10-13 16:08 ` Zhen Lei
  2020-10-13 16:17   ` Dan Murphy
  2020-10-13 16:08 ` [PATCH 2/6] dt-bindings: mfd: google,cros-ec: explicitly allow additional properties Zhen Lei
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 24+ messages in thread
From: Zhen Lei @ 2020-10-13 16:08 UTC (permalink / raw)
  To: Rob Herring, Pavel Machek, Dan Murphy, linux-leds, Lee Jones,
	Benson Leung, Enric Balletbo i Serra, Guenter Roeck, Mark Brown,
	linux-spi, Lubomir Rintel, devicetree, linux-arm-kernel,
	linux-kernel
  Cc: Zhen Lei

The color value of multi-led is fixed to "const: 8 #LED_COLOR_ID_MULTI",
which is required by leds-class-multicolor.yaml.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 Documentation/devicetree/bindings/leds/leds-lp55xx.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
index 58e974793a7976b..cd877e817ad1a1c 100644
--- a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
@@ -197,7 +197,7 @@ examples:
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x2>;
-               color = <LED_COLOR_ID_RGB>;
+               color = <LED_COLOR_ID_MULTI>;
                function = LED_FUNCTION_STANDBY;
                linux,default-trigger = "heartbeat";
 
-- 
1.8.3



^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 2/6] dt-bindings: mfd: google,cros-ec: explicitly allow additional properties
  2020-10-13 16:08 [PATCH 0/6] fix all errors except one reported by dt_binding_check Zhen Lei
  2020-10-13 16:08 ` [PATCH 1/6] dt-bindings: leds: choose correct color value of multi-led Zhen Lei
@ 2020-10-13 16:08 ` Zhen Lei
  2020-10-13 17:53   ` Dan Murphy
  2020-10-14 13:38   ` Rob Herring
  2020-10-13 16:08 ` [PATCH 3/6] spi: dt-bindings: spi-controller: explicitly require #address-cells=<0> for slave mode Zhen Lei
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 24+ messages in thread
From: Zhen Lei @ 2020-10-13 16:08 UTC (permalink / raw)
  To: Rob Herring, Pavel Machek, Dan Murphy, linux-leds, Lee Jones,
	Benson Leung, Enric Balletbo i Serra, Guenter Roeck, Mark Brown,
	linux-spi, Lubomir Rintel, devicetree, linux-arm-kernel,
	linux-kernel
  Cc: Zhen Lei

There are so many properties have not been described in this yaml file,
and a lot of errors will be reported. Especially, some yaml files such as
google,cros-ec-typec.yaml, extcon-usbc-cros-ec.yaml can not pass the
self-check, because of the examples. So temporarily allow additional
properties to keep the comprehensive dt_binding_check result clean.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 Documentation/devicetree/bindings/mfd/google,cros-ec.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
index f49c0d5d31ad20e..e18047583a0c8fa 100644
--- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
+++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
@@ -87,7 +87,7 @@ then:
     google,cros-ec-spi-msg-delay: false
     spi-max-frequency: false
 
-additionalProperties: false
+additionalProperties: true
 
 examples:
   # Example for I2C
-- 
1.8.3



^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 3/6] spi: dt-bindings: spi-controller: explicitly require #address-cells=<0> for slave mode
  2020-10-13 16:08 [PATCH 0/6] fix all errors except one reported by dt_binding_check Zhen Lei
  2020-10-13 16:08 ` [PATCH 1/6] dt-bindings: leds: choose correct color value of multi-led Zhen Lei
  2020-10-13 16:08 ` [PATCH 2/6] dt-bindings: mfd: google,cros-ec: explicitly allow additional properties Zhen Lei
@ 2020-10-13 16:08 ` Zhen Lei
  2020-10-14 13:41   ` Rob Herring
  2020-10-13 16:08 ` [PATCH 4/6] dt-bindings: misc: explicitly add #address-cells " Zhen Lei
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 24+ messages in thread
From: Zhen Lei @ 2020-10-13 16:08 UTC (permalink / raw)
  To: Rob Herring, Pavel Machek, Dan Murphy, linux-leds, Lee Jones,
	Benson Leung, Enric Balletbo i Serra, Guenter Roeck, Mark Brown,
	linux-spi, Lubomir Rintel, devicetree, linux-arm-kernel,
	linux-kernel
  Cc: Zhen Lei

scripts/dtc/checks.c:
if (get_property(node, "spi-slave"))
	spi_addr_cells = 0;
if (node_addr_cells(node) != spi_addr_cells)
	FAIL(c, dti, node, "incorrect #address-cells for SPI bus");
if (node_size_cells(node) != 0)
	FAIL(c, dti, node, "incorrect #size-cells for SPI bus");

The above code in check_spi_bus_bridge() require that the number of address
cells must be 0. So we should explicitly declare "#address-cells = <0>".

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 .../devicetree/bindings/spi/spi-controller.yaml      | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml
index 2b154803b181c8b..1b56d5e40f1fcde 100644
--- a/Documentation/devicetree/bindings/spi/spi-controller.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml
@@ -20,7 +20,7 @@ properties:
     pattern: "^spi(@.*|-[0-9a-f])*$"
 
   "#address-cells":
-    const: 1
+    enum: [0, 1]
 
   "#size-cells":
     const: 0
@@ -52,11 +52,19 @@ properties:
     description:
       The SPI controller acts as a slave, instead of a master.
 
-oneOf:
-  - required:
-      - "#address-cells"
-  - required:
-      - spi-slave
+allOf:
+  - if:
+      not:
+        required:
+          - spi-slave
+    then:
+      properties:
+        "#address-cells":
+          const: 1
+    else:
+      properties:
+        "#address-cells":
+          const: 0
 
 patternProperties:
   "^slave$":
-- 
1.8.3



^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 4/6] dt-bindings: misc: explicitly add #address-cells for slave mode
  2020-10-13 16:08 [PATCH 0/6] fix all errors except one reported by dt_binding_check Zhen Lei
                   ` (2 preceding siblings ...)
  2020-10-13 16:08 ` [PATCH 3/6] spi: dt-bindings: spi-controller: explicitly require #address-cells=<0> for slave mode Zhen Lei
@ 2020-10-13 16:08 ` Zhen Lei
  2020-10-14 13:42   ` Rob Herring
  2020-10-13 16:08 ` [PATCH 5/6] ARM: dts: mmp2-olpc-xo-1-75: explicitly add #address-cells=<0> " Zhen Lei
  2020-10-13 16:08 ` [PATCH 6/6] dt-bindings: misc: correct the property name cmd-gpios to cmd-gpio Zhen Lei
  5 siblings, 1 reply; 24+ messages in thread
From: Zhen Lei @ 2020-10-13 16:08 UTC (permalink / raw)
  To: Rob Herring, Pavel Machek, Dan Murphy, linux-leds, Lee Jones,
	Benson Leung, Enric Balletbo i Serra, Guenter Roeck, Mark Brown,
	linux-spi, Lubomir Rintel, devicetree, linux-arm-kernel,
	linux-kernel
  Cc: Zhen Lei

Explicitly add "#address-cells = <0>" and "#size-cells = <0>" to
eliminate below warnings.

(spi_bus_bridge): /example-0/spi: incorrect #address-cells for SPI bus
(spi_bus_bridge): /example-0/spi: incorrect #size-cells for SPI bus
(spi_bus_reg): Failed prerequisite 'spi_bus_bridge'

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

diff --git a/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml b/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml
index ade733cd60f7925..b3c45c046ba5e37 100644
--- a/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml
+++ b/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml
@@ -42,6 +42,8 @@ examples:
 
     spi {
       spi-slave;
+      #address-cells = <0>;
+      #size-cells = <0>;
       ready-gpios = <&gpio 125 GPIO_ACTIVE_HIGH>;
 
       slave {
-- 
1.8.3



^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 5/6] ARM: dts: mmp2-olpc-xo-1-75: explicitly add #address-cells=<0> for slave mode
  2020-10-13 16:08 [PATCH 0/6] fix all errors except one reported by dt_binding_check Zhen Lei
                   ` (3 preceding siblings ...)
  2020-10-13 16:08 ` [PATCH 4/6] dt-bindings: misc: explicitly add #address-cells " Zhen Lei
@ 2020-10-13 16:08 ` Zhen Lei
  2020-10-15  9:56   ` Leizhen (ThunderTown)
  2020-10-13 16:08 ` [PATCH 6/6] dt-bindings: misc: correct the property name cmd-gpios to cmd-gpio Zhen Lei
  5 siblings, 1 reply; 24+ messages in thread
From: Zhen Lei @ 2020-10-13 16:08 UTC (permalink / raw)
  To: Rob Herring, Pavel Machek, Dan Murphy, linux-leds, Lee Jones,
	Benson Leung, Enric Balletbo i Serra, Guenter Roeck, Mark Brown,
	linux-spi, Lubomir Rintel, devicetree, linux-arm-kernel,
	linux-kernel
  Cc: Zhen Lei

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



^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 6/6] dt-bindings: misc: correct the property name cmd-gpios to cmd-gpio
  2020-10-13 16:08 [PATCH 0/6] fix all errors except one reported by dt_binding_check Zhen Lei
                   ` (4 preceding siblings ...)
  2020-10-13 16:08 ` [PATCH 5/6] ARM: dts: mmp2-olpc-xo-1-75: explicitly add #address-cells=<0> " Zhen Lei
@ 2020-10-13 16:08 ` Zhen Lei
  2020-10-13 17:32   ` Dan Murphy
  2020-10-15  7:12   ` Lubomir Rintel
  5 siblings, 2 replies; 24+ messages in thread
From: Zhen Lei @ 2020-10-13 16:08 UTC (permalink / raw)
  To: Rob Herring, Pavel Machek, Dan Murphy, linux-leds, Lee Jones,
	Benson Leung, Enric Balletbo i Serra, Guenter Roeck, Mark Brown,
	linux-spi, Lubomir Rintel, devicetree, linux-arm-kernel,
	linux-kernel
  Cc: Zhen Lei

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:
     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



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/6] dt-bindings: leds: choose correct color value of multi-led
  2020-10-13 16:08 ` [PATCH 1/6] dt-bindings: leds: choose correct color value of multi-led Zhen Lei
@ 2020-10-13 16:17   ` Dan Murphy
  2020-10-13 17:04     ` Pavel Machek
  2020-10-14  1:08     ` Leizhen (ThunderTown)
  0 siblings, 2 replies; 24+ messages in thread
From: Dan Murphy @ 2020-10-13 16:17 UTC (permalink / raw)
  To: Zhen Lei, Rob Herring, Pavel Machek, linux-leds, Lee Jones,
	Benson Leung, Enric Balletbo i Serra, Guenter Roeck, Mark Brown,
	linux-spi, Lubomir Rintel, devicetree, linux-arm-kernel,
	linux-kernel

Zhen

On 10/13/20 11:08 AM, Zhen Lei wrote:
> The color value of multi-led is fixed to "const: 8 #LED_COLOR_ID_MULTI",
> which is required by leds-class-multicolor.yaml.
>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>   Documentation/devicetree/bindings/leds/leds-lp55xx.yaml | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
> index 58e974793a7976b..cd877e817ad1a1c 100644
> --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
> +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
> @@ -197,7 +197,7 @@ examples:
>                  #address-cells = <1>;
>                  #size-cells = <0>;
>                  reg = <0x2>;
> -               color = <LED_COLOR_ID_RGB>;
> +               color = <LED_COLOR_ID_MULTI>;
>                  function = LED_FUNCTION_STANDBY;
>                  linux,default-trigger = "heartbeat";
>   

This is not correct.  ID_RGB is the correct variable here.

https://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git/commit/?h=for-next&id=3d93edc77515c6f51fa9bbbe2185e2ec32bad024

Correct fix is to update the leds-class-multicolor.yaml

Dan


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/6] dt-bindings: leds: choose correct color value of multi-led
  2020-10-13 16:17   ` Dan Murphy
@ 2020-10-13 17:04     ` Pavel Machek
  2020-10-14  1:08     ` Leizhen (ThunderTown)
  1 sibling, 0 replies; 24+ messages in thread
From: Pavel Machek @ 2020-10-13 17:04 UTC (permalink / raw)
  To: Dan Murphy
  Cc: Zhen Lei, Rob Herring, linux-leds, Lee Jones, Benson Leung,
	Enric Balletbo i Serra, Guenter Roeck, Mark Brown, linux-spi,
	Lubomir Rintel, devicetree, linux-arm-kernel, linux-kernel


[-- Attachment #1: Type: text/plain, Size: 988 bytes --]

Hi!

> > --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
> > +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
> > @@ -197,7 +197,7 @@ examples:
> >                  #address-cells = <1>;
> >                  #size-cells = <0>;
> >                  reg = <0x2>;
> > -               color = <LED_COLOR_ID_RGB>;
> > +               color = <LED_COLOR_ID_MULTI>;
> >                  function = LED_FUNCTION_STANDBY;
> >                  linux,default-trigger = "heartbeat";
> 
> This is not correct.  ID_RGB is the correct variable here.
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git/commit/?h=for-next&id=3d93edc77515c6f51fa9bbbe2185e2ec32bad024
> 
> Correct fix is to update the leds-class-multicolor.yaml

Right. So lets not merge this one.

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 6/6] dt-bindings: misc: correct the property name cmd-gpios to cmd-gpio
  2020-10-13 16:08 ` [PATCH 6/6] dt-bindings: misc: correct the property name cmd-gpios to cmd-gpio Zhen Lei
@ 2020-10-13 17:32   ` Dan Murphy
  2020-10-14  1:29     ` Leizhen (ThunderTown)
  2020-10-15  7:12   ` Lubomir Rintel
  1 sibling, 1 reply; 24+ messages in thread
From: Dan Murphy @ 2020-10-13 17:32 UTC (permalink / raw)
  To: Zhen Lei, Rob Herring, Pavel Machek, linux-leds, Lee Jones,
	Benson Leung, Enric Balletbo i Serra, Guenter Roeck, Mark Brown,
	linux-spi, Lubomir Rintel, devicetree, linux-arm-kernel,
	linux-kernel

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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/6] dt-bindings: mfd: google,cros-ec: explicitly allow additional properties
  2020-10-13 16:08 ` [PATCH 2/6] dt-bindings: mfd: google,cros-ec: explicitly allow additional properties Zhen Lei
@ 2020-10-13 17:53   ` Dan Murphy
  2020-10-14  1:52     ` Leizhen (ThunderTown)
  2020-10-14 13:38   ` Rob Herring
  1 sibling, 1 reply; 24+ messages in thread
From: Dan Murphy @ 2020-10-13 17:53 UTC (permalink / raw)
  To: Zhen Lei, Rob Herring, Pavel Machek, linux-leds, Lee Jones,
	Benson Leung, Enric Balletbo i Serra, Guenter Roeck, Mark Brown,
	linux-spi, Lubomir Rintel, devicetree, linux-arm-kernel,
	linux-kernel

Zhen

On 10/13/20 11:08 AM, Zhen Lei wrote:
> There are so many properties have not been described in this yaml file,
> and a lot of errors will be reported. Especially, some yaml files such as
> google,cros-ec-typec.yaml, extcon-usbc-cros-ec.yaml can not pass the
> self-check, because of the examples. So temporarily allow additional
> properties to keep the comprehensive dt_binding_check result clean.

My preference is to fix the binding to pass the checks and not just work 
around the issues. Working around the issues may mean the issues never 
get fixed.

Dan


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/6] dt-bindings: leds: choose correct color value of multi-led
  2020-10-13 16:17   ` Dan Murphy
  2020-10-13 17:04     ` Pavel Machek
@ 2020-10-14  1:08     ` Leizhen (ThunderTown)
  1 sibling, 0 replies; 24+ messages in thread
From: Leizhen (ThunderTown) @ 2020-10-14  1:08 UTC (permalink / raw)
  To: Dan Murphy, Rob Herring, Pavel Machek, linux-leds, Lee Jones,
	Benson Leung, Enric Balletbo i Serra, Guenter Roeck, Mark Brown,
	linux-spi, Lubomir Rintel, devicetree, linux-arm-kernel,
	linux-kernel



On 2020/10/14 0:17, Dan Murphy wrote:
> Zhen
> 
> On 10/13/20 11:08 AM, Zhen Lei wrote:
>> The color value of multi-led is fixed to "const: 8 #LED_COLOR_ID_MULTI",
>> which is required by leds-class-multicolor.yaml.
>>
>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>> ---
>>   Documentation/devicetree/bindings/leds/leds-lp55xx.yaml | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
>> index 58e974793a7976b..cd877e817ad1a1c 100644
>> --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
>> +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
>> @@ -197,7 +197,7 @@ examples:
>>                  #address-cells = <1>;
>>                  #size-cells = <0>;
>>                  reg = <0x2>;
>> -               color = <LED_COLOR_ID_RGB>;
>> +               color = <LED_COLOR_ID_MULTI>;
>>                  function = LED_FUNCTION_STANDBY;
>>                  linux,default-trigger = "heartbeat";
>>   
> 
> This is not correct.  ID_RGB is the correct variable here.
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git/commit/?h=for-next&id=3d93edc77515c6f51fa9bbbe2185e2ec32bad024
> 
> Correct fix is to update the leds-class-multicolor.yaml

OK

> 
> Dan
> 
> 
> .
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 6/6] dt-bindings: misc: correct the property name cmd-gpios to cmd-gpio
  2020-10-13 17:32   ` Dan Murphy
@ 2020-10-14  1:29     ` Leizhen (ThunderTown)
  2020-10-14 13:50       ` Rob Herring
  0 siblings, 1 reply; 24+ messages in thread
From: Leizhen (ThunderTown) @ 2020-10-14  1:29 UTC (permalink / raw)
  To: Dan Murphy, Rob Herring, Pavel Machek, linux-leds, Lee Jones,
	Benson Leung, Enric Balletbo i Serra, Guenter Roeck, Mark Brown,
	linux-spi, Lubomir Rintel, devicetree, linux-arm-kernel,
	linux-kernel



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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/6] dt-bindings: mfd: google,cros-ec: explicitly allow additional properties
  2020-10-13 17:53   ` Dan Murphy
@ 2020-10-14  1:52     ` Leizhen (ThunderTown)
  0 siblings, 0 replies; 24+ messages in thread
From: Leizhen (ThunderTown) @ 2020-10-14  1:52 UTC (permalink / raw)
  To: Dan Murphy, Rob Herring, Pavel Machek, linux-leds, Lee Jones,
	Benson Leung, Enric Balletbo i Serra, Guenter Roeck, Mark Brown,
	linux-spi, Lubomir Rintel, devicetree, linux-arm-kernel,
	linux-kernel



On 2020/10/14 1:53, Dan Murphy wrote:
> Zhen
> 
> On 10/13/20 11:08 AM, Zhen Lei wrote:
>> There are so many properties have not been described in this yaml file,
>> and a lot of errors will be reported. Especially, some yaml files such as
>> google,cros-ec-typec.yaml, extcon-usbc-cros-ec.yaml can not pass the
>> self-check, because of the examples. So temporarily allow additional
>> properties to keep the comprehensive dt_binding_check result clean.
> 
> My preference is to fix the binding to pass the checks and not just work around the issues. Working around the issues may mean the issues never get fixed.

I agree with your first sentence:don't just work around the issues. But these
errors are so annoying. Hope someone can add the description of the missing properties.
I'm not familiar with this module anyway.

And I don't fully agree with your last sentence. After all, the main properties are listed,
and the ones that are not listed should be minor ones.

> 
> Dan
> 
> 
> .
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/6] dt-bindings: mfd: google,cros-ec: explicitly allow additional properties
  2020-10-13 16:08 ` [PATCH 2/6] dt-bindings: mfd: google,cros-ec: explicitly allow additional properties Zhen Lei
  2020-10-13 17:53   ` Dan Murphy
@ 2020-10-14 13:38   ` Rob Herring
  2020-10-15  6:55     ` Leizhen (ThunderTown)
  1 sibling, 1 reply; 24+ messages in thread
From: Rob Herring @ 2020-10-14 13:38 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Pavel Machek, Dan Murphy, linux-leds, Lee Jones, Benson Leung,
	Enric Balletbo i Serra, Guenter Roeck, Mark Brown, linux-spi,
	Lubomir Rintel, devicetree, linux-arm-kernel, linux-kernel

On Wed, Oct 14, 2020 at 12:08:41AM +0800, Zhen Lei wrote:
> There are so many properties have not been described in this yaml file,
> and a lot of errors will be reported. Especially, some yaml files such as
> google,cros-ec-typec.yaml, extcon-usbc-cros-ec.yaml can not pass the
> self-check, because of the examples. So temporarily allow additional
> properties to keep the comprehensive dt_binding_check result clean.
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>  Documentation/devicetree/bindings/mfd/google,cros-ec.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

There's proper fixes for these under review.

Rob

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/6] spi: dt-bindings: spi-controller: explicitly require #address-cells=<0> for slave mode
  2020-10-13 16:08 ` [PATCH 3/6] spi: dt-bindings: spi-controller: explicitly require #address-cells=<0> for slave mode Zhen Lei
@ 2020-10-14 13:41   ` Rob Herring
  0 siblings, 0 replies; 24+ messages in thread
From: Rob Herring @ 2020-10-14 13:41 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Mark Brown, linux-kernel, linux-arm-kernel, Benson Leung,
	Dan Murphy, Pavel Machek, Enric Balletbo i Serra, devicetree,
	Lee Jones, linux-leds, linux-spi, Guenter Roeck, Rob Herring,
	Lubomir Rintel

On Wed, 14 Oct 2020 00:08:42 +0800, Zhen Lei wrote:
> scripts/dtc/checks.c:
> if (get_property(node, "spi-slave"))
> 	spi_addr_cells = 0;
> if (node_addr_cells(node) != spi_addr_cells)
> 	FAIL(c, dti, node, "incorrect #address-cells for SPI bus");
> if (node_size_cells(node) != 0)
> 	FAIL(c, dti, node, "incorrect #size-cells for SPI bus");
> 
> The above code in check_spi_bus_bridge() require that the number of address
> cells must be 0. So we should explicitly declare "#address-cells = <0>".
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>  .../devicetree/bindings/spi/spi-controller.yaml      | 20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)
> 

Applied, thanks!

Note that I tried fixing this in dtc, but that was rejected. So this 
gets the schema in sync with dtc.

Rob

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 4/6] dt-bindings: misc: explicitly add #address-cells for slave mode
  2020-10-13 16:08 ` [PATCH 4/6] dt-bindings: misc: explicitly add #address-cells " Zhen Lei
@ 2020-10-14 13:42   ` Rob Herring
  0 siblings, 0 replies; 24+ messages in thread
From: Rob Herring @ 2020-10-14 13:42 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Lubomir Rintel, linux-kernel, devicetree, Mark Brown,
	Rob Herring, Pavel Machek, linux-leds, linux-arm-kernel,
	Dan Murphy, Guenter Roeck, Benson Leung, Enric Balletbo i Serra,
	linux-spi, Lee Jones

On Wed, 14 Oct 2020 00:08:43 +0800, Zhen Lei wrote:
> Explicitly add "#address-cells = <0>" and "#size-cells = <0>" to
> eliminate below warnings.
> 
> (spi_bus_bridge): /example-0/spi: incorrect #address-cells for SPI bus
> (spi_bus_bridge): /example-0/spi: incorrect #size-cells for SPI bus
> (spi_bus_reg): Failed prerequisite 'spi_bus_bridge'
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>  Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 

Applied, thanks!

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 6/6] dt-bindings: misc: correct the property name cmd-gpios to cmd-gpio
  2020-10-14  1:29     ` Leizhen (ThunderTown)
@ 2020-10-14 13:50       ` Rob Herring
  2020-10-15  3:23         ` Leizhen (ThunderTown)
  0 siblings, 1 reply; 24+ messages in thread
From: Rob Herring @ 2020-10-14 13:50 UTC (permalink / raw)
  To: Leizhen (ThunderTown)
  Cc: Dan Murphy, Pavel Machek, linux-leds, Lee Jones, Benson Leung,
	Enric Balletbo i Serra, Guenter Roeck, Mark Brown, linux-spi,
	Lubomir Rintel, devicetree, linux-arm-kernel, linux-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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 6/6] dt-bindings: misc: correct the property name cmd-gpios to cmd-gpio
  2020-10-14 13:50       ` Rob Herring
@ 2020-10-15  3:23         ` Leizhen (ThunderTown)
  2020-10-16 14:13           ` Rob Herring
  0 siblings, 1 reply; 24+ messages in thread
From: Leizhen (ThunderTown) @ 2020-10-15  3:23 UTC (permalink / raw)
  To: Rob Herring
  Cc: Dan Murphy, Pavel Machek, linux-leds, Lee Jones, Benson Leung,
	Enric Balletbo i Serra, Guenter Roeck, Mark Brown, linux-spi,
	Lubomir Rintel, devicetree, linux-arm-kernel, linux-kernel



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
> 
> .
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/6] dt-bindings: mfd: google,cros-ec: explicitly allow additional properties
  2020-10-14 13:38   ` Rob Herring
@ 2020-10-15  6:55     ` Leizhen (ThunderTown)
  0 siblings, 0 replies; 24+ messages in thread
From: Leizhen (ThunderTown) @ 2020-10-15  6:55 UTC (permalink / raw)
  To: Rob Herring
  Cc: Pavel Machek, Dan Murphy, linux-leds, Lee Jones, Benson Leung,
	Enric Balletbo i Serra, Guenter Roeck, Mark Brown, linux-spi,
	Lubomir Rintel, devicetree, linux-arm-kernel, linux-kernel



On 2020/10/14 21:38, Rob Herring wrote:
> On Wed, Oct 14, 2020 at 12:08:41AM +0800, Zhen Lei wrote:
>> There are so many properties have not been described in this yaml file,
>> and a lot of errors will be reported. Especially, some yaml files such as
>> google,cros-ec-typec.yaml, extcon-usbc-cros-ec.yaml can not pass the
>> self-check, because of the examples. So temporarily allow additional
>> properties to keep the comprehensive dt_binding_check result clean.
>>
>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>> ---
>>  Documentation/devicetree/bindings/mfd/google,cros-ec.yaml | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> There's proper fixes for these under review.

That's a good news.

> 
> Rob
> 
> .
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 6/6] dt-bindings: misc: correct the property name cmd-gpios to cmd-gpio
  2020-10-13 16:08 ` [PATCH 6/6] dt-bindings: misc: correct the property name cmd-gpios to cmd-gpio Zhen Lei
  2020-10-13 17:32   ` Dan Murphy
@ 2020-10-15  7:12   ` Lubomir Rintel
  2020-10-15  7:32     ` Leizhen (ThunderTown)
  1 sibling, 1 reply; 24+ messages in thread
From: Lubomir Rintel @ 2020-10-15  7:12 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Rob Herring, Pavel Machek, Dan Murphy, linux-leds, Lee Jones,
	Benson Leung, Enric Balletbo i Serra, Guenter Roeck, Mark Brown,
	linux-spi, devicetree, linux-arm-kernel, linux-kernel

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 6/6] dt-bindings: misc: correct the property name cmd-gpios to cmd-gpio
  2020-10-15  7:12   ` Lubomir Rintel
@ 2020-10-15  7:32     ` Leizhen (ThunderTown)
  0 siblings, 0 replies; 24+ messages in thread
From: Leizhen (ThunderTown) @ 2020-10-15  7:32 UTC (permalink / raw)
  To: Lubomir Rintel
  Cc: linux-arm-kernel, devicetree, Lee Jones, Mark Brown,
	linux-kernel, linux-spi, Guenter Roeck, Rob Herring, Dan Murphy,
	Pavel Machek, Enric Balletbo i Serra, Benson Leung, linux-leds



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
> 
> .
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 5/6] ARM: dts: mmp2-olpc-xo-1-75: explicitly add #address-cells=<0> for slave mode
  2020-10-13 16:08 ` [PATCH 5/6] ARM: dts: mmp2-olpc-xo-1-75: explicitly add #address-cells=<0> " Zhen Lei
@ 2020-10-15  9:56   ` Leizhen (ThunderTown)
  0 siblings, 0 replies; 24+ messages in thread
From: Leizhen (ThunderTown) @ 2020-10-15  9:56 UTC (permalink / raw)
  To: Rob Herring, Pavel Machek, Dan Murphy, linux-leds, Lee Jones,
	Benson Leung, Enric Balletbo i Serra, Guenter Roeck, Mark Brown,
	linux-spi, Lubomir Rintel, devicetree, linux-arm-kernel,
	linux-kernel

Hi Lubomir:
 Can you review this patch? The results of all other patches are clear.


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 6/6] dt-bindings: misc: correct the property name cmd-gpios to cmd-gpio
  2020-10-15  3:23         ` Leizhen (ThunderTown)
@ 2020-10-16 14:13           ` Rob Herring
  0 siblings, 0 replies; 24+ messages in thread
From: Rob Herring @ 2020-10-16 14:13 UTC (permalink / raw)
  To: Leizhen (ThunderTown)
  Cc: Dan Murphy, Pavel Machek, linux-leds, Lee Jones, Benson Leung,
	Enric Balletbo i Serra, Guenter Roeck, Mark Brown, linux-spi,
	Lubomir Rintel, devicetree, linux-arm-kernel, linux-kernel

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, back to index

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13 16:08 [PATCH 0/6] fix all errors except one reported by dt_binding_check Zhen Lei
2020-10-13 16:08 ` [PATCH 1/6] dt-bindings: leds: choose correct color value of multi-led Zhen Lei
2020-10-13 16:17   ` Dan Murphy
2020-10-13 17:04     ` Pavel Machek
2020-10-14  1:08     ` Leizhen (ThunderTown)
2020-10-13 16:08 ` [PATCH 2/6] dt-bindings: mfd: google,cros-ec: explicitly allow additional properties Zhen Lei
2020-10-13 17:53   ` Dan Murphy
2020-10-14  1:52     ` Leizhen (ThunderTown)
2020-10-14 13:38   ` Rob Herring
2020-10-15  6:55     ` Leizhen (ThunderTown)
2020-10-13 16:08 ` [PATCH 3/6] spi: dt-bindings: spi-controller: explicitly require #address-cells=<0> for slave mode Zhen Lei
2020-10-14 13:41   ` Rob Herring
2020-10-13 16:08 ` [PATCH 4/6] dt-bindings: misc: explicitly add #address-cells " Zhen Lei
2020-10-14 13:42   ` Rob Herring
2020-10-13 16:08 ` [PATCH 5/6] ARM: dts: mmp2-olpc-xo-1-75: explicitly add #address-cells=<0> " Zhen Lei
2020-10-15  9:56   ` Leizhen (ThunderTown)
2020-10-13 16:08 ` [PATCH 6/6] dt-bindings: misc: correct the property name cmd-gpios to cmd-gpio Zhen Lei
2020-10-13 17:32   ` Dan Murphy
2020-10-14  1:29     ` Leizhen (ThunderTown)
2020-10-14 13:50       ` Rob Herring
2020-10-15  3:23         ` Leizhen (ThunderTown)
2020-10-16 14:13           ` Rob Herring
2020-10-15  7:12   ` Lubomir Rintel
2020-10-15  7:32     ` Leizhen (ThunderTown)

Linux-SPI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-spi/0 linux-spi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-spi linux-spi/ https://lore.kernel.org/linux-spi \
		linux-spi@vger.kernel.org
	public-inbox-index linux-spi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-spi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git