From: Michael Brown <mbrown@fensystems.co.uk>
To: Jean Delvare <khali@linux-fr.org>
Cc: Ben Hutchings <bhutchings@solarflare.com>,
Jeff Garzik <jgarzik@redhat.com>,
netdev@vger.kernel.org, Linux I2C <i2c@lm-sensors.org>,
linux-net-drivers@solarflare.com
Subject: Re: SFC driver implements its own I2C support
Date: Thu, 15 May 2008 13:04:50 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.62.0805151258150.13626@dolphin.home> (raw)
In-Reply-To: <20080515112416.55ffd328@hyperion.delvare>
On Thu, 15 May 2008, Jean Delvare wrote:
> > Last time I checked (i.e. when I originally wrote this bit of the
> > code), the kernel's own i2c layer didn't provide any clean way for
> > kernel code (rather than user code) to access i2c devices.
>
> I am not sure what Michael was referring to exactly, but access to i2c
> devices from the kernel has been supported pretty much forever. Maybe he
> really meant access to hardware monitoring devices? For these indeed
> there is a standard user-space interface (through sysfs) but no standard
> in-kernel access; mainly because there has never been a clear need for
> one. Again, if you need something, please discuss it on the relevant
> mailing lists and we'll find a way for you to use the standard
> subsystems rather than reimplementing them for your own use.
>From memory (and this may be inaccurate), it looked as though the i2c
subsystem code for EEPROM access was contained within
drivers/i2c/chips/eeprom.c, and that this code provided an interface for
userspace to access the EEPROM contents, but no interface for kernel code
to do so.
I think there may also have been issues with the fact that the i2c system
allows for failures on the shutdown path (e.g. i2c_detach_client() can
return a failure), which becomes awkward to handle when you are in the
middle of a shutdown path that is not allowed to fail (e.g. a
pci_driver->remove method).
Michael
next prev parent reply other threads:[~2008-05-15 12:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-13 8:33 SFC driver implements its own I2C support Jean Delvare
2008-05-14 21:58 ` Ben Hutchings
2008-05-15 9:24 ` Jean Delvare
2008-05-15 12:04 ` Michael Brown [this message]
2008-05-15 12:39 ` Jean Delvare
2008-05-15 12:58 ` [i2c] " Wolfram Sang
2008-05-15 14:52 ` Michael Brown
2008-05-15 12:03 ` [i2c] " Riku Voipio
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=Pine.LNX.4.62.0805151258150.13626@dolphin.home \
--to=mbrown@fensystems.co.uk \
--cc=bhutchings@solarflare.com \
--cc=i2c@lm-sensors.org \
--cc=jgarzik@redhat.com \
--cc=khali@linux-fr.org \
--cc=linux-net-drivers@solarflare.com \
--cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).