Re: [PATCH 4/4] gpio: ptxpmb-ext-cpld: Document bindings of PTXPMB extended CPLD
From: Pantelis Antoniou
Date: Mon Oct 17 2016 - 15:10:12 EST
Hi Rob,
> On Oct 10, 2016, at 23:19 , Rob Herring <robh@xxxxxxxxxx> wrote:
>
> On Fri, Oct 07, 2016 at 06:19:34PM +0300, Pantelis Antoniou wrote:
>> From: Georgi Vlaev <gvlaev@xxxxxxxxxxx>
>>
>> Add device tree bindings document for the GPIO driver of
>> Juniper's PTXPMB extended CPLD.
>>
>> Signed-off-by: Georgi Vlaev <gvlaev@xxxxxxxxxxx>
>> [Ported from Juniper kernel]
>> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@xxxxxxxxxxxx>
>> ---
>> .../bindings/gpio/jnx,gpio-ptxpmb-ext-cpld.txt | 36 ++++++++++++++++++++++
>> 1 file changed, 36 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/gpio/jnx,gpio-ptxpmb-ext-cpld.txt
>>
>> diff --git a/Documentation/devicetree/bindings/gpio/jnx,gpio-ptxpmb-ext-cpld.txt b/Documentation/devicetree/bindings/gpio/jnx,gpio-ptxpmb-ext-cpld.txt
>> new file mode 100644
>> index 0000000..87f01b9
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/gpio/jnx,gpio-ptxpmb-ext-cpld.txt
>> @@ -0,0 +1,36 @@
>> +Juniper PTXPMB extended CPLD GPIO block
>> +
>> +Required properties:
>> +
>> +- compatible:
>> + Must be "jnx,gpio-ptxpmb-ext-cpld"
>
> Generally, '-gpio' would be last.
>
OK.
>> +
>> +- #gpio-cells:
>> + Should be <2>. The first cell is the pin number (within the controller's
>> + pin space), and the second is used for the following flags:
>> + bit[0]: direction (0 = out, 1 = in)
>> + bit[1]: init high
>> + bit[2]: active low
>
> Same comment as all the other gpio bindings...
>
>> +
>> +- gpio-controller:
>> + Specifies that the node is a GPIO controller.
>> +
>> +- interrupt-controller:
>> + Specifies that the node is an interrupt controller.
>> +
>> +Optional properties:
>> +
>> +- reg:
>> + Address and length of the register set for the device. Usually supplied
>> + by the parent MFD device.
>
> Make it required.
>
Hmm, the current driver supplies that range via platform data (itâs an mfd driver).
Whatâs the take on mixing those?
>> +
>> +
>> +Example:
>> +
>> +gpio_ext_cpld: cpld-ext-gpio {
>> + compatible = "jnx,gpio-ptxpmb-ext-cpld";
>> + #gpio-cells = <2>;
>> + #interrupt-cells = <2>;
>> + gpio-controller;
>> + interrupt-controller;
>> +};
>> --
>> 1.9.1