linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] mips: dts: ralink: mt7621: add cell count properties to usb
       [not found] <0001-mips-dts-ralink-mt7621-add-cell-count-properties-to-.patch>
@ 2024-03-07 22:37 ` Justin Swartz
  2024-03-08  9:32   ` Sergio Paracuellos
  2024-03-08 12:01   ` Arınç ÜNAL
  0 siblings, 2 replies; 7+ messages in thread
From: Justin Swartz @ 2024-03-07 22:37 UTC (permalink / raw)
  To: Arınç ÜNAL, Sergio Paracuellos, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thomas Bogendoerfer,
	Matthias Brugger, AngeloGioacchino Del Regno
  Cc: Justin Swartz, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

Add default #address-cells and #size-cells properties to the
usb node, which should be suitable for hubs and devices without
explicitly declared interface nodes, as:

  "#address-cells":
    description: should be 1 for hub nodes with device nodes,
      should be 2 for device nodes with interface nodes.
    enum: [1, 2]

  "#size-cells":
    const: 0

-- Documentation/devicetree/bindings/usb/usb-device.yaml

This version of the patch places the properties according to
the order recommended by:

   Documentation/devicetree/bindings/dts-coding-style.rst

Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za>
---
 arch/mips/boot/dts/ralink/mt7621.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
index 5a89f0b8c..7532e17dd 100644
--- a/arch/mips/boot/dts/ralink/mt7621.dtsi
+++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
@@ -289,10 +289,10 @@ usb: usb@1e1c0000 {
 		reg = <0x1e1c0000 0x1000
 		       0x1e1d0700 0x0100>;
 		reg-names = "mac", "ippc";
-
+		#address-cells = <1>;
+		#size-cells = <0>;
 		clocks = <&sysc MT7621_CLK_XTAL>;
 		clock-names = "sys_ck";
-
 		interrupt-parent = <&gic>;
 		interrupts = <GIC_SHARED 22 IRQ_TYPE_LEVEL_HIGH>;
 	};
-- 


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

* Re: [PATCH v2] mips: dts: ralink: mt7621: add cell count properties to usb
  2024-03-07 22:37 ` [PATCH v2] mips: dts: ralink: mt7621: add cell count properties to usb Justin Swartz
@ 2024-03-08  9:32   ` Sergio Paracuellos
  2024-03-08 12:01   ` Arınç ÜNAL
  1 sibling, 0 replies; 7+ messages in thread
From: Sergio Paracuellos @ 2024-03-08  9:32 UTC (permalink / raw)
  To: Justin Swartz
  Cc: Arınç ÜNAL, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Thomas Bogendoerfer, Matthias Brugger,
	AngeloGioacchino Del Regno, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

On Thu, Mar 7, 2024 at 11:39 PM Justin Swartz
<justin.swartz@risingedge.co.za> wrote:
>
> Add default #address-cells and #size-cells properties to the
> usb node, which should be suitable for hubs and devices without
> explicitly declared interface nodes, as:
>
>   "#address-cells":
>     description: should be 1 for hub nodes with device nodes,
>       should be 2 for device nodes with interface nodes.
>     enum: [1, 2]
>
>   "#size-cells":
>     const: 0
>
> -- Documentation/devicetree/bindings/usb/usb-device.yaml
>
> This version of the patch places the properties according to
> the order recommended by:
>
>    Documentation/devicetree/bindings/dts-coding-style.rst

Drop these three lines, this explanation would be after --- line as
information about the changes from v1.

>
> Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za>
> ---
>  arch/mips/boot/dts/ralink/mt7621.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

With the three lines removal addressed:
Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Best regards,
    Sergio Paracuellos

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

* Re: [PATCH v2] mips: dts: ralink: mt7621: add cell count properties to usb
  2024-03-07 22:37 ` [PATCH v2] mips: dts: ralink: mt7621: add cell count properties to usb Justin Swartz
  2024-03-08  9:32   ` Sergio Paracuellos
@ 2024-03-08 12:01   ` Arınç ÜNAL
  2024-03-08 13:21     ` Justin Swartz
  1 sibling, 1 reply; 7+ messages in thread
From: Arınç ÜNAL @ 2024-03-08 12:01 UTC (permalink / raw)
  To: Justin Swartz, Sergio Paracuellos, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thomas Bogendoerfer,
	Matthias Brugger, AngeloGioacchino Del Regno
  Cc: linux-mips, devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On 8.03.2024 01:37, Justin Swartz wrote:
> Add default #address-cells and #size-cells properties to the
> usb node, which should be suitable for hubs and devices without
> explicitly declared interface nodes, as:
> 
>    "#address-cells":
>      description: should be 1 for hub nodes with device nodes,
>        should be 2 for device nodes with interface nodes.
>      enum: [1, 2]
> 
>    "#size-cells":
>      const: 0
> 
> -- Documentation/devicetree/bindings/usb/usb-device.yaml
> 
> This version of the patch places the properties according to
> the order recommended by:
> 
>     Documentation/devicetree/bindings/dts-coding-style.rst
> 
> Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za>
> ---
>   arch/mips/boot/dts/ralink/mt7621.dtsi | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
> index 5a89f0b8c..7532e17dd 100644
> --- a/arch/mips/boot/dts/ralink/mt7621.dtsi
> +++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
> @@ -289,10 +289,10 @@ usb: usb@1e1c0000 {
>   		reg = <0x1e1c0000 0x1000
>   		       0x1e1d0700 0x0100>;
>   		reg-names = "mac", "ippc";
> -
> +		#address-cells = <1>;
> +		#size-cells = <0>;
>   		clocks = <&sysc MT7621_CLK_XTAL>;
>   		clock-names = "sys_ck";
> -

Please keep the empty lines. It's easier to read. I don't see anything on
the Devicetree Sources (DTS) Coding Style that would restrict this.

Arınç

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

* Re: [PATCH v2] mips: dts: ralink: mt7621: add cell count properties to usb
  2024-03-08 12:01   ` Arınç ÜNAL
@ 2024-03-08 13:21     ` Justin Swartz
  2024-03-08 13:48       ` Arınç ÜNAL
  0 siblings, 1 reply; 7+ messages in thread
From: Justin Swartz @ 2024-03-08 13:21 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Sergio Paracuellos, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Thomas Bogendoerfer, Matthias Brugger,
	AngeloGioacchino Del Regno, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek


On 2024-03-08 14:01, Arınç ÜNAL wrote:
> On 8.03.2024 01:37, Justin Swartz wrote:
>> Add default #address-cells and #size-cells properties to the
>> usb node, which should be suitable for hubs and devices without
>> explicitly declared interface nodes, as:
>> 
>>    "#address-cells":
>>      description: should be 1 for hub nodes with device nodes,
>>        should be 2 for device nodes with interface nodes.
>>      enum: [1, 2]
>> 
>>    "#size-cells":
>>      const: 0
>> 
>> -- Documentation/devicetree/bindings/usb/usb-device.yaml
>> 
>> This version of the patch places the properties according to
>> the order recommended by:
>> 
>>     Documentation/devicetree/bindings/dts-coding-style.rst
>> 
>> Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za>
>> ---
>>   arch/mips/boot/dts/ralink/mt7621.dtsi | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi 
>> b/arch/mips/boot/dts/ralink/mt7621.dtsi
>> index 5a89f0b8c..7532e17dd 100644
>> --- a/arch/mips/boot/dts/ralink/mt7621.dtsi
>> +++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
>> @@ -289,10 +289,10 @@ usb: usb@1e1c0000 {
>>   		reg = <0x1e1c0000 0x1000
>>   		       0x1e1d0700 0x0100>;
>>   		reg-names = "mac", "ippc";
>> -
>> +		#address-cells = <1>;
>> +		#size-cells = <0>;
>>   		clocks = <&sysc MT7621_CLK_XTAL>;
>>   		clock-names = "sys_ck";
>> -
> 
> Please keep the empty lines. It's easier to read. I don't see anything 
> on
> the Devicetree Sources (DTS) Coding Style that would restrict this.

The reason I removed them was due to the SoC DTSI example shown in [1]
lacking empty lines between properties, but then using them instead as
visual separation between properties and child nodes, or at least that's
how I understood it when I looked at it.

Personally, I prefer the look of the SoC DTSI example - but I don't mind
recreating the patch set with the empty lines between the properties 
left
entact.

As there is a mix of property spacing and ordering styles in mt7621.dtsi
already - what is the consensus on what a node in this file should look
like?

I also don't mind following that pattern and cleaning up the whole dtsi
according to that if it'll save us all time and energy in future.

Regards
Justin

[1] https://docs.kernel.org/devicetree/bindings/dts-coding-style.html

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

* Re: [PATCH v2] mips: dts: ralink: mt7621: add cell count properties to usb
  2024-03-08 13:21     ` Justin Swartz
@ 2024-03-08 13:48       ` Arınç ÜNAL
  2024-03-08 13:57         ` Justin Swartz
  0 siblings, 1 reply; 7+ messages in thread
From: Arınç ÜNAL @ 2024-03-08 13:48 UTC (permalink / raw)
  To: Justin Swartz
  Cc: Sergio Paracuellos, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Thomas Bogendoerfer, Matthias Brugger,
	AngeloGioacchino Del Regno, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

On 8.03.2024 16:21, Justin Swartz wrote:
> 
> On 2024-03-08 14:01, Arınç ÜNAL wrote:
>> On 8.03.2024 01:37, Justin Swartz wrote:
>>> Add default #address-cells and #size-cells properties to the
>>> usb node, which should be suitable for hubs and devices without
>>> explicitly declared interface nodes, as:
>>>
>>>    "#address-cells":
>>>      description: should be 1 for hub nodes with device nodes,
>>>        should be 2 for device nodes with interface nodes.
>>>      enum: [1, 2]
>>>
>>>    "#size-cells":
>>>      const: 0
>>>
>>> -- Documentation/devicetree/bindings/usb/usb-device.yaml
>>>
>>> This version of the patch places the properties according to
>>> the order recommended by:
>>>
>>>     Documentation/devicetree/bindings/dts-coding-style.rst
>>>
>>> Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za>
>>> ---
>>>   arch/mips/boot/dts/ralink/mt7621.dtsi | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
>>> index 5a89f0b8c..7532e17dd 100644
>>> --- a/arch/mips/boot/dts/ralink/mt7621.dtsi
>>> +++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
>>> @@ -289,10 +289,10 @@ usb: usb@1e1c0000 {
>>>           reg = <0x1e1c0000 0x1000
>>>                  0x1e1d0700 0x0100>;
>>>           reg-names = "mac", "ippc";
>>> -
>>> +        #address-cells = <1>;
>>> +        #size-cells = <0>;
>>>           clocks = <&sysc MT7621_CLK_XTAL>;
>>>           clock-names = "sys_ck";
>>> -
>>
>> Please keep the empty lines. It's easier to read. I don't see anything on
>> the Devicetree Sources (DTS) Coding Style that would restrict this.
> 
> The reason I removed them was due to the SoC DTSI example shown in [1]
> lacking empty lines between properties, but then using them instead as
> visual separation between properties and child nodes, or at least that's
> how I understood it when I looked at it.
> 
> Personally, I prefer the look of the SoC DTSI example - but I don't mind
> recreating the patch set with the empty lines between the properties left
> entact.
> 
> As there is a mix of property spacing and ordering styles in mt7621.dtsi
> already - what is the consensus on what a node in this file should look
> like?

There's no precise spacing style I maintain here. I simply group together
properties that describe a single attribute, and separate those that
describe different attributes.

> 
> I also don't mind following that pattern and cleaning up the whole dtsi
> according to that if it'll save us all time and energy in future.

If you'd like to improve the ordering style of the MT7621 device tree
sources accordingly with
Documentation/devicetree/bindings/dts-coding-style.rst, I'd be happy to
review those patches.

Arınç

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

* Re: [PATCH v2] mips: dts: ralink: mt7621: add cell count properties to usb
  2024-03-08 13:48       ` Arınç ÜNAL
@ 2024-03-08 13:57         ` Justin Swartz
  0 siblings, 0 replies; 7+ messages in thread
From: Justin Swartz @ 2024-03-08 13:57 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Sergio Paracuellos, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Thomas Bogendoerfer, Matthias Brugger,
	AngeloGioacchino Del Regno, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

On 2024-03-08 15:48, Arınç ÜNAL wrote:
> On 8.03.2024 16:21, Justin Swartz wrote:
>> 
>> On 2024-03-08 14:01, Arınç ÜNAL wrote:
>>> On 8.03.2024 01:37, Justin Swartz wrote:
>>>> Add default #address-cells and #size-cells properties to the
>>>> usb node, which should be suitable for hubs and devices without
>>>> explicitly declared interface nodes, as:
>>>> 
>>>>    "#address-cells":
>>>>      description: should be 1 for hub nodes with device nodes,
>>>>        should be 2 for device nodes with interface nodes.
>>>>      enum: [1, 2]
>>>> 
>>>>    "#size-cells":
>>>>      const: 0
>>>> 
>>>> -- Documentation/devicetree/bindings/usb/usb-device.yaml
>>>> 
>>>> This version of the patch places the properties according to
>>>> the order recommended by:
>>>> 
>>>>     Documentation/devicetree/bindings/dts-coding-style.rst
>>>> 
>>>> Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za>
>>>> ---
>>>>   arch/mips/boot/dts/ralink/mt7621.dtsi | 4 ++--
>>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>> 
>>>> diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi 
>>>> b/arch/mips/boot/dts/ralink/mt7621.dtsi
>>>> index 5a89f0b8c..7532e17dd 100644
>>>> --- a/arch/mips/boot/dts/ralink/mt7621.dtsi
>>>> +++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
>>>> @@ -289,10 +289,10 @@ usb: usb@1e1c0000 {
>>>>           reg = <0x1e1c0000 0x1000
>>>>                  0x1e1d0700 0x0100>;
>>>>           reg-names = "mac", "ippc";
>>>> -
>>>> +        #address-cells = <1>;
>>>> +        #size-cells = <0>;
>>>>           clocks = <&sysc MT7621_CLK_XTAL>;
>>>>           clock-names = "sys_ck";
>>>> -
>>> 
>>> Please keep the empty lines. It's easier to read. I don't see 
>>> anything on
>>> the Devicetree Sources (DTS) Coding Style that would restrict this.
>> 
>> The reason I removed them was due to the SoC DTSI example shown in [1]
>> lacking empty lines between properties, but then using them instead as
>> visual separation between properties and child nodes, or at least 
>> that's
>> how I understood it when I looked at it.
>> 
>> Personally, I prefer the look of the SoC DTSI example - but I don't 
>> mind
>> recreating the patch set with the empty lines between the properties 
>> left
>> entact.
>> 
>> As there is a mix of property spacing and ordering styles in 
>> mt7621.dtsi
>> already - what is the consensus on what a node in this file should 
>> look
>> like?
> 
> There's no precise spacing style I maintain here. I simply group 
> together
> properties that describe a single attribute, and separate those that
> describe different attributes.

I'll recreate v3 accordingly.


>> I also don't mind following that pattern and cleaning up the whole 
>> dtsi
>> according to that if it'll save us all time and energy in future.
> 
> If you'd like to improve the ordering style of the MT7621 device tree
> sources accordingly with
> Documentation/devicetree/bindings/dts-coding-style.rst, I'd be happy to
> review those patches.

Thanks, I'll make an attempt at this sometime soon.


Regards
Justin

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

* [PATCH v2] mips: dts: ralink: mt7621: add cell count properties to usb
  2024-03-07 14:58 [PATCH] mips: dts: ralink: mt7621: add cell count properties to usb0 Justin Swartz
@ 2024-03-07 23:58 ` Justin Swartz
  0 siblings, 0 replies; 7+ messages in thread
From: Justin Swartz @ 2024-03-07 23:58 UTC (permalink / raw)
  To: Arınç ÜNAL, Sergio Paracuellos, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thomas Bogendoerfer,
	Matthias Brugger, AngeloGioacchino Del Regno
  Cc: Justin Swartz, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

Add default #address-cells and #size-cells properties to the
usb node, which should be suitable for hubs and devices without
explicitly declared interface nodes, as:

  "#address-cells":
    description: should be 1 for hub nodes with device nodes,
      should be 2 for device nodes with interface nodes.
    enum: [1, 2]

  "#size-cells":
    const: 0

-- Documentation/devicetree/bindings/usb/usb-device.yaml

This version of the patch places the properties according to
the order recommended by:

   Documentation/devicetree/bindings/dts-coding-style.rst

Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za>
---
 arch/mips/boot/dts/ralink/mt7621.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
index 5a89f0b8c..7532e17dd 100644
--- a/arch/mips/boot/dts/ralink/mt7621.dtsi
+++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
@@ -289,10 +289,10 @@ usb: usb@1e1c0000 {
 		reg = <0x1e1c0000 0x1000
 		       0x1e1d0700 0x0100>;
 		reg-names = "mac", "ippc";
-
+		#address-cells = <1>;
+		#size-cells = <0>;
 		clocks = <&sysc MT7621_CLK_XTAL>;
 		clock-names = "sys_ck";
-
 		interrupt-parent = <&gic>;
 		interrupts = <GIC_SHARED 22 IRQ_TYPE_LEVEL_HIGH>;
 	};
-- 


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

end of thread, other threads:[~2024-03-08 13:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <0001-mips-dts-ralink-mt7621-add-cell-count-properties-to-.patch>
2024-03-07 22:37 ` [PATCH v2] mips: dts: ralink: mt7621: add cell count properties to usb Justin Swartz
2024-03-08  9:32   ` Sergio Paracuellos
2024-03-08 12:01   ` Arınç ÜNAL
2024-03-08 13:21     ` Justin Swartz
2024-03-08 13:48       ` Arınç ÜNAL
2024-03-08 13:57         ` Justin Swartz
2024-03-07 14:58 [PATCH] mips: dts: ralink: mt7621: add cell count properties to usb0 Justin Swartz
2024-03-07 23:58 ` [PATCH v2] mips: dts: ralink: mt7621: add cell count properties to usb Justin Swartz

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