Re: [PATCH v2 2/5] dt-bindings: rtc: abx80x: convert to yaml

From: Josua Mayer
Date: Sun Jan 14 2024 - 10:56:22 EST


Am 12.01.24 um 18:18 schrieb Krzysztof Kozlowski:
> On 12/01/2024 18:12, Josua Mayer wrote:
>> +++ b/Documentation/devicetree/bindings/rtc/abracon,abx80x.yaml
>> @@ -0,0 +1,56 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/rtc/abracon,abx80x.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Abracon ABX80X I2C ultra low power RTC/Alarm chip
>> +
>> +maintainers: []
> You need a name here. If there is no driver maintainer or anyone
> interested, put devicetree list.
Ack.
>> +
>> +allOf:
>> + - $ref: rtc.yaml#
>> +
>> +properties:
>> + compatible:
>> + anyOf:
> Please do not invent your own solutions, but use existing code as
> template. Just open example-schema or any other recent RTC binding.

This was inspired by jsonschema / stackoverflow.
Will change it as requested.

>> + - description: auto-detection from id register
>> + const: abracon,abx80x
>> + - const: abracon,,ab0801
>> + - const: abracon,,ab0803
>> + - const: abracon,,ab0804
>> + - const: abracon,,ab0805
>> + - const: abracon,,ab1801
>> + - const: abracon,,ab1803
>> + - const: abracon,,ab1804
>> + - const: abracon,,ab1805
>> + - const: microcrystal,rv1805
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + interrupts:
>> + maxItems: 1
>> +
>> + abracon,tc-diode:
> Missing type - string.
$ref: /schemas/types.yaml#/definitions/string ?
If so - ack.
>> + description:
>> + Trickle-charge diode type.
>> + Required to enable charging backup battery.
>> + anyOf:
> Use enum and explain the meanings of the values in descruption.
>
>> + - description: standard diode with 0.6V drop
>> + const: standard
>> + - description: schottky diode with 0.3V drop
>> + const: schottky
Here was the real motivation for different solution.
Will change it as requested.
>> +
>> + abracon,tc-resistor:
>> + description:
>> + Trickle-charge resistor value in kOhm.
>> + Required to enable charging backup battery.
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + enum: [0, 3, 6, 11]
>> +
>> +required:
>> + - compatible
>> + - reg
>> +
>> +unevaluatedProperties: false
> Provide example.
Okay.


Thanks. sincerely,
Josua Mayer