[PATCH 5/5] dt-bindings: iio: adc: xilinx-xadc: convert to YAML format
Sai Krishna Potthuri
sai.krishna.potthuri at amd.com
Thu Mar 19 07:49:09 PDT 2026
Hi David Lechner,
On 3/19/2026 7:53 PM, David Lechner wrote:
> On 3/19/26 8:52 AM, Sai Krishna Potthuri wrote:
>> Hi Krzysztof,
>>
>> On 2/21/2026 4:08 PM, Krzysztof Kozlowski wrote:
>>> On Fri, Feb 20, 2026 at 11:09:41AM +0530, Sai Krishna Potthuri wrote:
>>>> 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...
>>>
>>>> + - if:
>>>> + required:
>>>> + - xlnx,external-mux
>>>> + properties:
>>>> + xlnx,external-mux:
>>>> + enum:
>>>> + - single
>>>> + - dual
>>>> + then:
>>>> + required:
>>>> + - xlnx,external-mux-channel
>>>> +
>>>> +required:
>>>> + - compatible
>>>> + - reg
>>>> +
>>>> +unevaluatedProperties: false
>>>
>>> or you meant additionalProperties?
>>>
>>>> +
>>>> +$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.
v1 code:
xlnx,channels:
$ref: '#/$defs/channels'
$defs:
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
required:
- '#address-cells'
- '#size-cells'
unevaluatedProperties: false
Regards
Sai krishna
>
>
>
>>
>> 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 Krishna
>>
>>>
>>>> + 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
>>>
More information about the linux-arm-kernel
mailing list