All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: John Muir <john@jmuir.com>
Cc: Jean Delvare <jdelvare@suse.com>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>, John Muir <muirj@google.com>,
	Anatol Pomazau <anatol@google.com>
Subject: Re: [PATCH 2/2] devicetree: hwmon: Add documentation for TMP108 driver.
Date: Wed, 30 Nov 2016 16:42:51 -0800	[thread overview]
Message-ID: <20161201004251.GA18513@roeck-us.net> (raw)
In-Reply-To: <1480538179-75901-3-git-send-email-john@jmuir.com>

Hi John,

On Wed, Nov 30, 2016 at 12:36:19PM -0800, John Muir wrote:
> Simple hwmon binding documentation.
> 
> Signed-off-by: John Muir <john@jmuir.com>
> ---
>  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 0000000..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
> 

  reply	other threads:[~2016-12-01  0:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-27  1:26 [PATCH 0/3] Texas Instruments TMP108 temperature sensor driver John Muir
2016-11-27  2:18 ` Guenter Roeck
2016-11-30 20:36 ` [PATCH v2 0/2] " John Muir
2016-11-30 20:36   ` [PATCH 1/2] hwmon: Add " John Muir
2016-12-01 15:19     ` Guenter Roeck
2016-12-01 21:50       ` John Muir
2016-12-01 22:08         ` Guenter Roeck
2016-12-01 22:15           ` John Muir
2016-11-30 20:36   ` [PATCH 2/2] devicetree: hwmon: Add documentation for TMP108 driver John Muir
2016-12-01  0:42     ` Guenter Roeck [this message]
2016-12-01  1:41       ` John Muir
2016-12-02  2:32   ` [PATCH v3 0/2] Texas Instruments TMP108 temperature sensor driver John Muir
2016-12-02  2:32     ` [PATCH v3 1/2] hwmon: Add " John Muir
2016-12-02  4:40       ` Guenter Roeck
2016-12-02  5:45         ` John Muir
2016-12-02  2:32     ` [PATCH v3 2/2] devicetree: hwmon: Add documentation for TMP108 driver John Muir
2016-12-02  4:42       ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161201004251.GA18513@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=anatol@google.com \
    --cc=corbet@lwn.net \
    --cc=jdelvare@suse.com \
    --cc=john@jmuir.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=muirj@google.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.