linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] dt-bindings: i2c: dw: cancel mandatory requirements for "#address-cells" and "#size-cells"
@ 2020-12-14 12:43 Zhen Lei
  2020-12-14 12:43 ` [PATCH v2 1/1] " Zhen Lei
  0 siblings, 1 reply; 3+ messages in thread
From: Zhen Lei @ 2020-12-14 12:43 UTC (permalink / raw)
  To: Rob Herring, Serge Semin, Wolfram Sang, linux-i2c, devicetree,
	linux-kernel
  Cc: Zhen Lei

v1 --> v2:
Update the subject and description.


Zhen Lei (1):
  dt-bindings: i2c: dw: cancel mandatory requirements for
    "#address-cells" and "#size-cells"

 Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml | 8 --------
 1 file changed, 8 deletions(-)

-- 
1.8.3



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

* [PATCH v2 1/1] dt-bindings: i2c: dw: cancel mandatory requirements for "#address-cells" and "#size-cells"
  2020-12-14 12:43 [PATCH v2 0/1] dt-bindings: i2c: dw: cancel mandatory requirements for "#address-cells" and "#size-cells" Zhen Lei
@ 2020-12-14 12:43 ` Zhen Lei
  2020-12-14 15:16   ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Zhen Lei @ 2020-12-14 12:43 UTC (permalink / raw)
  To: Rob Herring, Serge Semin, Wolfram Sang, linux-i2c, devicetree,
	linux-kernel
  Cc: Zhen Lei

The "#address-cells" and "#size-cells" are required only when the I2C
controller has subnodes. However, some I2C controllers defined in
"arch/arm64/boot/dts/amd/" and "arch/arm64/boot/dts/hisilicon/"
directories do not have child nodes. So they don't need these two
properties and don't write them explicitly.

Therefore, setting properties "#address-cells" and "#size-cells" as
"required" in this yaml file causes the following warnings:
/root/linux-next/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dt.yaml: \
i2c@f7100000: '#address-cells' is a required property
/root/linux-next/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dt.yaml: \
i2c@f7100000: '#size-cells' is a required property

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml b/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml
index 4f746bef23742e9..c22b66b6219eaa3 100644
--- a/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml
+++ b/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml
@@ -101,8 +101,6 @@ unevaluatedProperties: false
 required:
   - compatible
   - reg
-  - "#address-cells"
-  - "#size-cells"
   - interrupts
 
 examples:
@@ -110,8 +108,6 @@ examples:
     i2c@f0000 {
       compatible = "snps,designware-i2c";
       reg = <0xf0000 0x1000>;
-      #address-cells = <1>;
-      #size-cells = <0>;
       interrupts = <11>;
       clock-frequency = <400000>;
     };
@@ -119,8 +115,6 @@ examples:
     i2c@1120000 {
       compatible = "snps,designware-i2c";
       reg = <0x1120000 0x1000>;
-      #address-cells = <1>;
-      #size-cells = <0>;
       interrupts = <12 1>;
       clock-frequency = <400000>;
       i2c-sda-hold-time-ns = <300>;
@@ -148,8 +142,6 @@ examples:
       reg = <0x100400 0x100>, <0x198 0x8>;
       pinctrl-0 = <&i2c_pins>;
       pinctrl-names = "default";
-      #address-cells = <1>;
-      #size-cells = <0>;
       interrupts = <8>;
       clocks = <&ahb_clk>;
     };
-- 
1.8.3



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

* Re: [PATCH v2 1/1] dt-bindings: i2c: dw: cancel mandatory requirements for "#address-cells" and "#size-cells"
  2020-12-14 12:43 ` [PATCH v2 1/1] " Zhen Lei
@ 2020-12-14 15:16   ` Rob Herring
  0 siblings, 0 replies; 3+ messages in thread
From: Rob Herring @ 2020-12-14 15:16 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Rob Herring, devicetree, linux-kernel, Serge Semin, Wolfram Sang,
	linux-i2c

On Mon, 14 Dec 2020 20:43:47 +0800, Zhen Lei wrote:
> The "#address-cells" and "#size-cells" are required only when the I2C
> controller has subnodes. However, some I2C controllers defined in
> "arch/arm64/boot/dts/amd/" and "arch/arm64/boot/dts/hisilicon/"
> directories do not have child nodes. So they don't need these two
> properties and don't write them explicitly.
> 
> Therefore, setting properties "#address-cells" and "#size-cells" as
> "required" in this yaml file causes the following warnings:
> /root/linux-next/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dt.yaml: \
> i2c@f7100000: '#address-cells' is a required property
> /root/linux-next/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dt.yaml: \
> i2c@f7100000: '#size-cells' is a required property
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>  Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml | 8 --------
>  1 file changed, 8 deletions(-)
> 

Applied, thanks!

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

end of thread, other threads:[~2020-12-14 15:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 12:43 [PATCH v2 0/1] dt-bindings: i2c: dw: cancel mandatory requirements for "#address-cells" and "#size-cells" Zhen Lei
2020-12-14 12:43 ` [PATCH v2 1/1] " Zhen Lei
2020-12-14 15:16   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).