lmp92001: mfd: doc: Add support LMP92001
Subsystems (3)
PATCH 5/5 lmp92001: mfd: doc: Add support LMP92001
From: Abhisit Sangjan <[email protected]>
TI LMP92001 Analog System Monitor and Controller
8-bit GPIOs.
12 DACs with 12-bit resolution.
The GPIOs and DACs are shared port function with Cy function pin to take control the pin suddenly from external hardware. DAC's referance voltage selectable for Internal/External.
16 + 1 ADCs with 12-bit resolution.
Built-in internal Temperature Sensor on channel 17.
Window Comparator Function is supported on channel 1-3 and 9-11 for monitoring with interrupt signal (pending to implement for interrupt). ADC's referance voltage selectable for Internal/External.
--- Documentation/ABI/testing/sysfs-bus-iio-lmp920001 | 65 ++++++++++++++++++++++ .../devicetree/bindings/gpio/gpio-lmp92001.txt | 22 ++++++++ .../bindings/iio/adc/ti-lmp92001-adc.txt | 20 +++++++ .../bindings/iio/dac/ti-lmp92001-dac.txt | 35 ++++++++++++ 4 files changed, 142 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-lmp920001 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt create mode 100644 Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt
Documentation/ABI/testing/sysfs-bus-iio-lmp920001 new file +65 -0
@@ -0,0 +1,65 @@ +What: /sys/bus/iio/devices/iio:deviceX/gang +Date: August 2016 +KernelVersion: 4.12 +Contact: Abhisit Sangjan <[email protected]> +Description: + Controls the association of analog output channels OUTx with + asynchronous control inputs Cy for DAC. + Can be either: + - "0" + - "1" + + Cy to OUTx Assignment + ---------------------------------- + | Cy | CDAC:GANG=0 | CDAC:GANG=1 | + ---------------------------------- + | C1 | OUT[1:4] | OUT[1:3] | + ---------------------------------- + | C2 | OUT[5:6] | OUT[4:6] | + ---------------------------------- + | C3 | OUT[7:8] | OUT[7:9] | + ---------------------------------- + | C4 | OUT[9:12] | OUT[10:12] | + ---------------------------------- + +What: /sys/bus/iio/devices/iio:deviceX/outx +Date: August 2016 +KernelVersion: 4.12 +Contact: Abhisit Sangjan <[email protected]> +Description: + The pin output mode for DAC. + Can be either: + - "hiz" = High impedance state. + - "dac" = DAC output. + - "0" = Drive it to low. + - "1" = Drive it to high. + +What: /sys/bus/iio/devices/iio:deviceX/vref +Date: August 2016 +KernelVersion: 4.12 +Contact: Abhisit Sangjan <[email protected]> +Description: + This is voltage reference source for DACs. + Can be either: + - "external" + - "internal" + +What: /sys/devices/.../iio:deviceX/en +Date: August 2016 +KernelVersion: 4.12 +Contact: Abhisit Sangjan <[email protected]> +Description: + This is ADC Conversion Enable for each channel. + Can be either: + - "enable" + - "disable" + +What: /sys/devices/.../iio:deviceX/vref +Date: August 2016 +KernelVersion: 4.12 +Contact: Abhisit Sangjan <[email protected]> +Description: + This is voltage reference source for ADCs. + Can be either: + - "external" + - "internal"
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt new file +22 -0
@@ -0,0 +1,22 @@ +* Texas Instruments' LMP92001 GPIOs + +Required properties: + - compatible: Must be set to "ti,lmp92001-gpio". + - reg: i2c chip address for the device. + - gpio-controller: Marks the device node as a gpio controller. + - #gpio-cells : Should be two. The first cell is the pin number and the + second cell is used to specify the gpio polarity: + 0 = Active high + 1 = Active low + +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + gpio-controller { + compatible = "ti,lmp92001-gpio"; + gpio-controller; + #gpio-cells = <2>; + }; +};
Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt new file +20 -0
@@ -0,0 +1,20 @@ +* Texas Instruments' LMP92001 ADCs + +Required properties: + - compatible: Must be set to "ti,lmp92001-adc". + - reg: i2c chip address for the device. + - ti,lmp92001-adc-mask: bit mask for which channel is enable. + 0 = Off + 1 = On + +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + lmp92001-adc { + compatible = "ti,lmp92001-adc"; + ti,lmp92001-adc-mode = "continuous"; + ti,lmp92001-adc-mask = <0x00000079>; + }; +};
Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt new file +35 -0
@@ -0,0 +1,35 @@ +* Texas Instruments' LMP92001 DACs + +Required properties: + - compatible: Must be set to "ti,lmp92001-dac". + - reg: i2c chip address for the device. + - ti,lmp92001-dac-hiz: hi-impedance control, + 1 = Forces all OUT[1:12] outputs to hi-z, 0 = normal + - ti,lmp92001-dac-outx: + Cy = 0, 1 = will force associated OUTx outputs to VDD + Cy = 0, 0 = will force associated OUTx outputs to GND + - ti,lmp92001-dac-gang: What group of Cy is governed to. + ----------------------------------------- + | Cy | CDAC:GANG = 0 | CDAC:GANG = 1 | + ----------------------------------------- + | C1 | OUT[1:4] | OUT[1:3] | + ----------------------------------------- + | C2 | OUT[5:6] | OUT[4:6] | + ----------------------------------------- + | C3 | OUT[7:8] | OUT[7:9] | + ----------------------------------------- + | C4 | OUT[9:12] | OUT[10:12] | + ----------------------------------------- + +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + lmp92001-dac { + compatible = "ti,lmp92001-dac"; + ti,lmp92001-dac-hiz = /bits/ 8 <0>; + ti,lmp92001-dac-outx = /bits/ 8 <0>; + ti,lmp92001-dac-gang = /bits/ 8 <0>; + }; +};
Signature · 1 line
2.13.0
PATCH 5/5 lmp92001: mfd: doc: Add support LMP92001
Send all parts to all cc'd people to save your time tracking down all patches of this.
---------- Forwarded message ----------
From: <[email protected]>
Date: Thu, Aug 31, 2017 at 1:25 AM
Subject: [PATCH 5/5] lmp92001: mfd: doc: Add support LMP92001
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], Abhisit Sangjan <[email protected]>
From: Abhisit Sangjan <[email protected]>
TI LMP92001 Analog System Monitor and Controller
8-bit GPIOs.
12 DACs with 12-bit resolution.
The GPIOs and DACs are shared port function with Cy function pin to take control the pin suddenly from external hardware. DAC's referance voltage selectable for Internal/External.
16 + 1 ADCs with 12-bit resolution.
Built-in internal Temperature Sensor on channel 17.
Window Comparator Function is supported on channel 1-3 and 9-11 for monitoring with interrupt signal (pending to implement for interrupt). ADC's referance voltage selectable for Internal/External.
--- Documentation/ABI/testing/sysfs-bus-iio-lmp920001 | 65 ++++++++++++++++++++++ .../devicetree/bindings/gpio/gpio-lmp92001.txt | 22 ++++++++ .../bindings/iio/adc/ti-lmp92001-adc.txt | 20 +++++++ .../bindings/iio/dac/ti-lmp92001-dac.txt | 35 ++++++++++++ 4 files changed, 142 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-lmp920001 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-lmp92001- adc.txt create mode 100644 Documentation/devicetree/bindings/iio/dac/ti-lmp92001-
dac.txt
(quoted diff) +0 -0
b/Documentation/ABI/testing/sysfs-bus-iio-lmp920001 new file mode 100644
index 000000000000..f0965e7d823f
Documentation/ABI/testing/sysfs-bus-iio-lmp920001 new file +6 -0
@@ -0,0 +1,65 @@ +What: /sys/bus/iio/devices/iio:deviceX/gang +Date: August 2016 +KernelVersion: 4.12 +Contact: Abhisit Sangjan <[email protected]> +Description: + Controls the association of analog output channels OUTx
with
+ asynchronous control inputs Cy for DAC. + Can be either: + - "0" + - "1" + + Cy to OUTx Assignment + ---------------------------------- + | Cy | CDAC:GANG=0 | CDAC:GANG=1 | + ---------------------------------- + | C1 | OUT[1:4] | OUT[1:3] | + ---------------------------------- + | C2 | OUT[5:6] | OUT[4:6] | + ---------------------------------- + | C3 | OUT[7:8] | OUT[7:9] | + ---------------------------------- + | C4 | OUT[9:12] | OUT[10:12] | + ---------------------------------- + +What: /sys/bus/iio/devices/iio:deviceX/outx +Date: August 2016 +KernelVersion: 4.12 +Contact: Abhisit Sangjan <[email protected]> +Description: + The pin output mode for DAC. + Can be either: + - "hiz" = High impedance state. + - "dac" = DAC output. + - "0" = Drive it to low. + - "1" = Drive it to high. + +What: /sys/bus/iio/devices/iio:deviceX/vref +Date: August 2016 +KernelVersion: 4.12 +Contact: Abhisit Sangjan <[email protected]> +Description: + This is voltage reference source for DACs. + Can be either: + - "external" + - "internal" + +What: /sys/devices/.../iio:deviceX/en +Date: August 2016 +KernelVersion: 4.12 +Contact: Abhisit Sangjan <[email protected]> +Description: + This is ADC Conversion Enable for each channel. + Can be either: + - "enable" + - "disable" + +What: /sys/devices/.../iio:deviceX/vref +Date: August 2016 +KernelVersion: 4.12 +Contact: Abhisit Sangjan <[email protected]> +Description: + This is voltage reference source for ADCs. + Can be either: + - "external" + - "internal"
(quoted diff) +0 -0
b/Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt new file mode 100644
index 000000000000..f9a18c492145
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt new file +22 -0
@@ -0,0 +1,22 @@ +* Texas Instruments' LMP92001 GPIOs + +Required properties: + - compatible: Must be set to "ti,lmp92001-gpio". + - reg: i2c chip address for the device. + - gpio-controller: Marks the device node as a gpio controller. + - #gpio-cells : Should be two. The first cell is the pin number and the + second cell is used to specify the gpio polarity: + 0 = Active high + 1 = Active low + +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + gpio-controller { + compatible = "ti,lmp92001-gpio"; + gpio-controller; + #gpio-cells = <2>; + }; +};
(quoted diff) +0 -0
b/Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt new file mode 100644
index 000000000000..4565961bf511
Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt new file +20 -0
@@ -0,0 +1,20 @@ +* Texas Instruments' LMP92001 ADCs + +Required properties: + - compatible: Must be set to "ti,lmp92001-adc". + - reg: i2c chip address for the device. + - ti,lmp92001-adc-mask: bit mask for which channel is enable. + 0 = Off + 1 = On + +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + lmp92001-adc { + compatible = "ti,lmp92001-adc"; + ti,lmp92001-adc-mode = "continuous"; + ti,lmp92001-adc-mask = <0x00000079>; + }; +};
(quoted diff) +0 -0
b/Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt new file mode 100644
index 000000000000..882db9ca92f5
Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt new file +35 -0
@@ -0,0 +1,35 @@ +* Texas Instruments' LMP92001 DACs + +Required properties: + - compatible: Must be set to "ti,lmp92001-dac". + - reg: i2c chip address for the device. + - ti,lmp92001-dac-hiz: hi-impedance control, + 1 = Forces all OUT[1:12] outputs to hi-z, 0 = normal + - ti,lmp92001-dac-outx: + Cy = 0, 1 = will force associated OUTx outputs to VDD + Cy = 0, 0 = will force associated OUTx outputs to GND + - ti,lmp92001-dac-gang: What group of Cy is governed to. + ----------------------------------------- + | Cy | CDAC:GANG = 0 | CDAC:GANG = 1 | + ----------------------------------------- + | C1 | OUT[1:4] | OUT[1:3] | + ----------------------------------------- + | C2 | OUT[5:6] | OUT[4:6] | + ----------------------------------------- + | C3 | OUT[7:8] | OUT[7:9] | + ----------------------------------------- + | C4 | OUT[9:12] | OUT[10:12] | + ----------------------------------------- + +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + lmp92001-dac { + compatible = "ti,lmp92001-dac"; + ti,lmp92001-dac-hiz = /bits/ 8 <0>; + ti,lmp92001-dac-outx = /bits/ 8 <0>; + ti,lmp92001-dac-gang = /bits/ 8 <0>; + }; +};
--
2.13.0
Quoted 11 lines · On Thu, 31 Aug 2017 01:25:28 +0700 [email protected] wrote:
From: Abhisit Sangjan <[email protected]>
TI LMP92001 Analog System Monitor and Controller
8-bit GPIOs.
12 DACs with 12-bit resolution.The GPIOs and DACs are shared port function with Cy function pin to take control the pin suddenly from external hardware. DAC's referance voltage selectable for Internal/External.
Quoted 7 lines
16 + 1 ADCs with 12-bit resolution.
Built-in internal Temperature Sensor on channel 17.
Window Comparator Function is supported on channel 1-3 and 9-11 for monitoring with interrupt signal (pending to implement for interrupt). ADC's referance voltage selectable for Internal/External.
I would break this patch up somewhat. Have a set of DT patches separate from any sysfs attribute documentation.
Quoted 43 lines
Signed-off-by Abhisit Sangjan <[email protected]>--- Documentation/ABI/testing/sysfs-bus-iio-lmp920001 | 65 ++++++++++++++++++++++ .../devicetree/bindings/gpio/gpio-lmp92001.txt | 22 ++++++++ .../bindings/iio/adc/ti-lmp92001-adc.txt | 20 +++++++ .../bindings/iio/dac/ti-lmp92001-dac.txt | 35 ++++++++++++ 4 files changed, 142 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-lmp920001 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt create mode 100644 Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txtDocumentation/ABI/testing/sysfs-bus-iio-lmp920001 new file +25
-0@@ -0,0 +1,65 @@ +What: /sys/bus/iio/devices/iio:deviceX/gang +Date: August 2016 +KernelVersion: 4.12 +Contact: Abhisit Sangjan <[email protected]> +Description: + Controls the association of analog output channels OUTx with + asynchronous control inputs Cy for DAC. + Can be either: + - "0" + - "1" + + Cy to OUTx Assignment + ---------------------------------- + | Cy | CDAC:GANG=0 | CDAC:GANG=1 | + ---------------------------------- + | C1 | OUT[1:4] | OUT[1:3] | + ---------------------------------- + | C2 | OUT[5:6] | OUT[4:6] | + ---------------------------------- + | C3 | OUT[7:8] | OUT[7:9] | + ---------------------------------- + | C4 | OUT[9:12] | OUT[10:12] | + ---------------------------------- + +What: /sys/bus/iio/devices/iio:deviceX/outx
Documentation/ABI/testing/sysfs-bus-iio-lmp920001 line 35
Quoted 10 lines
Documentation/ABI/testing/sysfs-bus-iio-lmp920001 new file +10
-0+Date: August 2016 +KernelVersion: 4.12 +Contact: Abhisit Sangjan <[email protected]> +Description: + The pin output mode for DAC. + Can be either: + - "hiz" = High impedance state. + - "dac" = DAC output. + - "0" = Drive it to low. + - "1" = Drive it to high.
Two options here - consider the hiz 0 and 1 to be powerdown modes in which case use the standard interfaces for them, or take the view the 0 1 choice is to allow this device to act as a gpio chip and support that explicitly.
Documentation/ABI/testing/sysfs-bus-iio-lmp920001 line 45
Quoted 10 lines
Documentation/ABI/testing/sysfs-bus-iio-lmp920001 new file +10
-0+ +What: /sys/bus/iio/devices/iio:deviceX/vref +Date: August 2016 +KernelVersion: 4.12 +Contact: Abhisit Sangjan <[email protected]> +Description: + This is voltage reference source for DACs. + Can be either: + - "external" + - "internal"
It is rare for userspace control of this to make sense. Tends to be the case that there is only one right answer for a given piece of hardware.
Documentation/ABI/testing/sysfs-bus-iio-lmp920001 line 55
Quoted 10 lines
Documentation/ABI/testing/sysfs-bus-iio-lmp920001 new file +10
-0+ +What: /sys/devices/.../iio:deviceX/en +Date: August 2016 +KernelVersion: 4.12 +Contact: Abhisit Sangjan <[email protected]> +Description: + This is ADC Conversion Enable for each channel. + Can be either: + - "enable" + - "disable"
If you want this fine control use the buffered interfaces rather than sysfs. I don't want to add this complexity to the sysfs interface. For sysfs if nothing outside sysfs is going on (e.g. no buffered capture) it should be read an attribute get the answer without having to configure other elements manually.
Also as currently documented, you only have one such file per iio:device which seems unlikely to be what you were aiming for.
Documentation/ABI/testing/sysfs-bus-iio-lmp920001 line 57
Quoted 2 lines
Documentation/ABI/testing/sysfs-bus-iio-lmp920001 new file +2
-0+ +What: /sys/devices/.../iio:deviceX/vref
Here twice...
Quoted 68 lines
Documentation/ABI/testing/sysfs-bus-iio-lmp920001 new file +8
-0+Date: August 2016 +KernelVersion: 4.12 +Contact: Abhisit Sangjan <[email protected]> +Description: + This is voltage reference source for ADCs. + Can be either: + - "external" + - "internal"Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt new file +22
-0@@ -0,0 +1,22 @@ +* Texas Instruments' LMP92001 GPIOs + +Required properties: + - compatible: Must be set to "ti,lmp92001-gpio". + - reg: i2c chip address for the device. + - gpio-controller: Marks the device node as a gpio controller. + - #gpio-cells : Should be two. The first cell is the pin number and the + second cell is used to specify the gpio polarity: + 0 = Active high + 1 = Active low + +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + gpio-controller { + compatible = "ti,lmp92001-gpio"; + gpio-controller; + #gpio-cells = <2>; + }; +};Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt new file +20
-0@@ -0,0 +1,20 @@ +* Texas Instruments' LMP92001 ADCs + +Required properties: + - compatible: Must be set to "ti,lmp92001-adc". + - reg: i2c chip address for the device. + - ti,lmp92001-adc-mask: bit mask for which channel is enable. + 0 = Off + 1 = On + +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + lmp92001-adc { + compatible = "ti,lmp92001-adc"; + ti,lmp92001-adc-mode = "continuous"; + ti,lmp92001-adc-mask = <0x00000079>; + }; +};Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt new file +0
-0
Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt line 7
Quoted 7 lines
Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt new file +7
-0@@ -0,0 +1,35 @@ +* Texas Instruments' LMP92001 DACs + +Required properties: + - compatible: Must be set to "ti,lmp92001-dac". + - reg: i2c chip address for the device. + - ti,lmp92001-dac-hiz: hi-impedance control, + 1 = Forces all OUT[1:12] outputs to hi-z, 0 = normal
Why?
Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt line 10
Quoted 3 lines
Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt new file +3
-0+ - ti,lmp92001-dac-outx: + Cy = 0, 1 = will force associated OUTx outputs to VDD + Cy = 0, 0 = will force associated OUTx outputs to GND
Clashes with the above? I'm not sure why you would want these to be device tree bindings at all.
Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt line 22
Quoted 12 lines
Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt new file +12
-0+ - ti,lmp92001-dac-gang: What group of Cy is governed to. + ----------------------------------------- + | Cy | CDAC:GANG = 0 | CDAC:GANG = 1 | + ----------------------------------------- + | C1 | OUT[1:4] | OUT[1:3] | + ----------------------------------------- + | C2 | OUT[5:6] | OUT[4:6] | + ----------------------------------------- + | C3 | OUT[7:8] | OUT[7:9] | + ----------------------------------------- + | C4 | OUT[9:12] | OUT[10:12] | + -----------------------------------------
This last one is an ugly bit of hardware, so probably fine to have in DT.
Quoted 13 lines
Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt new file +13
-0+ +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + lmp92001-dac { + compatible = "ti,lmp92001-dac"; + ti,lmp92001-dac-hiz = /bits/ 8 <0>; + ti,lmp92001-dac-outx = /bits/ 8 <0>; + ti,lmp92001-dac-gang = /bits/ 8 <0>; + }; +};
Rob Herring
maintainerQuoted 18 lines · On Thu, Aug 31, 2017 at 01:25:28AM +0700…
From: Abhisit Sangjan <[email protected]>
TI LMP92001 Analog System Monitor and Controller
8-bit GPIOs.
12 DACs with 12-bit resolution.The GPIOs and DACs are shared port function with Cy function pin to take control the pin suddenly from external hardware. DAC's referance voltage selectable for Internal/External.
16 + 1 ADCs with 12-bit resolution.
Built-in internal Temperature Sensor on channel 17.
Window Comparator Function is supported on channel 1-3 and 9-11 for monitoring with interrupt signal (pending to implement for interrupt). ADC's referance voltage selectable for Internal/External.
Quoted 4 lines
Signed-off-by Abhisit Sangjan <[email protected]>--- Documentation/ABI/testing/sysfs-bus-iio-lmp920001 | 65 ++++++++++++++++++++++ .../devicetree/bindings/gpio/gpio-lmp92001.txt | 22 ++++++++
As Jonathan said, please split.
Quoted 7 lines
.../bindings/iio/adc/ti-lmp92001-adc.txt | 20 +++++++ .../bindings/iio/dac/ti-lmp92001-dac.txt | 35 ++++++++++++ 4 files changed, 142 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-lmp920001 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt create mode 100644 Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt
[...]
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt line 2
Quoted 8 lines
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt new file +2
-0@@ -0,0 +1,22 @@ +* Texas Instruments' LMP92001 GPIOs +
Need to state what this is a child of and refer to that binding doc. Same for the others.
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt line 5
Quoted 3 lines
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt new file +3
-0+Required properties: + - compatible: Must be set to "ti,lmp92001-gpio". + - reg: i2c chip address for the device.
? That's for the parent.
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt line 17
Quoted 12 lines
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt new file +12
-0+ - gpio-controller: Marks the device node as a gpio controller. + - #gpio-cells : Should be two. The first cell is the pin number and the + second cell is used to specify the gpio polarity: + 0 = Active high + 1 = Active low + +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + gpio-controller {
Should be "gpio {"
Quoted 16 lines
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt new file +5
-0+ compatible = "ti,lmp92001-gpio"; + gpio-controller; + #gpio-cells = <2>; + }; +};Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt new file +5
-0@@ -0,0 +1,20 @@ +* Texas Instruments' LMP92001 ADCs + +Required properties: + - compatible: Must be set to "ti,lmp92001-adc". + - reg: i2c chip address for the device.
Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt line 15
Quoted 10 lines
Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt new file +10
-0+ - ti,lmp92001-adc-mask: bit mask for which channel is enable. + 0 = Off + 1 = On + +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + lmp92001-adc {
adc {
Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt line 17
Quoted 2 lines
Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt new file +2
-0+ compatible = "ti,lmp92001-adc"; + ti,lmp92001-adc-mode = "continuous";
Not documented and I believe we're going to add a common property for this.
Quoted 28 lines
Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt new file +3
-0+ ti,lmp92001-adc-mask = <0x00000079>; + }; +};Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt new file +19
-0@@ -0,0 +1,35 @@ +* Texas Instruments' LMP92001 DACs + +Required properties: + - compatible: Must be set to "ti,lmp92001-dac". + - reg: i2c chip address for the device. + - ti,lmp92001-dac-hiz: hi-impedance control, + 1 = Forces all OUT[1:12] outputs to hi-z, 0 = normal + - ti,lmp92001-dac-outx: + Cy = 0, 1 = will force associated OUTx outputs to VDD + Cy = 0, 0 = will force associated OUTx outputs to GND + - ti,lmp92001-dac-gang: What group of Cy is governed to. + ----------------------------------------- + | Cy | CDAC:GANG = 0 | CDAC:GANG = 1 | + ----------------------------------------- + | C1 | OUT[1:4] | OUT[1:3] | + ----------------------------------------- + | C2 | OUT[5:6] | OUT[4:6] | + ----------------------------------------- + | C3 | OUT[7:8] | OUT[7:9] |
Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt line 29
Quoted 10 lines
Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt new file +10
-0+ ----------------------------------------- + | C4 | OUT[9:12] | OUT[10:12] | + ----------------------------------------- + +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + lmp92001-dac {
dac {
Quoted 9 lines
Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt new file +6
-0+ compatible = "ti,lmp92001-dac"; + ti,lmp92001-dac-hiz = /bits/ 8 <0>; + ti,lmp92001-dac-outx = /bits/ 8 <0>; + ti,lmp92001-dac-gang = /bits/ 8 <0>; + }; +};Signature · 1 line
2.13.0
Jonathan Cameron
maintainerQuoted 98 lines · On Mon, 11 Sep 2017 16:58:41 -0500 Rob Herring…
Quoted 18 lines · On Thu, Aug 31, 2017 at 01:25:28AM +0700…
From: Abhisit Sangjan <[email protected]>
TI LMP92001 Analog System Monitor and Controller
8-bit GPIOs.
12 DACs with 12-bit resolution.The GPIOs and DACs are shared port function with Cy function pin to take control the pin suddenly from external hardware. DAC's referance voltage selectable for Internal/External.
16 + 1 ADCs with 12-bit resolution.
Built-in internal Temperature Sensor on channel 17.
Window Comparator Function is supported on channel 1-3 and 9-11 for monitoring with interrupt signal (pending to implement for interrupt). ADC's referance voltage selectable for Internal/External.Quoted 4 lines
Signed-off-by Abhisit Sangjan <[email protected]>--- Documentation/ABI/testing/sysfs-bus-iio-lmp920001 | 65 ++++++++++++++++++++++ .../devicetree/bindings/gpio/gpio-lmp92001.txt | 22 ++++++++As Jonathan said, please split.
Quoted 7 lines
.../bindings/iio/adc/ti-lmp92001-adc.txt | 20 +++++++ .../bindings/iio/dac/ti-lmp92001-dac.txt | 35 ++++++++++++ 4 files changed, 142 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-lmp920001 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt create mode 100644 Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt[...]
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt line 2
Quoted 8 lines
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt new file +2
-0@@ -0,0 +1,22 @@ +* Texas Instruments' LMP92001 GPIOs +Need to state what this is a child of and refer to that binding doc. Same for the others.
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt line 5
Quoted 3 lines
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt new file +3
-0+Required properties: + - compatible: Must be set to "ti,lmp92001-gpio". + - reg: i2c chip address for the device.? That's for the parent.
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt line 17
Quoted 12 lines
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt new file +12
-0+ - gpio-controller: Marks the device node as a gpio controller. + - #gpio-cells : Should be two. The first cell is the pin number and the + second cell is used to specify the gpio polarity: + 0 = Active high + 1 = Active low + +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + gpio-controller {Should be "gpio {"
Quoted 16 lines
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt new file +5
-0+ compatible = "ti,lmp92001-gpio"; + gpio-controller; + #gpio-cells = <2>; + }; +};Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt new file +5
-0@@ -0,0 +1,20 @@ +* Texas Instruments' LMP92001 ADCs + +Required properties: + - compatible: Must be set to "ti,lmp92001-adc". + - reg: i2c chip address for the device.Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt line 15
Quoted 10 lines
Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt new file +10
-0+ - ti,lmp92001-adc-mask: bit mask for which channel is enable. + 0 = Off + 1 = On + +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + lmp92001-adc {adc {
Quoted 5 lines
Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt line 17
Quoted 2 lines
Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt new file +2
-0+ compatible = "ti,lmp92001-adc"; + ti,lmp92001-adc-mode = "continuous";Not documented and I believe we're going to add a common property for this.
Possibly. I'm not keen on it being explicitly controlled in general. It isn't a feature of the hardware in this case (I think) and as userspace control it is very hard for userspace to know what to do with it - normally it is better to put sufficient smarts in the driver to handle this transparently from either dt or userspace abi point of view.
At a rough guess 10-25% of the hardware in IIO has a similar mode (possibly more) We expose it precisely 1 other driver at the moment (and to be honest I can't recall why we allowed it in there) There are all sorts of optimizations that can be done in the driver if we don't make this a manual control.
Jonathan
Quoted 55 lines
Quoted 29 lines
Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt new file +3
-0+ ti,lmp92001-adc-mask = <0x00000079>; + }; +};Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt new file +19
-0@@ -0,0 +1,35 @@ +* Texas Instruments' LMP92001 DACs + +Required properties: + - compatible: Must be set to "ti,lmp92001-dac". + - reg: i2c chip address for the device. + - ti,lmp92001-dac-hiz: hi-impedance control, + 1 = Forces all OUT[1:12] outputs to hi-z, 0 = normal + - ti,lmp92001-dac-outx: + Cy = 0, 1 = will force associated OUTx outputs to VDD + Cy = 0, 0 = will force associated OUTx outputs to GND + - ti,lmp92001-dac-gang: What group of Cy is governed to. + ----------------------------------------- + | Cy | CDAC:GANG = 0 | CDAC:GANG = 1 | + ----------------------------------------- + | C1 | OUT[1:4] | OUT[1:3] | + ----------------------------------------- + | C2 | OUT[5:6] | OUT[4:6] | + ----------------------------------------- + | C3 | OUT[7:8] | OUT[7:9] |Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt line 29
Quoted 10 lines
Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt new file +10
-0+ ----------------------------------------- + | C4 | OUT[9:12] | OUT[10:12] | + ----------------------------------------- + +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + lmp92001-dac {dac {
Quoted 9 lines
Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt new file +6
-0+ compatible = "ti,lmp92001-dac"; + ti,lmp92001-dac-hiz = /bits/ 8 <0>; + ti,lmp92001-dac-outx = /bits/ 8 <0>; + ti,lmp92001-dac-gang = /bits/ 8 <0>; + }; +};Signature · 1 line
2.13.0--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Rob Herring
maintainerQuoted 104 lines · Jonathan Cameron
Quoted 101 lines · On Mon, 11 Sep 2017 16:58:41 -0500 Rob Herring…
Quoted 18 lines · On Thu, Aug 31, 2017 at 01:25:28AM +0700…
From: Abhisit Sangjan <[email protected]>
TI LMP92001 Analog System Monitor and Controller
8-bit GPIOs.
12 DACs with 12-bit resolution.The GPIOs and DACs are shared port function with Cy function pin to take control the pin suddenly from external hardware. DAC's referance voltage selectable for Internal/External.
16 + 1 ADCs with 12-bit resolution.
Built-in internal Temperature Sensor on channel 17.
Window Comparator Function is supported on channel 1-3 and 9-11 for monitoring with interrupt signal (pending to implement for interrupt). ADC's referance voltage selectable for Internal/External.Quoted 4 lines
Signed-off-by Abhisit Sangjan <[email protected]>--- Documentation/ABI/testing/sysfs-bus-iio-lmp920001 | 65 ++++++++++++++++++++++ .../devicetree/bindings/gpio/gpio-lmp92001.txt | 22 ++++++++As Jonathan said, please split.
Quoted 7 lines
.../bindings/iio/adc/ti-lmp92001-adc.txt | 20 +++++++ .../bindings/iio/dac/ti-lmp92001-dac.txt | 35 ++++++++++++ 4 files changed, 142 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-lmp920001 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt create mode 100644 Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt[...]
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt line 2
Quoted 8 lines
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt new file +2
-0@@ -0,0 +1,22 @@ +* Texas Instruments' LMP92001 GPIOs +Need to state what this is a child of and refer to that binding doc. Same for the others.
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt line 5
Quoted 3 lines
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt new file +3
-0+Required properties: + - compatible: Must be set to "ti,lmp92001-gpio". + - reg: i2c chip address for the device.? That's for the parent.
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt line 17
Quoted 12 lines
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt new file +12
-0+ - gpio-controller: Marks the device node as a gpio controller. + - #gpio-cells : Should be two. The first cell is the pin number and the + second cell is used to specify the gpio polarity: + 0 = Active high + 1 = Active low + +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + gpio-controller {Should be "gpio {"
Quoted 16 lines
Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt new file +5
-0+ compatible = "ti,lmp92001-gpio"; + gpio-controller; + #gpio-cells = <2>; + }; +};Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt new file +5
-0@@ -0,0 +1,20 @@ +* Texas Instruments' LMP92001 ADCs + +Required properties: + - compatible: Must be set to "ti,lmp92001-adc". + - reg: i2c chip address for the device.Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt line 15
Quoted 10 lines
Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt new file +10
-0+ - ti,lmp92001-adc-mask: bit mask for which channel is enable. + 0 = Off + 1 = On + +Example: +lmp92001@20 { + compatible = "ti,lmp92001"; + reg = <0x20>; + + lmp92001-adc {adc {
Quoted 2 lines
Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt new file +2
-0+ compatible = "ti,lmp92001-adc"; + ti,lmp92001-adc-mode = "continuous";
Quoted 8 lines
Quoted 2 lines
Not documented and I believe we're going to add a common property for this.
Possibly. I'm not keen on it being explicitly controlled in general. It isn't a feature of the hardware in this case (I think) and as userspace control it is very hard for userspace to know what to do with it - normally it is better to put sufficient smarts in the driver to handle this transparently from either dt or userspace abi point of view.
That certainly makes sense.
No property or common property. Your choice. :)
Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html