From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] Application using i2c-imx.c
Date: Wed, 09 Dec 2009 08:04:03 +0000 [thread overview]
Message-ID: <20091209090403.31a08a3b@hyperion.delvare> (raw)
In-Reply-To: <2655c0a70912080328w33f34840x5e0702ce750cec70@mail.gmail.com>
Hi Javier,
On Tue, 8 Dec 2009 12:28:07 +0100, Javier Zugasti wrote:
> I wanted to ask if someone has used the i2c-imx driver functionalities to
> communicate with a LM sensor. I haven't found a single example in the web
> and I am very inexperienced with Linux.
You don't really have to care. Almost all I2C-based hwmon drivers
should work on top of any I2C bus driver. Exceptions are very rare (and
would suggest broken hardware design.)
> If so, could you please let me have a look to the application code so that I
> can understand how to communicate with my LM73 using the functions from the
> mentioned driver?
You don't have to do anything, drivers for this already exist. The lm73
driver isn't upstream yet, but it will be in a few days. For now you
can pick the patch from there:
ftp://ftp.kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-hwmon/hwmon-lm73-new-driver.patch
After patching your kernel tree, simply load the i2c-imx and lm73
drivers. Then either declare the lm73 device as part of your platform
data, or instantiate it from user-space using
the /sys/bus/i2c/devices/i2c-<n>/new_device file, where <n> is to be
replaced with the relevant i2c-imx's bus number (probably 0, if you
have a single I2C bus on your system.) And you should be done.
--
Jean Delvare
http://khali.linux-fr.org/wishlist.html
_______________________________________________
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-12-09 8:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-08 11:28 [lm-sensors] Application using i2c-imx.c Javier Zugasti
2009-12-09 8:04 ` Jean Delvare [this message]
2009-12-09 15:29 ` Javier Zugasti
2009-12-09 15:46 ` Jean Delvare
2009-12-09 16:12 ` Javier Zugasti
2009-12-09 16:25 ` Jean Delvare
2009-12-09 16:39 ` Javier Zugasti
2009-12-09 16:49 ` Jean Delvare
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=20091209090403.31a08a3b@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=lm-sensors@vger.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.