Re: [PATCH 2/2] devicetree: hwmon: Add documentation for TMP108 driver.

2016-11-30 Thread John Muir
Hi Guenter,

On Nov 30, 2016, at 4:42 PM, Guenter Roeck  wrote:
> 
>> +Optional node properties:
>> +- ti,thermostat-mode-comparator : (boolean) select the comparator mode for 
>> the
>> +  thermostat rather than the default interrupt-mode.
>> +
> I keep arguing with myself over this. Ultimately, I think it is not needed,
> for a simple reason: As currently written, using the driver in anything but
> comparator mode does not really make sense (because the alert status bits
> will be reset after reading them in interrupt mode). Second, interrupt mode
> can be determined automatically, based on the presence of SMBus alert support.
> Given that, I wonder if it would make more sense to drop this property and
> always put the chip into comparator mode for the time being. At a later time,
> if and when alert support is added, we can discuss the best approach to
> determine how it should be enabled (ie how do we know that the SMBus adapter
> supports handling alerts, or would we assume that it always does ?).
> 
> What do you think ?

I did find myself putting the device into comparator mode in order to test the 
FL and FH bits, so I agree that it can be the default for now. When I can test 
the Alert pin, we can discuss adding interrupt and SMBus alert support.

Once you have finished reviewing the other patch, I will make that change and 
re-send.

Thanks,

John.

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


Re: [PATCH 2/2] devicetree: hwmon: Add documentation for TMP108 driver.

2016-11-30 Thread Guenter Roeck
Hi John,

On Wed, Nov 30, 2016 at 12:36:19PM -0800, John Muir wrote:
> Simple hwmon binding documentation.
> 
> Signed-off-by: John Muir 
> ---
>  Documentation/devicetree/bindings/hwmon/tmp108.txt | 24 
> ++
>  1 file changed, 24 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/tmp108.txt
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/tmp108.txt 
> b/Documentation/devicetree/bindings/hwmon/tmp108.txt
> new file mode 100644
> index 000..7ba08c4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/tmp108.txt
> @@ -0,0 +1,24 @@
> +TMP108 temperature sensor
> +-
> +
> +This device supports I2C only.
> +
> +Requires node properties:
> +- compatible : "ti,tmp108"
> +- reg : the I2C address of the device. This is 0x48, 0x49, 0x4a, or 0x4b.
> +
> +Optional node properties:
> +- ti,thermostat-mode-comparator : (boolean) select the comparator mode for 
> the
> +  thermostat rather than the default interrupt-mode.
> +
I keep arguing with myself over this. Ultimately, I think it is not needed,
for a simple reason: As currently written, using the driver in anything but
comparator mode does not really make sense (because the alert status bits
will be reset after reading them in interrupt mode). Second, interrupt mode
can be determined automatically, based on the presence of SMBus alert support.
Given that, I wonder if it would make more sense to drop this property and
always put the chip into comparator mode for the time being. At a later time,
if and when alert support is added, we can discuss the best approach to
determine how it should be enabled (ie how do we know that the SMBus adapter
supports handling alerts, or would we assume that it always does ?).

What do you think ?

Thanks,
Guenter

> +Example:
> + tmp108@48 {
> + compatible = "ti,tmp108";
> + reg = <0x48>;
> + ti,thermostat-mode-comparator;
> + };
> +
> + tmp108@49 {
> + compatible = "ti,tmp108";
> + reg = <0x49>;
> + };
> -- 
> 2.8.0.rc3.226.g39d4020
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] devicetree: hwmon: Add documentation for TMP108 driver.

2016-11-30 Thread John Muir
Simple hwmon binding documentation.

Signed-off-by: John Muir 
---
 Documentation/devicetree/bindings/hwmon/tmp108.txt | 24 ++
 1 file changed, 24 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/tmp108.txt

diff --git a/Documentation/devicetree/bindings/hwmon/tmp108.txt 
b/Documentation/devicetree/bindings/hwmon/tmp108.txt
new file mode 100644
index 000..7ba08c4
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/tmp108.txt
@@ -0,0 +1,24 @@
+TMP108 temperature sensor
+-
+
+This device supports I2C only.
+
+Requires node properties:
+- compatible : "ti,tmp108"
+- reg : the I2C address of the device. This is 0x48, 0x49, 0x4a, or 0x4b.
+
+Optional node properties:
+- ti,thermostat-mode-comparator : (boolean) select the comparator mode for the
+  thermostat rather than the default interrupt-mode.
+
+Example:
+   tmp108@48 {
+   compatible = "ti,tmp108";
+   reg = <0x48>;
+   ti,thermostat-mode-comparator;
+   };
+
+   tmp108@49 {
+   compatible = "ti,tmp108";
+   reg = <0x49>;
+   };
-- 
2.8.0.rc3.226.g39d4020

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