From: Wolfram Sang <w.sang@pengutronix.de>
To: Jean Delvare <khali@linux-fr.org>
Cc: Dirk Eibach <eibach@gdsys.de>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
rdunlap@xenotime.net, devicetree-discuss@lists.ozlabs.org
Subject: Re: [PATCH] hwmon: (ads1015) Add devicetree documentation
Date: Thu, 3 Mar 2011 14:25:49 +0100 [thread overview]
Message-ID: <20110303132549.GG3649@pengutronix.de> (raw)
In-Reply-To: <20110303132025.51e0d92e@endymion.delvare>
[-- Attachment #1: Type: text/plain, Size: 1746 bytes --]
> > Hmm, device tree bindings should be OS-neutral, sysfs is not.
>
> Why do we document this in the Linux kernel tree then?
To describe which bindings Linux supports.
> > with the active channels. Then again, what is the drawback of exporting
> > all channels?
>
> Performance and user-friendliness. libsensors-based applications will
> read all available attributes by default, and each reading takes time.
> Letting the platform declare how the inputs are used allows for a sane
> output for "sensors" and other similar tools out of the box, without
> the user having to tinker with ignore statements in configuration files
> to discard the nonsensical values.
OK, that's fine I'd say.
> > Is there another hwmon-driver doing so (couldn't find one)?
>
> If "doing so" means "letting the user define how the ADC inputs are
> used", then yes, the pcf8591 driver does something similar, except that
> it uses a module parameter for the setting, for historical reasons.
> Platform-provided, per-device data is better in my opinion.
OK. The thing is you can't map platform_data 1:1 to bindings, because
most are very specific to the Linux-driver. Do you think something like
"active-channels" would be sufficent for those other hwmon devices, too?
(I still do not like "exported-channels", because there is no need to
export the channels for the OS. The devicetree is primarily a hardware
description language) Or maybe we go specific and say "ads1015,channel1
= 1"? Maybe somebody knows of a similar chips as a reference?
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: Dirk Eibach <eibach-dJ+jgKLZIg4@public.gmane.org>,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] hwmon: (ads1015) Add devicetree documentation
Date: Thu, 3 Mar 2011 14:25:49 +0100 [thread overview]
Message-ID: <20110303132549.GG3649@pengutronix.de> (raw)
In-Reply-To: <20110303132025.51e0d92e-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 1746 bytes --]
> > Hmm, device tree bindings should be OS-neutral, sysfs is not.
>
> Why do we document this in the Linux kernel tree then?
To describe which bindings Linux supports.
> > with the active channels. Then again, what is the drawback of exporting
> > all channels?
>
> Performance and user-friendliness. libsensors-based applications will
> read all available attributes by default, and each reading takes time.
> Letting the platform declare how the inputs are used allows for a sane
> output for "sensors" and other similar tools out of the box, without
> the user having to tinker with ignore statements in configuration files
> to discard the nonsensical values.
OK, that's fine I'd say.
> > Is there another hwmon-driver doing so (couldn't find one)?
>
> If "doing so" means "letting the user define how the ADC inputs are
> used", then yes, the pcf8591 driver does something similar, except that
> it uses a module parameter for the setting, for historical reasons.
> Platform-provided, per-device data is better in my opinion.
OK. The thing is you can't map platform_data 1:1 to bindings, because
most are very specific to the Linux-driver. Do you think something like
"active-channels" would be sufficent for those other hwmon devices, too?
(I still do not like "exported-channels", because there is no need to
export the channels for the OS. The devicetree is primarily a hardware
description language) Or maybe we go specific and say "ads1015,channel1
= 1"? Maybe somebody knows of a similar chips as a reference?
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 192 bytes --]
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
next prev parent reply other threads:[~2011-03-03 13:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-03 9:16 [PATCH] hwmon: (ads1015) Add devicetree documentation Dirk Eibach
2011-03-03 11:51 ` Wolfram Sang
2011-03-03 12:20 ` Jean Delvare
2011-03-03 13:25 ` Wolfram Sang [this message]
2011-03-03 13:25 ` Wolfram Sang
2011-03-03 17:26 ` Grant Likely
2011-03-03 22:02 ` Jean Delvare
2011-03-03 22:09 ` Grant Likely
2011-03-17 10:25 ` Jean Delvare
2011-03-17 10:25 ` Jean Delvare
2011-03-17 16:46 ` Grant Likely
2011-03-03 17:01 ` Grant Likely
2011-03-03 12:32 ` [PATCH v3] " Dirk Eibach
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=20110303132549.GG3649@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=eibach@gdsys.de \
--cc=khali@linux-fr.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/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.