Message ID | 1510068983-25769-3-git-send-email-chf.fritz@googlemail.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
On Tue, Nov 07, 2017 at 04:36:22PM +0100, Christoph Fritz wrote: > This patch adds documentation of device tree bindings for Intersil > isl76683 light sensor. > > Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> > --- > .../devicetree/bindings/iio/light/isl76683.txt | 26 ++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/light/isl76683.txt > > diff --git a/Documentation/devicetree/bindings/iio/light/isl76683.txt b/Documentation/devicetree/bindings/iio/light/isl76683.txt > new file mode 100644 > index 0000000..657f17d > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/light/isl76683.txt > @@ -0,0 +1,26 @@ > +* ISL76683 ambient light sensor > + > +http://www.intersil.com/content/dam/Intersil/documents/isl7/isl76683.pdf > + > +Required properties: > + > + - compatible: must be "isil,isl76683" > + - reg: the I2C address of the sensor > + - interrupt-parent: should be the phandle for the interrupt controller > + - interrupts: interrupt mapping for GPIO IRQ > + > +Optional properties: > + > + - isil,external-resistor: integer in kOhm of external resistor R_ext. > + Valid values are from 1 to 1000. > + If not supplied, 100 kOhm will be assumed. Add an unit suffix as defined in property-units.txt. > + > +Example: > + > +isl76683@44 { > + compatible = "isil,isl76683"; > + reg = <0x44>; > + interrupt-parent = <&gpio1>; > + interrupts = <20 IRQ_TYPE_LEVEL_LOW>; > + isil,external-resistor = <50>; > +}; > -- > 2.1.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Rob On Fri, 2017-11-10 at 15:26 -0600, Rob Herring wrote: > On Tue, Nov 07, 2017 at 04:36:22PM +0100, Christoph Fritz wrote: > > +Optional properties: > > + > > + - isil,external-resistor: integer in kOhm of external resistor R_ext. > > + Valid values are from 1 to 1000. > > + If not supplied, 100 kOhm will be assumed. > > Add an unit suffix as defined in property-units.txt. Thanks, I'll use "isil,external-resistor-ohms" as defined in property-units.txt. What bothers me a bit is that there is no "-kilo-ohms" suffix but a "-micro-ohms" which is pretty uncommon. Even the only use of suffix "-micro-ohms" could have been expressed easily as "-ohms" while being more readable: qcom,external-resistor-micro-ohms = <10000>; Due to stable dt-api I suppose this cannot be changed and/or extended with "-kilo-ohms", right? Thanks -- Christoph -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/Documentation/devicetree/bindings/iio/light/isl76683.txt b/Documentation/devicetree/bindings/iio/light/isl76683.txt new file mode 100644 index 0000000..657f17d --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/isl76683.txt @@ -0,0 +1,26 @@ +* ISL76683 ambient light sensor + +http://www.intersil.com/content/dam/Intersil/documents/isl7/isl76683.pdf + +Required properties: + + - compatible: must be "isil,isl76683" + - reg: the I2C address of the sensor + - interrupt-parent: should be the phandle for the interrupt controller + - interrupts: interrupt mapping for GPIO IRQ + +Optional properties: + + - isil,external-resistor: integer in kOhm of external resistor R_ext. + Valid values are from 1 to 1000. + If not supplied, 100 kOhm will be assumed. + +Example: + +isl76683@44 { + compatible = "isil,isl76683"; + reg = <0x44>; + interrupt-parent = <&gpio1>; + interrupts = <20 IRQ_TYPE_LEVEL_LOW>; + isil,external-resistor = <50>; +};
This patch adds documentation of device tree bindings for Intersil isl76683 light sensor. Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> --- .../devicetree/bindings/iio/light/isl76683.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/light/isl76683.txt