RE: [PATCH RFC 3/6] dt-bindings: rtc: isl1208: Convert to json-schema

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

 



Hi Krzysztof Kozlowski,

> Subject: Re: [PATCH RFC 3/6] dt-bindings: rtc: isl1208: Convert to json-
> schema
> 
> On 04/05/2023 18:22, Biju Das wrote:
> > Hi Krzysztof Kozlowski and  Rob,
> >
> >>>> <fabrizio.castro.jz@xxxxxxxxxxx>; linux-renesas-soc@xxxxxxxxxxxxxxx
> >>>> Subject: [PATCH RFC 3/6] dt-bindings: rtc: isl1208: Convert to
> >>>> json-schema
> >>>>
> >>>> Convert the isl1208 RTC device tree binding documentation to json-
> >> schema.
> >>>>
> >>>> Update the example to match reality.
> >>>>
> >>>> Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> >>>> ---
> >>>>  .../devicetree/bindings/rtc/isil,isl1208.txt  | 38 ----------
> >>>> .../devicetree/bindings/rtc/isil,isl1208.yaml | 74
> >>>> +++++++++++++++++++
> >>>>  2 files changed, 74 insertions(+), 38 deletions(-)  delete mode
> >>>> 100644 Documentation/devicetree/bindings/rtc/isil,isl1208.txt
> >>>>  create mode 100644
> >>>> Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
> >>>>
> >>>> diff --git a/Documentation/devicetree/bindings/rtc/isil,isl1208.txt
> >>>> b/Documentation/devicetree/bindings/rtc/isil,isl1208.txt
> >>>> deleted file mode 100644
> >>>> index 51f003006f04..000000000000
> >>>> --- a/Documentation/devicetree/bindings/rtc/isil,isl1208.txt
> >>>> +++ /dev/null
> >>>> @@ -1,38 +0,0 @@
> >>>> -Intersil ISL1209/19 I2C RTC/Alarm chip with event in
> >>>> -
> >>>> -ISL12X9 have additional pins EVIN and #EVDET for tamper detection,
> >>>> while the
> >>>> -ISL1208 and ISL1218 do not.  They are all use the same driver with
> >>>> the bindings -described here, with chip specific properties as noted.
> >>>> -
> >>>> -Required properties supported by the device:
> >>>> - - "compatible": Should be one of the following:
> >>>> -		- "isil,isl1208"
> >>>> -		- "isil,isl1209"
> >>>> -		- "isil,isl1218"
> >>>> -		- "isil,isl1219"
> >>>> - - "reg": I2C bus address of the device
> >>>> -
> >>>> -Optional properties:
> >>>> - - "interrupt-names": list which may contains "irq" and "evdet"
> >>>> -	evdet applies to isl1209 and isl1219 only
> >>>> - - "interrupts": list of interrupts for "irq" and "evdet"
> >>>> -	evdet applies to isl1209 and isl1219 only
> >>>> - - "isil,ev-evienb": Enable or disable internal pull on EVIN pin
> >>>> -	Applies to isl1209 and isl1219 only
> >>>> -	Possible values are 0 and 1
> >>>> -	Value 0 enables internal pull-up on evin pin, 1 disables it.
> >>>> -	Default will leave the non-volatile configuration of the pullup
> >>>> -	as is.
> >>>> -
> >>>> -Example isl1219 node with #IRQ pin connected to SoC gpio1 pin12
> >>>> and #EVDET pin -connected to SoC gpio2 pin 24 and internal pull-up
> >>>> enabled in
> >>> EVIN pin.
> >>>> -
> >>>> -	isl1219: rtc@68 {
> >>>> -		compatible = "isil,isl1219";
> >>>> -		reg = <0x68>;
> >>>> -		interrupt-names = "irq", "evdet";
> >>>> -		interrupts-extended = <&gpio1 12 IRQ_TYPE_EDGE_FALLING>,
> >>>> -			<&gpio2 24 IRQ_TYPE_EDGE_FALLING>;
> >>>> -		isil,ev-evienb = <1>;
> >>>> -	};
> >>>> -
> >>>> diff --git
> >>>> a/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
> >>>> b/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
> >>>> new file mode 100644
> >>>> index 000000000000..04d51887855f
> >>>> --- /dev/null
> >>>> +++ b/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
> >>>> @@ -0,0 +1,74 @@
> >>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML
> >>>> +1.2
> >>>> +---
> >>>> +$id:
> >>>> +
> >>>> +title: Intersil ISL12{08,09,18,19} I2C RTC/Alarm chip
> >>>> +
> >>>> +maintainers:
> >>>> +  - Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> >>>> +  - Trent Piepho <tpiepho@xxxxxxxxxx>
> >>>> +
> >>>> +properties:
> >>>> +  compatible:
> >>>> +    oneOf:
> >>>> +      - enum:
> >>>> +          - isil,isl1208
> >>>> +          - isil,isl1209
> >>>> +          - isil,isl1218
> >>>> +          - isil,isl1219
> >>>> +
> >>>> +  reg:
> >>>> +    maxItems: 1
> >>>> +
> >>>> +  interrupts:
> >>>> +    minItems: 1
> >>>> +    maxItems: 2
> >>>> +
> >>>> +  interrupt-names:
> >>>> +    items:
> >>>> +      - const: irq
> >>>> +      - const: evdet
> >>>> +
> >>>> +  isil,ev-evienb:
> >>>> +    $ref: /schemas/types.yaml#/definitions/uint32
> >>>> +    enum: [ 0, 1 ]
> >>>> +    default: 0
> >
> >
> > What is your thoughts on this? we should keep default or we should remove?
> >
> > As per HW data sheet[1], the reset value is 0, [1]
> > https://www.renesas.com/us/en/document/dst/isl1219-datasheet
> >
> > But as per text version of bindings [2], Looks like default is not needed.
> 
> Missing value has different meaning in original binding, so default is wrong
> here and you should explain that meaning in description.

OK, I will remove default and use the same description from the original bindings
and send it as separate patch.

Cheers,
Biju




[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