diff mbox

[v2,3/3] Documentation: dt: hwmon: add OF document for lm90

Message ID 1375944991-29182-4-git-send-email-wni@nvidia.com
State Superseded, archived
Headers show

Commit Message

Wei Ni Aug. 8, 2013, 6:56 a.m. UTC
Add OF document for lm90 in Documentation/devicetree/.

Signed-off-by: Wei Ni <wni@nvidia.com>
---
 Documentation/devicetree/bindings/hwmon/lm90.txt |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt

Comments

Stephen Warren Aug. 8, 2013, 5:37 p.m. UTC | #1
On 08/08/2013 12:56 AM, Wei Ni wrote:
> Add OF document for lm90 in Documentation/devicetree/.

> diff --git a/Documentation/devicetree/bindings/hwmon/lm90.txt b/Documentation/devicetree/bindings/hwmon/lm90.txt

> +Required node properties:
> +- compatible: manufacture and chip name,
> +              which are listed in the Documentation/hwmon/lm90

You need to specify the exact values here. DT binding documentations
should be OS-agnostic, and hence can't depend on Linux-specific
documentation or other details.

> +Optional properties:
> +- vdd-supply: vdd regulator for the supply voltage. If this is not set,

s/set/present/.

> +- interrupts: lm90 can support interrupt mode, you can set interrupt here.

You might want to mention that a single entry ("specifier") is expected
in the list.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wei Ni Aug. 9, 2013, 6:10 a.m. UTC | #2
On 08/09/2013 01:37 AM, Stephen Warren wrote:
> On 08/08/2013 12:56 AM, Wei Ni wrote:
>> Add OF document for lm90 in Documentation/devicetree/.
> 
>> diff --git a/Documentation/devicetree/bindings/hwmon/lm90.txt b/Documentation/devicetree/bindings/hwmon/lm90.txt
> 
>> +Required node properties:
>> +- compatible: manufacture and chip name,
>> +              which are listed in the Documentation/hwmon/lm90
> 
> You need to specify the exact values here. DT binding documentations
> should be OS-agnostic, and hence can't depend on Linux-specific
> documentation or other details.

Ok, I will list it.

> 
>> +Optional properties:
>> +- vdd-supply: vdd regulator for the supply voltage. If this is not set,
> 
> s/set/present/.

Oh, yes, I will change it.

> 
>> +- interrupts: lm90 can support interrupt mode, you can set interrupt here.
> 
> You might want to mention that a single entry ("specifier") is expected
> in the list.

Sorry, I didn't get your point, could you explain more?

> 

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Warren Aug. 9, 2013, 4:35 p.m. UTC | #3
On 08/09/2013 12:10 AM, Wei Ni wrote:
> On 08/09/2013 01:37 AM, Stephen Warren wrote:
>> On 08/08/2013 12:56 AM, Wei Ni wrote:
>>> Add OF document for lm90 in Documentation/devicetree/.
>>
>>> diff --git a/Documentation/devicetree/bindings/hwmon/lm90.txt b/Documentation/devicetree/bindings/hwmon/lm90.txt

>>> +- interrupts: lm90 can support interrupt mode, you can set interrupt here.
>>
>> You might want to mention that a single entry ("specifier") is expected
>> in the list.
> 
> Sorry, I didn't get your point, could you explain more?

In general, a device may have more than one interrupt output. Hence in
general, the interrupts property is a list of 1 or more interrupt
specifiers. In this case, that list should be a single entry. The
binding should state this. how about:

----------
Optional properties:
interrupts: Contains a single interrupt specifier which describes the
LM90 XXXX output. See interrupt-controller/interrupts.txt for the format.
----------

(where you'd replace XXXX with the pin/signal name from the datasheet).
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" 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/lm90.txt b/Documentation/devicetree/bindings/hwmon/lm90.txt
new file mode 100644
index 0000000..8024f11
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/lm90.txt
@@ -0,0 +1,20 @@ 
+* LM90 series thermometer.
+
+Required node properties:
+- compatible: manufacture and chip name,
+              which are listed in the Documentation/hwmon/lm90
+- reg: I2C bus address of the device
+
+Optional properties:
+- vdd-supply: vdd regulator for the supply voltage. If this is not set,
+              assuming vdd is always powered.
+- interrupts: lm90 can support interrupt mode, you can set interrupt here.
+
+Example lm90 node:
+
+nct1008 {
+	compatible = "onnn,nct1008";
+	reg = <0x4c>;
+	vdd-supply = <&palmas_ldo6_reg>;
+	interrupt-parent = <&gpio>;
+	interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>;