diff mbox

[v2,1/2] hwmon: (adcxx) add devictree bindings documentation

Message ID 20170821081952.18508-1-fe@dev.tdt.de (mailing list archive)
State Changes Requested
Headers show

Commit Message

Florian Eckert Aug. 21, 2017, 8:19 a.m. UTC
Document the devicetree bindings for the adcxx.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
---
v2:
- use regulator voltage binding

 Documentation/devicetree/bindings/hwmon/adcxx.txt | 24 +++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/adcxx.txt

Comments

Guenter Roeck Sept. 1, 2017, 2:32 p.m. UTC | #1
On Mon, Aug 21, 2017 at 10:19:51AM +0200, Florian Eckert wrote:
> Document the devicetree bindings for the adcxx.
> 
> Signed-off-by: Florian Eckert <fe@dev.tdt.de>
> ---
> v2:
> - use regulator voltage binding
> 
>  Documentation/devicetree/bindings/hwmon/adcxx.txt | 24 +++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/adcxx.txt
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/adcxx.txt b/Documentation/devicetree/bindings/hwmon/adcxx.txt
> new file mode 100644
> index 000000000000..a94a5fe21b6d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/adcxx.txt
> @@ -0,0 +1,24 @@
> +adcxx properties
> +
> +Required properties:
> +- compatible: Must be one of the following:
> +	- "national,adcxx1s" for adcxx1s
> +	- "national,adcxx2s" for adcxx2s
> +	- "national,adcxx4s" for adcxx4s
> +	- "national,adcxx8s" for adcxx8s
> +- reg: SPI address for chip
> +
> +Optional properties:
> +
> +- vref-supply
> +  The external reference in microvolt for this device is set to this value.
> +  If it does not exists the reference will be set to 3300000uV (3.3V).

s/exists/exist/

> +
> +Example:
> +
> +adc@6 {
> +	compatible = "national,adcxx2s";
> +	reg = <6 0>;
> +	spi-max-frequency = <1000000>;

I asssume that means that standard spi properties are accepted / required,
which I think should be documented. We'll need input from Rob for that.

Thanks,
Guenter

> +	vref-supply = <&vref>;
> +};
--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Florian Eckert Sept. 4, 2017, 7:13 a.m. UTC | #2
Hello Guenter

Thank you again for reviewing my patches!
It was the first time for me :-) to add something to the kernel.

>> +- vref-supply
>> +  The external reference in microvolt for this device is set to this 
>> value.
>> +  If it does not exists the reference will be set to 3300000uV 
>> (3.3V).
> 
> s/exists/exist/
> 

Sorry for the noise and thank you for the hint.

>> +
>> +Example:
>> +
>> +adc@6 {
>> +	compatible = "national,adcxx2s";
>> +	reg = <6 0>;
>> +	spi-max-frequency = <1000000>;
> 
> I asssume that means that standard spi properties are accepted / 
> required,
> which I think should be documented. We'll need input from Rob for that.

Yes this is a standard option.
I have added this because 
"Documentation/devicetree/bindings/hwmon/lm70.txt"
did the same. This was my pattern.

I will send a follow up patch set if this is clarivied. Let me know if 
this is needed or not.

Thanks
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/hwmon/adcxx.txt b/Documentation/devicetree/bindings/hwmon/adcxx.txt
new file mode 100644
index 000000000000..a94a5fe21b6d
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/adcxx.txt
@@ -0,0 +1,24 @@ 
+adcxx properties
+
+Required properties:
+- compatible: Must be one of the following:
+	- "national,adcxx1s" for adcxx1s
+	- "national,adcxx2s" for adcxx2s
+	- "national,adcxx4s" for adcxx4s
+	- "national,adcxx8s" for adcxx8s
+- reg: SPI address for chip
+
+Optional properties:
+
+- vref-supply
+  The external reference in microvolt for this device is set to this value.
+  If it does not exists the reference will be set to 3300000uV (3.3V).
+
+Example:
+
+adc@6 {
+	compatible = "national,adcxx2s";
+	reg = <6 0>;
+	spi-max-frequency = <1000000>;
+	vref-supply = <&vref>;
+};