From: Jonathan Cameron <jic23-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>
To: alfred steele <alfred.jaquez-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Michael Lawnick <ml.lawnick-Mmb7MZpHnFY@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
LM Sensors <lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>
Subject: Re: [lm-sensors] Use the Linux I2C subsystem for a two wire interface protocol
Date: Wed, 15 Jul 2009 14:43:30 +0000 [thread overview]
Message-ID: <4A5DEB12.3020602@cam.ac.uk> (raw)
In-Reply-To: <528f13590907150722q2a91139bve72d65cbd555b8e9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
alfred steele wrote:
> Hi Jonathan/Michael,
>> I'd say this is just the wrong way round:
>> Design goal should be to keep application as is and just load another
>> driver on H/W change + changing access path in some config file.
> I get that.
> I am assuming that in order to get the sht15 driver working on my
> platform, all i need to do is populate the correct GPIO's in the
> platform device structure.
Yes and register it with the kernel
> Any idea as to how to do that , i mean
> where(which file in the source) does the actual platform device
> strucutre's pdata get populated.
On an embedded board this would typically be in the board config
file. For example, see arch/arm/mach-pxa/imote2.c which has an sht15
attached. The exact method of registration may be a bit architecture
specific but will look something like the relevant parts of that file.
> What would be the optimal method to
> tie it to the userspace. Can i add an ioctl to the sht15 driver and
> export it for the userspace driver to use.
No. Preferred way to access this sort of slow low bandwidth device
is via sysfs.
It'll create files for reading the various values under
/sys/class/hwmon/hwmon?/device/
from memory they are called
temp0 and humidity0
Jonathan
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@cam.ac.uk>
To: alfred steele <alfred.jaquez-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Michael Lawnick <ml.lawnick-Mmb7MZpHnFY@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
LM Sensors <lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>
Subject: Re: [lm-sensors] Use the Linux I2C subsystem for a two wire
Date: Wed, 15 Jul 2009 14:43:30 +0000 [thread overview]
Message-ID: <4A5DEB12.3020602@cam.ac.uk> (raw)
In-Reply-To: <528f13590907150722q2a91139bve72d65cbd555b8e9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
alfred steele wrote:
> Hi Jonathan/Michael,
>> I'd say this is just the wrong way round:
>> Design goal should be to keep application as is and just load another
>> driver on H/W change + changing access path in some config file.
> I get that.
> I am assuming that in order to get the sht15 driver working on my
> platform, all i need to do is populate the correct GPIO's in the
> platform device structure.
Yes and register it with the kernel
> Any idea as to how to do that , i mean
> where(which file in the source) does the actual platform device
> strucutre's pdata get populated.
On an embedded board this would typically be in the board config
file. For example, see arch/arm/mach-pxa/imote2.c which has an sht15
attached. The exact method of registration may be a bit architecture
specific but will look something like the relevant parts of that file.
> What would be the optimal method to
> tie it to the userspace. Can i add an ioctl to the sht15 driver and
> export it for the userspace driver to use.
No. Preferred way to access this sort of slow low bandwidth device
is via sysfs.
It'll create files for reading the various values under
/sys/class/hwmon/hwmon?/device/
from memory they are called
temp0 and humidity0
Jonathan
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2009-07-15 14:43 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-14 16:25 Use the Linux I2C subsystem for a two wire interface protocol alfred steele
[not found] ` <528f13590907140925h7aa36452o60da32d3bf941241-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-14 16:57 ` Jonathan Cameron
2009-07-14 16:57 ` [lm-sensors] Use the Linux I2C subsystem for a two wire Jonathan Cameron
[not found] ` <4A5CB908.4060404-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>
2009-07-14 20:58 ` Use the Linux I2C subsystem for a two wire interface protocol alfred steele
2009-07-14 20:58 ` [lm-sensors] Use the Linux I2C subsystem for a two wire alfred steele
[not found] ` <528f13590907141358w17869b6fq450bf223e4f54687-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-15 5:41 ` [lm-sensors] Use the Linux I2C subsystem for a two wire interface protocol Michael Lawnick
2009-07-15 5:41 ` [lm-sensors] Use the Linux I2C subsystem for a two Michael Lawnick
[not found] ` <4A5D6C0A.7030903-Mmb7MZpHnFY@public.gmane.org>
2009-07-15 14:22 ` [lm-sensors] Use the Linux I2C subsystem for a two wire interface protocol alfred steele
2009-07-15 14:22 ` [lm-sensors] Use the Linux I2C subsystem for a two wire alfred steele
[not found] ` <528f13590907150722q2a91139bve72d65cbd555b8e9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-15 14:43 ` Jonathan Cameron [this message]
2009-07-15 14:43 ` Jonathan Cameron
[not found] ` <4A5DEB12.3020602-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>
2009-07-15 15:46 ` [lm-sensors] Use the Linux I2C subsystem for a two wire interface protocol alfred steele
2009-07-15 15:46 ` [lm-sensors] Use the Linux I2C subsystem for a two wire alfred steele
[not found] ` <528f13590907150846o7f4e41daw4cd6e37ff3afef70-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-15 15:54 ` [lm-sensors] Use the Linux I2C subsystem for a two wire interface protocol Mark Brown
2009-07-15 15:54 ` [lm-sensors] Use the Linux I2C subsystem for a two Mark Brown
2009-07-15 17:32 ` [lm-sensors] Use the Linux I2C subsystem for a two wire interface protocol alfred steele
[not found] ` <528f13590907151032y30ae62beo486d4e1056219983-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-15 18:31 ` Jonathan Cameron
2009-07-15 18:31 ` [lm-sensors] Use the Linux I2C subsystem for a two wire Jonathan Cameron
[not found] ` <4A5E206F.8000001-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>
2009-07-16 16:13 ` [lm-sensors] Use the Linux I2C subsystem for a two wire interface protocol alfred steele
2009-07-16 16:13 ` [lm-sensors] Use the Linux I2C subsystem for a two wire alfred steele
[not found] ` <528f13590907160913n73dcb4fcuf09f4946d7578793-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-16 16:29 ` [lm-sensors] Use the Linux I2C subsystem for a two wire interface protocol alfred steele
2009-07-16 16:29 ` [lm-sensors] Use the Linux I2C subsystem for a two wire alfred steele
[not found] ` <528f13590907160929r1385c99el6c1ed16ca1b592d2-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-16 18:51 ` [lm-sensors] Use the Linux I2C subsystem for a two wire interface protocol Jonathan Cameron
2009-07-16 18:51 ` [lm-sensors] Use the Linux I2C subsystem for a two wire Jonathan Cameron
[not found] ` <4A5F76A8.8080001-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>
2009-07-17 21:21 ` [lm-sensors] Use the Linux I2C subsystem for a two wire interface protocol alfred steele
2009-07-17 21:21 ` [lm-sensors] Use the Linux I2C subsystem for a two wire alfred steele
[not found] ` <528f13590907171421m26bc67ecg8d0334d20365406f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-20 6:25 ` [lm-sensors] Use the Linux I2C subsystem for a two wire interface protocol alfred steele
2009-07-20 6:25 ` [lm-sensors] Use the Linux I2C subsystem for a two wire alfred steele
2009-07-21 11:57 ` [lm-sensors] Use the Linux I2C subsystem for a two wire interface protocol J.I. Cameron
2009-07-21 11:57 ` [lm-sensors] Use the Linux I2C subsystem for a two wire J.I. Cameron
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=4A5DEB12.3020602@cam.ac.uk \
--to=jic23-kwpb1pkirijaa/9udqfwiw@public.gmane.org \
--cc=alfred.jaquez-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
--cc=ml.lawnick-Mmb7MZpHnFY@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 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.