diff mbox series

[1/2] dt-bindings: iio: light: Add binding for ADUX1020

Message ID 20191007101027.8383-2-manivannan.sadhasivam@linaro.org (mailing list archive)
State New, archived
Headers show
Series Add support for ADUX1020 sensor | expand

Commit Message

Manivannan Sadhasivam Oct. 7, 2019, 10:10 a.m. UTC
Add devicetree binding for Analog Devices ADUX1020 Photometric
sensor.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 .../bindings/iio/light/adux1020.txt           | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/light/adux1020.txt

Comments

Alexandru Ardelean Oct. 7, 2019, 10:21 a.m. UTC | #1
On Mon, 2019-10-07 at 15:40 +0530, Manivannan Sadhasivam wrote:
> [External]
> 
> Add devicetree binding for Analog Devices ADUX1020 Photometric
> sensor.
> 

Hey,

Thanks for the patches.

This dt-binding docs is in text format.
dt-binding docs now need to be in YAML format.

Also, patches for dt-bindings docs usually come after the driver is added.
So, this patch should be the second in the series, not the first.

Alex

> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
>  .../bindings/iio/light/adux1020.txt           | 22 +++++++++++++++++++
>  1 file changed, 22 insertions(+)
>  create mode 100644
> Documentation/devicetree/bindings/iio/light/adux1020.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/light/adux1020.txt
> b/Documentation/devicetree/bindings/iio/light/adux1020.txt
> new file mode 100644
> index 000000000000..e896dda30e36
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/light/adux1020.txt
> @@ -0,0 +1,22 @@
> +Analog Devices ADUX1020 Photometric sensor
> +
> +Link to datasheet: 
> https://www.analog.com/media/en/technical-documentation/data-sheets/ADUX1020.pdf
> +
> +Required properties:
> +
> + - compatible: should be "adi,adux1020"
> + - reg: the I2C address of the sensor
> +
> +Optional properties:
> +
> + - interrupts: interrupt mapping for IRQ as documented in
> +   Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
> +
> +Example:
> +
> +adux1020@64 {
> +	compatible = "adi,adux1020";
> +	reg = <0x64>;
> +	interrupt-parent = <&msmgpio>;
> +	interrupts = <24 IRQ_TYPE_LEVEL_HIGH>;
> +};
Manivannan Sadhasivam Oct. 7, 2019, 12:40 p.m. UTC | #2
Hi Ardelean, 

On 7 October 2019 3:51:16 PM IST, "Ardelean, Alexandru" <alexandru.Ardelean@analog.com> wrote:
>On Mon, 2019-10-07 at 15:40 +0530, Manivannan Sadhasivam wrote:
>> [External]
>> 
>> Add devicetree binding for Analog Devices ADUX1020 Photometric
>> sensor.
>> 
>
>Hey,
>
>Thanks for the patches.
>
>This dt-binding docs is in text format.
>dt-binding docs now need to be in YAML format.
>

Sure. I can convert to YAML binding. 

>Also, patches for dt-bindings docs usually come after the driver is
>added.
>So, this patch should be the second in the series, not the first.
>

I don't think so. The convention is to put dt-bindings patch upfront for all subsystems. Not sure if IIO differs here. 

Thanks, 
Mani
>Alex
>
>> Signed-off-by: Manivannan Sadhasivam
><manivannan.sadhasivam@linaro.org>
>> ---
>>  .../bindings/iio/light/adux1020.txt           | 22
>+++++++++++++++++++
>>  1 file changed, 22 insertions(+)
>>  create mode 100644
>> Documentation/devicetree/bindings/iio/light/adux1020.txt
>> 
>> diff --git a/Documentation/devicetree/bindings/iio/light/adux1020.txt
>> b/Documentation/devicetree/bindings/iio/light/adux1020.txt
>> new file mode 100644
>> index 000000000000..e896dda30e36
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/iio/light/adux1020.txt
>> @@ -0,0 +1,22 @@
>> +Analog Devices ADUX1020 Photometric sensor
>> +
>> +Link to datasheet: 
>>
>https://www.analog.com/media/en/technical-documentation/data-sheets/ADUX1020.pdf
>> +
>> +Required properties:
>> +
>> + - compatible: should be "adi,adux1020"
>> + - reg: the I2C address of the sensor
>> +
>> +Optional properties:
>> +
>> + - interrupts: interrupt mapping for IRQ as documented in
>> +  
>Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
>> +
>> +Example:
>> +
>> +adux1020@64 {
>> +	compatible = "adi,adux1020";
>> +	reg = <0x64>;
>> +	interrupt-parent = <&msmgpio>;
>> +	interrupts = <24 IRQ_TYPE_LEVEL_HIGH>;
>> +};
Alexandru Ardelean Oct. 7, 2019, 1:21 p.m. UTC | #3
On Mon, 2019-10-07 at 18:10 +0530, Manivannan Sadhasivam wrote:
> [External]
> 
> Hi Ardelean, 
> 
> On 7 October 2019 3:51:16 PM IST, "Ardelean, Alexandru" <
> alexandru.Ardelean@analog.com> wrote:
> > On Mon, 2019-10-07 at 15:40 +0530, Manivannan Sadhasivam wrote:
> > > [External]
> > > 
> > > Add devicetree binding for Analog Devices ADUX1020 Photometric
> > > sensor.
> > > 
> > 
> > Hey,
> > 
> > Thanks for the patches.
> > 
> > This dt-binding docs is in text format.
> > dt-binding docs now need to be in YAML format.
> > 
> 
> Sure. I can convert to YAML binding. 
> 
> > Also, patches for dt-bindings docs usually come after the driver is
> > added.
> > So, this patch should be the second in the series, not the first.
> > 
> 
> I don't think so. The convention is to put dt-bindings patch upfront for
> all subsystems. Not sure if IIO differs here. 

Now that you mention, I'm not sure either.
We typically sent the dt-bindings one last, so I assumed it was the
default.

> 
> Thanks, 
> Mani
> > Alex
> > 
> > > Signed-off-by: Manivannan Sadhasivam
> > <manivannan.sadhasivam@linaro.org>
> > > ---
> > >  .../bindings/iio/light/adux1020.txt           | 22
> > +++++++++++++++++++
> > >  1 file changed, 22 insertions(+)
> > >  create mode 100644
> > > Documentation/devicetree/bindings/iio/light/adux1020.txt
> > > 
> > > diff --git a/Documentation/devicetree/bindings/iio/light/adux1020.txt
> > > b/Documentation/devicetree/bindings/iio/light/adux1020.txt
> > > new file mode 100644
> > > index 000000000000..e896dda30e36
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/iio/light/adux1020.txt
> > > @@ -0,0 +1,22 @@
> > > +Analog Devices ADUX1020 Photometric sensor
> > > +
> > > +Link to datasheet: 
> > > 
> > https://www.analog.com/media/en/technical-documentation/data-sheets/ADUX1020.pdf
> > > +
> > > +Required properties:
> > > +
> > > + - compatible: should be "adi,adux1020"
> > > + - reg: the I2C address of the sensor
> > > +
> > > +Optional properties:
> > > +
> > > + - interrupts: interrupt mapping for IRQ as documented in
> > > +  
> > Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
> > > +
> > > +Example:
> > > +
> > > +adux1020@64 {
> > > +	compatible = "adi,adux1020";
> > > +	reg = <0x64>;
> > > +	interrupt-parent = <&msmgpio>;
> > > +	interrupts = <24 IRQ_TYPE_LEVEL_HIGH>;
> > > +};
Jonathan Cameron Oct. 8, 2019, 12:29 p.m. UTC | #4
On Mon, 7 Oct 2019 13:21:50 +0000
"Ardelean, Alexandru" <alexandru.Ardelean@analog.com> wrote:

> On Mon, 2019-10-07 at 18:10 +0530, Manivannan Sadhasivam wrote:
> > [External]
> > 
> > Hi Ardelean, 
> > 
> > On 7 October 2019 3:51:16 PM IST, "Ardelean, Alexandru" <  
> > alexandru.Ardelean@analog.com> wrote:
> > > On Mon, 2019-10-07 at 15:40 +0530, Manivannan Sadhasivam wrote:  
> > > > [External]
> > > > 
> > > > Add devicetree binding for Analog Devices ADUX1020 Photometric
> > > > sensor.
> > > >   
> > > 
> > > Hey,
> > > 
> > > Thanks for the patches.
> > > 
> > > This dt-binding docs is in text format.
> > > dt-binding docs now need to be in YAML format.
> > >   
> > 
> > Sure. I can convert to YAML binding. 
> >   
> > > Also, patches for dt-bindings docs usually come after the driver is
> > > added.
> > > So, this patch should be the second in the series, not the first.
> > >   
> > 
> > I don't think so. The convention is to put dt-bindings patch upfront for
> > all subsystems. Not sure if IIO differs here.   
> 
> Now that you mention, I'm not sure either.
> We typically sent the dt-bindings one last, so I assumed it was the
> default.

I don't care either way so never comment on it :)

Jonathan

> 
> > 
> > Thanks, 
> > Mani  
> > > Alex
> > >   
> > > > Signed-off-by: Manivannan Sadhasivam  
> > > <manivannan.sadhasivam@linaro.org>  
> > > > ---
> > > >  .../bindings/iio/light/adux1020.txt           | 22  
> > > +++++++++++++++++++  
> > > >  1 file changed, 22 insertions(+)
> > > >  create mode 100644
> > > > Documentation/devicetree/bindings/iio/light/adux1020.txt
> > > > 
> > > > diff --git a/Documentation/devicetree/bindings/iio/light/adux1020.txt
> > > > b/Documentation/devicetree/bindings/iio/light/adux1020.txt
> > > > new file mode 100644
> > > > index 000000000000..e896dda30e36
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/iio/light/adux1020.txt
> > > > @@ -0,0 +1,22 @@
> > > > +Analog Devices ADUX1020 Photometric sensor
> > > > +
> > > > +Link to datasheet: 
> > > >   
> > > https://www.analog.com/media/en/technical-documentation/data-sheets/ADUX1020.pdf  
> > > > +
> > > > +Required properties:
> > > > +
> > > > + - compatible: should be "adi,adux1020"
> > > > + - reg: the I2C address of the sensor
> > > > +
> > > > +Optional properties:
> > > > +
> > > > + - interrupts: interrupt mapping for IRQ as documented in
> > > > +    
> > > Documentation/devicetree/bindings/interrupt-controller/interrupts.txt  
> > > > +
> > > > +Example:
> > > > +
> > > > +adux1020@64 {
> > > > +	compatible = "adi,adux1020";
> > > > +	reg = <0x64>;
> > > > +	interrupt-parent = <&msmgpio>;
> > > > +	interrupts = <24 IRQ_TYPE_LEVEL_HIGH>;
> > > > +};
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/light/adux1020.txt b/Documentation/devicetree/bindings/iio/light/adux1020.txt
new file mode 100644
index 000000000000..e896dda30e36
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/adux1020.txt
@@ -0,0 +1,22 @@ 
+Analog Devices ADUX1020 Photometric sensor
+
+Link to datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ADUX1020.pdf
+
+Required properties:
+
+ - compatible: should be "adi,adux1020"
+ - reg: the I2C address of the sensor
+
+Optional properties:
+
+ - interrupts: interrupt mapping for IRQ as documented in
+   Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
+
+Example:
+
+adux1020@64 {
+	compatible = "adi,adux1020";
+	reg = <0x64>;
+	interrupt-parent = <&msmgpio>;
+	interrupts = <24 IRQ_TYPE_LEVEL_HIGH>;
+};