Re: [PATCH 5/5] dt-bindings: iio: adc: xilinx-xadc: convert to YAML format
From: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
Date: 2026-03-19 15:49:19
Also in:
linux-devicetree, linux-iio, lkml
Hi David Lechner, On 3/19/2026 9:05 PM, David Lechner wrote:
On 3/19/26 10:10 AM, Sai Krishna Potthuri wrote:quoted
Hi David Lechner, On 3/19/2026 8:28 PM, David Lechner wrote:quoted
On 3/19/26 9:49 AM, Sai Krishna Potthuri wrote:quoted
Hi David Lechner, On 3/19/2026 7:53 PM, David Lechner wrote:quoted
On 3/19/26 8:52 AM, Sai Krishna Potthuri wrote:quoted
Hi Krzysztof, On 2/21/2026 4:08 PM, Krzysztof Kozlowski wrote:quoted
On Fri, Feb 20, 2026 at 11:09:41AM +0530, Sai Krishna Potthuri wrote:quoted
Convert the xilinx-xadc.txt Devicetree binding to a YAML schema format and remove the old text binding. + + xlnx,channels: + $ref: '#/$defs/channels' + +allOf:Missing ref since you use unevaluatedProperties...quoted
+ - if: + required: + - xlnx,external-mux + properties: + xlnx,external-mux: + enum: + - single + - dual + then: + required: + - xlnx,external-mux-channel + +required: + - compatible + - reg + +unevaluatedProperties: falseor you meant additionalProperties?quoted
+ +$defs:Why this is a def, not used directly? I see only one usage of this def.I am getting the below error if i define the patternProperties directly. Seems like complex vendor peroperties should be referenced via $ref. Please suggest if there is any better way to deal this.It is hard to say without seeing the new version of what you wrote.In v1 series, i created $def and referenced this in xlnx,channels to avoid the error that i mentioned.Is the code below the code that causes the error?No, the below code is not creating the error but Krzysztof asked the question on this code, "Why this is a def, not used directly? I see only one usage of this def." I am saying if i don't use the def and use it directly i am seeing the error that i mentioned. So, asking is there any better way to handle this case other than using def.If you could show us the actual code that is causing the error, then we could perhaps spot a mistake or suggest an alternative.
Thanks. Here is the code that is causing the error
("properties:xlnx,channels:type: 'boolean' was expected").
xlnx,channels:
type: object
description: List of external channels that are connected to the ADC
properties:
'#address-cells':
const: 1
'#size-cells':
const: 0
patternProperties:
"^channel@([0-9]|1[0-6])$":
type: object
properties:
reg:
minimum: 0
maximum: 16
description: |
Pair of pins the channel is connected to:
0: VP/VN
1-16: VAUXP[0-15]/VAUXN[0-15]
Note each channel number should only be used at most once.
xlnx,bipolar:
type: boolean
description: If set, the channel is used in bipolar mode
required:
- reg
additionalProperties: false
required:
- '#address-cells'
- '#size-cells'
additionalProperties: false
Regards
Sai Krishna
quoted
Regards Sai Krishnaquoted
quoted
v1 code: xlnx,channels: $ref: '#/$defs/channels' $defs: channels:Is this indent bug just from copying to email or does it exist in the source that is causing the error?quoted
type: object description: List of external channels that are connected to the ADC properties: '#address-cells': const: 1 '#size-cells': const: 0 patternProperties: "^channel@([0-9]|1[0-6])$": type: object properties: reg: minimum: 0 maximum: 16 description: | Pair of pins the channel is connected to: 0: VP/VN 1-16: VAUXP[0-15]/VAUXN[0-15] Note each channel number should only be used at most once. xlnx,bipolar: type: boolean description: If set, the channel is used in bipolar mode required: - reg unevaluatedProperties: false required: - '#address-cells' - '#size-cells' unevaluatedProperties: false Regards Sai krishnaquoted
quoted
linux-xlnx/Documentation/devicetree/bindings/iio/adc/xilinx-xadc.yaml: properties:xlnx,channels:type: 'boolean' was expected hint: A vendor boolean property can use "type: boolean" from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml# LINT ../Documentation/devicetree/bindings DTEX Documentation/devicetree/bindings/iio/adc/xilinx-xadc.example.dts DTC [C] Documentation/devicetree/bindings/iio/adc/xilinx-xadc.example.dtb Regards Sai Krishnaquoted
quoted
+ channels: + type: object + description: List of external channels that are connected to the ADC + properties: + '#address-cells': + const: 1 + '#size-cells': + const: 0 + + patternProperties: + "^channel@([0-9]|1[0-6])$": + type: object + properties: + reg: + minimum: 0 + maximum: 16 + description: | + Pair of pins the channel is connected to: + 0: VP/VN + 1-16: VAUXP[0-15]/VAUXN[0-15] + Note each channel number should only be used at most once. + + xlnx,bipolar: + type: boolean + description: If set, the channel is used in bipolar mode + + required: + - reg + + unevaluatedProperties: false