public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>,
	Mahoda Ratnayaka
	<mahoda.ratnayaka-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
Cc: Jean Delvare <jdelvare-IBi9RG/b67k@public.gmane.org>,
	linux-hwmon-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Chris Packham
	<chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
Subject: Re: [PATCH v2] lm87: Allow channel data to be set from dts file.
Date: Fri, 23 Sep 2016 13:10:48 -0500	[thread overview]
Message-ID: <20160923181048.GA10498@rob-hp-laptop> (raw)
In-Reply-To: <d3258440-db4e-a4c2-cca1-9683d0da63a8-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

On Tue, Sep 20, 2016 at 02:55:42AM -0700, Guenter Roeck wrote:
> On 09/19/2016 10:22 PM, Mahoda Ratnayaka wrote:
> >Currently there is no method for setting the channel
> >value from the DTS file. When, the driver uses a dts
> >file to initialize the driver platform_data is not set.
> >As a the result channel variable may not be set correctly.
> >
> >Without the channel variable set correctly, some of the
> >sensors will not be initialized correctly. For example
> >temp3 sensor sysfs entries.
> >
> >This adds the required functionality to set the channel
> >variable from the DTS file. This is done via reading the
> >reading a property named "channel" from the lm87 driver.
> >
> >Signed-off-by: Mahoda Ratnayaka <mahoda.ratnayaka-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
> >---
> >
> >Notes:
> >     changes since v1:
> >     Removed unncessary variables channel and np.
> >     Update the code as per review comments.
> >
> > Documentation/devicetree/bindings/hwmon/lm87.txt | 9 +++++++++
> > drivers/hwmon/lm87.c                             | 7 ++++++-
> > 2 files changed, 15 insertions(+), 1 deletion(-)
> >
> >diff --git a/Documentation/devicetree/bindings/hwmon/lm87.txt b/Documentation/devicetree/bindings/hwmon/lm87.txt
> >index fefcb48..1906e08 100644
> >--- a/Documentation/devicetree/bindings/hwmon/lm87.txt
> >+++ b/Documentation/devicetree/bindings/hwmon/lm87.txt
> >@@ -6,9 +6,18 @@ Required properties:
> >
> > - reg: I2C address
> >
> >+optional properties:
> >+- channels: Value for the channel mode register.
> >+            This allows configuration of pins with
> >+            selectable uses on the LM87 device (e.g.
> >+            choosing between voltage and temperature
> >+            inputs).
> >+            See hwmon/lm87 for further information
> 
> Rob is the ultimate person to comment here, but I think the property description
> by itself should be complete and technically independent of the implementation.
> Documentation/hwmon/lm87 describes the implementation, so an (incomplete)
> reference to it seems inappropriate.

Yes, please make the binding stand on its own. And please put all of the 
binding in one patch. You're describing h/w, not adding s/w features.

As far as whether this is configuration or h/w description, it depends 
on what defines the configuration. If it is fixed by the h/w design then 
this is okay. If it is a user choice, then no it should not be in DT. 
Seems like this would be the former case as probably temperature 
measurement requires a thermistor or something.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-09-23 18:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-20  5:22 [PATCH v2] lm87: Allow channel data to be set from dts file Mahoda Ratnayaka
     [not found] ` <20160920052240.10242-1-mahoda.ratnayaka-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
2016-09-20  9:55   ` Guenter Roeck
2016-09-21 21:58     ` Mahoda Ratnayaka
     [not found]     ` <d3258440-db4e-a4c2-cca1-9683d0da63a8-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2016-09-23 18:10       ` Rob Herring [this message]
2016-09-20 17:24   ` Frank Rowand

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=20160923181048.GA10498@rob-hp-laptop \
    --to=robh-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=jdelvare-IBi9RG/b67k@public.gmane.org \
    --cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
    --cc=linux-hwmon-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mahoda.ratnayaka-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox