From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Alessio Sangalli <alesan-+h0hele9I7BBDgjK7y7TUQ@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Implementing a new driver
Date: Fri, 23 Jan 2009 21:25:06 +0100 [thread overview]
Message-ID: <20090123212506.7997e4ee@hyperion.delvare> (raw)
In-Reply-To: <4979FEF2.1090006-+h0hele9I7BBDgjK7y7TUQ@public.gmane.org>
Hi Alessio,
On Fri, 23 Jan 2009 09:31:30 -0800, Alessio Sangalli wrote:
> Jean Delvare wrote:
>
> > As a quick starting point I recommend this FAQ item:
> > http://i2c.wiki.kernel.org/index.php/Linux_2.6_I2C_development_FAQ#New_I2C_bus_drivers
>
> Thanks, this will be useful to get started; anyway, it implies a
> knowledge of what is a "bus driver" or a "chip driver". I've read other
> articles but I'm still a bit confused. Could you give me a very very
> quick description of all kind of i2c-related drivers?
Basically, the bus drivers give you access to the I2C bus, while the
chip drivers are specific to devices which are connected to the bus.
This is essentially similar to USB, where you need a driver for the
host controller, and then a driver for devices connected to the USB
ports.
You may want to read this page on the wiki:
http://i2c.wiki.kernel.org/index.php/Driver_Architecture
and the document linked at the bottom of the page.
Examples of I2C bus drivers can be found under drivers/i2c/busses.
Examples of I2C chip drivers can be found under drivers/rtc (for RTC
chips), drivers/hwmon (for hardware monitoring chips) or drivers/gpio
(for I/O expanders.)
> What is the preferred way to actually test the driver, I am quite
> comfortable with a solder iron if I have to connect a simple device to
> try a connection
If you have an AT24C02 EEPROM at hand or similar, you'll be able to
test most of the transaction types. But actually, any I2C or SMBus chip
you can connect to the bus should be good enough to test the basics of
your i2c bus driver.
--
Jean Delvare
next prev parent reply other threads:[~2009-01-23 20:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-23 9:28 Implementing a new driver Alessio Sangalli
[not found] ` <49798DAD.1070100-+h0hele9I7BBDgjK7y7TUQ@public.gmane.org>
2009-01-23 9:39 ` Jean Delvare
[not found] ` <20090123103909.281770dd-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-01-23 17:31 ` Alessio Sangalli
[not found] ` <4979FEF2.1090006-+h0hele9I7BBDgjK7y7TUQ@public.gmane.org>
2009-01-23 20:25 ` Jean Delvare [this message]
[not found] ` <20090123212506.7997e4ee-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-01-23 21:35 ` Alessio Sangalli
[not found] ` <497A3820.2060405-+h0hele9I7BBDgjK7y7TUQ@public.gmane.org>
2009-01-24 8:58 ` 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=20090123212506.7997e4ee@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=alesan-+h0hele9I7BBDgjK7y7TUQ@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@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