Re: [PATCH v4] dt-bindings: rtc: isl1208: Convert to json-schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 9, 2023 at 6:12 AM Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote:
> +
> +  interrupt-names:

Shouldn't this have minItems: 1 and maxItems: 2 as well?

> +    items:
> +      - const: irq
> +      - const: evident


> +
> +  isil,ev-evienb:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [ 0, 1 ]
> +    description: |
> +      Enable or disable internal pull on EVIN pin
> +      Default will leave the non-volatile configuration of the pullup
> +      as is.
> +        <0> : Enables internal pull-up on evin pin
> +        <1> : Disables internal pull-up on evin pin

It appears this was not clear at first.  The default is not to use the
reset value, which is 0, but to leave the existing value unchanged.
The RTC settings are battery-backed and the RTC is not reset on boot
by the kernel.  The value might have been set on a previous boot, or
might have already been configured by the bootloader or BIOS.  This
was a common design in Linux RTC drivers.  The bootloader would
configure the RTC and then Linux driver was only design to be able to
get/set the time and alarms.  Stuff like programming the interrupt
pull-ups or setting calibration registers wasn't done by the kernel.

> +    then:
> +      properties:
> +        interrupts:
> +          maxItems: 2
> +    else:
> +      properties:
> +        interrupts:
> +          maxItems: 1

Add interrupt-names here too.

> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        rtc_twi: rtc@6f {
> +            compatible = "isil,isl1208";
> +            reg = <0x6f>;
> +        };
> +    };

I agree with Geert's original comment about switching from the most
complex to the simplest example.  It's better to show as much as
possible.

If it's not possible to make a valid example that shows interrupts and
evdet pull enable, then doesn't that mean the bindings don't work?




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux