dt-bindings: iio: adc: rtq6056: add support for the whole RTQ6056 family
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 14 lines · On 26/12/2023 04:47, [email protected] wrote:
From: ChiYuan Huang <[email protected]>
Add compatible support for RTQ6053 and RTQ6059.
Signed-off-by ChiYuan Huang <[email protected]>--- .../devicetree/bindings/iio/adc/richtek,rtq6056.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +0
-0
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml description: | · line 30
Quoted 7 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +3
-1@@ -25,7 +25,10 @@ description: | properties: compatible: - const: richtek,rtq6056 + enum: + - richtek,rtq6053 + - richtek,rtq6056
Aren't these devices compatible? Your driver change says they are, so express compatibility with list here (and oneOf).
Best regards,
Krzysztof
Quoted 16 lines · Krzysztof Kozlowski
Quoted 15 lines · On 26/12/2023 04:47, [email protected] wrote:
From: ChiYuan Huang <[email protected]>
Add compatible support for RTQ6053 and RTQ6059.
Signed-off-by ChiYuan Huang <[email protected]>--- .../devicetree/bindings/iio/adc/richtek,rtq6056.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +0
-0@@ -25,7 +25,10 @@ description: |
Quoted 10 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml description: | · line 30
Quoted 6 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +3
-1properties: compatible: - const: richtek,rtq6056 + enum: + - richtek,rtq6053 + - richtek,rtq6056Aren't these devices compatible? Your driver change says they are, so express compatibility with list here (and oneOf).
Thanks, I try to take other binding as the reference. One more question. If rtq6053 is compatible with rtq6056, there's only chip package type difference. Do I need to seperate it into a dedicated enum element?
Or just put it into one item and said this part number is compatible with rtq6056?
Quoted 4 lines
Best regards,
Krzysztof
Quoted 27 lines · ChiYuan Huang
Quoted 16 lines · Krzysztof Kozlowski
Quoted 15 lines · On 26/12/2023 04:47, [email protected] wrote:
From: ChiYuan Huang <[email protected]>
Add compatible support for RTQ6053 and RTQ6059.
Signed-off-by ChiYuan Huang <[email protected]>--- .../devicetree/bindings/iio/adc/richtek,rtq6056.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +0
-0@@ -25,7 +25,10 @@ description: |Quoted 10 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml description: | · line 30
Quoted 6 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +3
-1properties: compatible: - const: richtek,rtq6056 + enum: + - richtek,rtq6053 + - richtek,rtq6056Aren't these devices compatible? Your driver change says they are, so express compatibility with list here (and oneOf).
Quoted 4 lines
Thanks, I try to take other binding as the reference. One more question. If rtq6053 is compatible with rtq6056, there's only chip package type difference. Do I need to seperate it into a dedicated enum element?
Or just put it into one item and said this part number is compatible with rtq6056?
See example-schema. You need enum and items, both in oneOf:.
Best regards,
Krzysztof
Quoted 28 lines · Krzysztof Kozlowski
Quoted 27 lines · ChiYuan Huang
Quoted 26 lines · Krzysztof Kozlowski
Quoted 14 lines · On 26/12/2023 04:47, [email protected] wrote:
From: ChiYuan Huang <[email protected]>
Add compatible support for RTQ6053 and RTQ6059.
Signed-off-by ChiYuan Huang <[email protected]>--- .../devicetree/bindings/iio/adc/richtek,rtq6056.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +0
-0Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml description: | · line 30
Quoted 7 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +3
-1@@ -25,7 +25,10 @@ description: | properties: compatible: - const: richtek,rtq6056 + enum: + - richtek,rtq6053 + - richtek,rtq6056Aren't these devices compatible? Your driver change says they are, so express compatibility with list here (and oneOf).
Quoted 7 lines
Quoted 4 lines
Thanks, I try to take other binding as the reference. One more question. If rtq6053 is compatible with rtq6056, there's only chip package type difference. Do I need to seperate it into a dedicated enum element?
Or just put it into one item and said this part number is compatible with rtq6056?See example-schema. You need enum and items, both in oneOf:.
After reading the 'example-schema', I Still cannot understand what the special case items means.
But in my case, is the below change correct?
[Diff]
properties:
compatible:
- enum:
- - richtek,rtq6053 - - richtek,rtq6056 - - richtek,rtq6059 + oneOf: + - items: + - enum: + - richtek,rtq6053 + - richtek,rtq6056 + - richtek,rtq6059
Quoted 3 lines
Best regards,
Krzysztof
Quoted 34 lines · ChiYuan Huang
Quoted 33 lines · Krzysztof Kozlowski
Quoted 31 lines · ChiYuan Huang
Quoted 16 lines · Krzysztof Kozlowski
Quoted 15 lines · On 26/12/2023 04:47, [email protected] wrote:
From: ChiYuan Huang <[email protected]>
Add compatible support for RTQ6053 and RTQ6059.
Signed-off-by ChiYuan Huang <[email protected]>--- .../devicetree/bindings/iio/adc/richtek,rtq6056.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +0
-0@@ -25,7 +25,10 @@ description: |Quoted 10 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml description: | · line 30
Quoted 6 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +3
-1properties: compatible: - const: richtek,rtq6056 + enum: + - richtek,rtq6053 + - richtek,rtq6056Aren't these devices compatible? Your driver change says they are, so express compatibility with list here (and oneOf).
Thanks, I try to take other binding as the reference. One more question. If rtq6053 is compatible with rtq6056, there's only chip package type difference. Do I need to seperate it into a dedicated enum element?
Or just put it into one item and said this part number is compatible with rtq6056?
Quoted 4 lines
Quoted 2 lines
See example-schema. You need enum and items, both in oneOf:.
After reading the 'example-schema', I Still cannot understand what the special case items means.
What is "special case items"?
Quoted 5 lines
But in my case, is the below change correct?
[Diff]
properties:
compatible:
Review
Quoted 10 lines
(quoted diff) +6
-4- enum: - - richtek,rtq6053 - - richtek,rtq6056 - - richtek,rtq6059 + oneOf: + - items: + - enum: + - richtek,rtq6053 + - richtek,rtq6056 + - richtek,rtq6059
This changes nothing, you still have just one item. The example-schema has exactly that case, so why you are coding it differently?
Anyway, test your DTS with the fallback, you will see that above does not work.
Best regards,
Krzysztof
Quoted 35 lines · Krzysztof Kozlowski
Quoted 34 lines · ChiYuan Huang
Quoted 33 lines · Krzysztof Kozlowski
Quoted 31 lines · ChiYuan Huang
Quoted 16 lines · Krzysztof Kozlowski
Quoted 15 lines · On 26/12/2023 04:47, [email protected] wrote:
From: ChiYuan Huang <[email protected]>
Add compatible support for RTQ6053 and RTQ6059.
Signed-off-by ChiYuan Huang <[email protected]>--- .../devicetree/bindings/iio/adc/richtek,rtq6056.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +0
-0@@ -25,7 +25,10 @@ description: |Quoted 10 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml description: | · line 30
Quoted 6 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +3
-1properties: compatible: - const: richtek,rtq6056 + enum: + - richtek,rtq6053 + - richtek,rtq6056Aren't these devices compatible? Your driver change says they are, so express compatibility with list here (and oneOf).
Thanks, I try to take other binding as the reference. One more question. If rtq6053 is compatible with rtq6056, there's only chip package type difference. Do I need to seperate it into a dedicated enum element?
Or just put it into one item and said this part number is compatible with rtq6056?
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
See example-schema. You need enum and items, both in oneOf:.
After reading the 'example-schema', I Still cannot understand what the special case items means.
What is "special case items"?
I may misunderstand something. The special case is the 'fallback' that you mentaioned in the last.
Quoted 16 lines
Quoted 5 lines
But in my case, is the below change correct?
[Diff]
properties:
compatible:Review
Quoted 10 lines
(quoted diff) +6
-4- enum: - - richtek,rtq6053 - - richtek,rtq6056 - - richtek,rtq6059 + oneOf: + - items: + - enum: + - richtek,rtq6053 + - richtek,rtq6056 + - richtek,rtq6059
Quoted 6 lines
This changes nothing, you still have just one item. The example-schema has exactly that case, so why you are coding it differently?
Anyway, test your DTS with the fallback, you will see that above does not work.
I rewrite the below one and tested. it seems correct.
[Diff]
compatible:
- enum:
- - richtek,rtq6053 - - richtek,rtq6056 - - richtek,rtq6059
+ oneOf:
+ - enum:
+ - richtek,rtq6053
+ - richtek,rtq6059
+ - items:
+ - const: richtek,rtq6056
Just one more question. If rtq6053 is fully compatibie with rtq6056, does it need to be put into oneOf enum or be just put into items enum and use the 'fallback' mechanism?
If so, the 'richtek,rtq6053' in of_device_id match can be removed. Though it just remove one line, but less-changed would be better.
ChiYuan.
Best regards,
Quoted 2 lines
Krzysztof
Quoted 71 lines · ChiYuan Huang
Quoted 35 lines · Krzysztof Kozlowski
Quoted 34 lines · ChiYuan Huang
Quoted 33 lines · Krzysztof Kozlowski
Quoted 31 lines · ChiYuan Huang
Quoted 16 lines · Krzysztof Kozlowski
Quoted 15 lines · On 26/12/2023 04:47, [email protected] wrote:
From: ChiYuan Huang <[email protected]>
Add compatible support for RTQ6053 and RTQ6059.
Signed-off-by ChiYuan Huang <[email protected]>--- .../devicetree/bindings/iio/adc/richtek,rtq6056.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +0
-0@@ -25,7 +25,10 @@ description: |Quoted 10 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml description: | · line 30
Quoted 6 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +3
-1properties: compatible: - const: richtek,rtq6056 + enum: + - richtek,rtq6053 + - richtek,rtq6056Aren't these devices compatible? Your driver change says they are, so express compatibility with list here (and oneOf).
Thanks, I try to take other binding as the reference. One more question. If rtq6053 is compatible with rtq6056, there's only chip package type difference. Do I need to seperate it into a dedicated enum element?
Or just put it into one item and said this part number is compatible with rtq6056?Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
See example-schema. You need enum and items, both in oneOf:.
After reading the 'example-schema', I Still cannot understand what the special case items means.
What is "special case items"?
I may misunderstand something. The special case is the 'fallback' that you mentaioned in the last.
Quoted 16 lines
Quoted 5 lines
But in my case, is the below change correct?
[Diff]
properties:
compatible:Review
Quoted 10 lines
(quoted diff) +6
-4- enum: - - richtek,rtq6053 - - richtek,rtq6056 - - richtek,rtq6059 + oneOf: + - items: + - enum: + - richtek,rtq6053 + - richtek,rtq6056 + - richtek,rtq6059Quoted 6 lines
This changes nothing, you still have just one item. The example-schema has exactly that case, so why you are coding it differently?
Anyway, test your DTS with the fallback, you will see that above does not work.
I rewrite the below one and tested. it seems correct.
[Diff]
compatible:
Review
Quoted 10 lines
(quoted diff) +6
-4- enum: - - richtek,rtq6053 - - richtek,rtq6056 - - richtek,rtq6059 + oneOf: + - enum: + - richtek,rtq6053 + - richtek,rtq6059 + - items: + - const: richtek,rtq6056
You still need two items here to express compatibility. What is compatible with what? It must be rtq6053 compatible with rtq6056, because you cannot break the ABI, can you?
Quoted 3 lines
Just one more question. If rtq6053 is fully compatibie with rtq6056, does it need to be put into oneOf enum or be just put into items enum and use the 'fallback' mechanism?
The fallback is just a term. The point is to have a list of two compatibles. See: Devicetree specification, writing-bindings and numerous presentations about writing DTS.
Quoted 3 lines
If so, the 'richtek,rtq6053' in
of_device_idmatch can be removed. Though it just remove one line, but less-changed would be better.
The device using fallback should be removed the driver of_device_id, so 6053 goes away.
Best regards,
Krzysztof
Hi, Krzysztof:
Quoted 96 lines · Krzysztof Kozlowski
Quoted 71 lines · ChiYuan Huang
Quoted 35 lines · Krzysztof Kozlowski
Quoted 34 lines · ChiYuan Huang
Quoted 33 lines · Krzysztof Kozlowski
Quoted 31 lines · ChiYuan Huang
Quoted 16 lines · Krzysztof Kozlowski
Quoted 15 lines · On 26/12/2023 04:47, [email protected] wrote:
From: ChiYuan Huang <[email protected]>
Add compatible support for RTQ6053 and RTQ6059.
Signed-off-by ChiYuan Huang <[email protected]>--- .../devicetree/bindings/iio/adc/richtek,rtq6056.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +0
-0@@ -25,7 +25,10 @@ description: |Quoted 10 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml description: | · line 30
Quoted 6 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +3
-1properties: compatible: - const: richtek,rtq6056 + enum: + - richtek,rtq6053 + - richtek,rtq6056Aren't these devices compatible? Your driver change says they are, so express compatibility with list here (and oneOf).
Thanks, I try to take other binding as the reference. One more question. If rtq6053 is compatible with rtq6056, there's only chip package type difference. Do I need to seperate it into a dedicated enum element?
Or just put it into one item and said this part number is compatible with rtq6056?Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
See example-schema. You need enum and items, both in oneOf:.
After reading the 'example-schema', I Still cannot understand what the special case items means.
What is "special case items"?
I may misunderstand something. The special case is the 'fallback' that you mentaioned in the last.
Quoted 16 lines
Quoted 5 lines
But in my case, is the below change correct?
[Diff]
properties:
compatible:Review
Quoted 10 lines
(quoted diff) +6
-4- enum: - - richtek,rtq6053 - - richtek,rtq6056 - - richtek,rtq6059 + oneOf: + - items: + - enum: + - richtek,rtq6053 + - richtek,rtq6056 + - richtek,rtq6059Quoted 6 lines
This changes nothing, you still have just one item. The example-schema has exactly that case, so why you are coding it differently?
Anyway, test your DTS with the fallback, you will see that above does not work.
I rewrite the below one and tested. it seems correct.
[Diff]
compatible:Review
Quoted 10 lines
(quoted diff) +6
-4- enum: - - richtek,rtq6053 - - richtek,rtq6056 - - richtek,rtq6059 + oneOf: + - enum: + - richtek,rtq6053 + - richtek,rtq6059 + - items: + - const: richtek,rtq6056You still need two items here to express compatibility. What is compatible with what? It must be rtq6053 compatible with rtq6056, because you cannot break the ABI, can you?
Quoted 3 lines
Just one more question. If rtq6053 is fully compatibie with rtq6056, does it need to be put into oneOf enum or be just put into items enum and use the 'fallback' mechanism?
The fallback is just a term. The point is to have a list of two compatibles. See: Devicetree specification, writing-bindings and numerous presentations about writing DTS.
Quoted 1 line
Quoted 6 lines
Quoted 2 lines
If so, the 'richtek,rtq6053' in
of_device_idmatch can be removed. Though it just remove one line, but less-changed would be better.The device using fallback should be removed the driver
of_device_id, so 6053 goes away.
Thanks for all the information. If not misunderstanding, I'll remove "dt match id" for 6053.
And the binding fix in v2 will be
properties:
compatible:
- enum:
- - richtek,rtq6053 - - richtek,rtq6056 - - richtek,rtq6059
+ oneOf:
+ - enum:
+ - richtek,rtq6056
+ - richtek,rtq6059
+ - items:
+ - enum:
+ - richtek,rtq6053
+ - const: richtek,rtq6056
This make the 6053 compatible with 6056 with DT fallback.
Quoted 3 lines
Best regards,
Krzysztof
Jonathan Cameron
maintainerQuoted 16 lines · On Tue, 26 Dec 2023 10:18:47 +0100 Krzysztof Kozlowski…
Quoted 15 lines · On 26/12/2023 04:47, [email protected] wrote:
From: ChiYuan Huang <[email protected]>
Add compatible support for RTQ6053 and RTQ6059.
Signed-off-by ChiYuan Huang <[email protected]>--- .../devicetree/bindings/iio/adc/richtek,rtq6056.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +0
-0@@ -25,7 +25,10 @@ description: |
Quoted 9 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml description: | · line 30
Quoted 6 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +3
-1properties: compatible: - const: richtek,rtq6056 + enum: + - richtek,rtq6053 + - richtek,rtq6056Aren't these devices compatible? Your driver change says they are, so express compatibility with list here (and oneOf).
I'm not seeing this thread on lore.kernel.org or in my local email. Perhaps something went wrong?
Jonathan
Quoted 5 lines
Best regards,
Krzysztof
Quoted 29 lines · Jonathan Cameron
Quoted 16 lines · On Tue, 26 Dec 2023 10:18:47 +0100 Krzysztof Kozlowski…
Quoted 15 lines · On 26/12/2023 04:47, [email protected] wrote:
From: ChiYuan Huang <[email protected]>
Add compatible support for RTQ6053 and RTQ6059.
Signed-off-by ChiYuan Huang <[email protected]>--- .../devicetree/bindings/iio/adc/richtek,rtq6056.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +0
-0@@ -25,7 +25,10 @@ description: |Quoted 9 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml description: | · line 30
Quoted 6 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +3
-1properties: compatible: - const: richtek,rtq6056 + enum: + - richtek,rtq6053 + - richtek,rtq6056Aren't these devices compatible? Your driver change says they are, so express compatibility with list here (and oneOf).
Quoted 3 lines
I'm not seeing this thread on lore.kernel.org or in my local email. Perhaps something went wrong?
I also cannot find the original message in lore.kernel.org. But I checked the to/cc list. Nothing is lost.
Still not sure what happened.
Best Regards,
ChiYuan
Quoted 9 lines
Jonathan
Quoted 5 lines
Best regards,
Krzysztof
Quoted 30 lines · ChiYuan Huang
Quoted 29 lines · Jonathan Cameron
Quoted 25 lines · On Tue, 26 Dec 2023 10:18:47 +0100 Krzysztof Kozlowski…
Quoted 14 lines · On 26/12/2023 04:47, [email protected] wrote:
From: ChiYuan Huang <[email protected]>
Add compatible support for RTQ6053 and RTQ6059.
Signed-off-by ChiYuan Huang <[email protected]>--- .../devicetree/bindings/iio/adc/richtek,rtq6056.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +0
-0Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml description: | · line 30
Quoted 7 lines
Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml +3
-1@@ -25,7 +25,10 @@ description: | properties: compatible: - const: richtek,rtq6056 + enum: + - richtek,rtq6053 + - richtek,rtq6056Aren't these devices compatible? Your driver change says they are, so express compatibility with list here (and oneOf).
Quoted 7 lines
Quoted 3 lines
I'm not seeing this thread on lore.kernel.org or in my local email. Perhaps something went wrong?
I also cannot find the original message in lore.kernel.org. But I checked the to/cc list. Nothing is lost.
Still not sure what happened.
Ok, it seems the only difference is that I forget to add --thread in git format-patch. But not sure for that.
When I send v2 patch for the binding fix, I'll check it again.
Sorry for the inconvenience.
Quoted 12 lines
Best Regards,
ChiYuanQuoted 9 lines
Jonathan
Quoted 5 lines
Best regards,
Krzysztof