* Implementing a new driver
@ 2009-01-23 9:28 Alessio Sangalli
[not found] ` <49798DAD.1070100-+h0hele9I7BBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Alessio Sangalli @ 2009-01-23 9:28 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
Hi, I would like to implement a driver for an I2C interface we are
implementing in a chip.
This interface will be used to read DDC/EDID data from monitors.
I have never worked with the I2C subsystem (only lm-sensors as a user,
without deepening my knowledge on the actual drivers).
Can you give me a checklist of things to do for this task so that I can
get started for implementation?
Thanks
Alessio
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <49798DAD.1070100-+h0hele9I7BBDgjK7y7TUQ@public.gmane.org>]
* Re: Implementing a new driver [not found] ` <49798DAD.1070100-+h0hele9I7BBDgjK7y7TUQ@public.gmane.org> @ 2009-01-23 9:39 ` Jean Delvare [not found] ` <20090123103909.281770dd-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Jean Delvare @ 2009-01-23 9:39 UTC (permalink / raw) To: Alessio Sangalli; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA Hi Alessio, On Fri, 23 Jan 2009 01:28:13 -0800, Alessio Sangalli wrote: > Hi, I would like to implement a driver for an I2C interface we are > implementing in a chip. > > This interface will be used to read DDC/EDID data from monitors. > > I have never worked with the I2C subsystem (only lm-sensors as a user, > without deepening my knowledge on the actual drivers). > > Can you give me a checklist of things to do for this task so that I can > get started for implementation? 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 If you have more detailed questions while writing the code, post them on the list and we'll try to help. -- Jean Delvare ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20090123103909.281770dd-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>]
* Re: Implementing a new driver [not found] ` <20090123103909.281770dd-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org> @ 2009-01-23 17:31 ` Alessio Sangalli [not found] ` <4979FEF2.1090006-+h0hele9I7BBDgjK7y7TUQ@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Alessio Sangalli @ 2009-01-23 17:31 UTC (permalink / raw) To: Jean Delvare; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA 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? 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 bye! as ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <4979FEF2.1090006-+h0hele9I7BBDgjK7y7TUQ@public.gmane.org>]
* Re: Implementing a new driver [not found] ` <4979FEF2.1090006-+h0hele9I7BBDgjK7y7TUQ@public.gmane.org> @ 2009-01-23 20:25 ` Jean Delvare [not found] ` <20090123212506.7997e4ee-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Jean Delvare @ 2009-01-23 20:25 UTC (permalink / raw) To: Alessio Sangalli; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20090123212506.7997e4ee-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>]
* Re: Implementing a new driver [not found] ` <20090123212506.7997e4ee-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org> @ 2009-01-23 21:35 ` Alessio Sangalli [not found] ` <497A3820.2060405-+h0hele9I7BBDgjK7y7TUQ@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Alessio Sangalli @ 2009-01-23 21:35 UTC (permalink / raw) To: Jean Delvare; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA Jean Delvare wrote: > Examples of I2C chip drivers can be found under drivers/rtc (for RTC Thanks. I guess there is already a driver for DDC/EDID monitor parameters right? Should be a fairly common feature for graphic cards bye! as ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <497A3820.2060405-+h0hele9I7BBDgjK7y7TUQ@public.gmane.org>]
* Re: Implementing a new driver [not found] ` <497A3820.2060405-+h0hele9I7BBDgjK7y7TUQ@public.gmane.org> @ 2009-01-24 8:58 ` Jean Delvare 0 siblings, 0 replies; 6+ messages in thread From: Jean Delvare @ 2009-01-24 8:58 UTC (permalink / raw) To: Alessio Sangalli; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA Hi Alessio, On Fri, 23 Jan 2009 13:35:28 -0800, Alessio Sangalli wrote: > Jean Delvare wrote: > > > Examples of I2C chip drivers can be found under drivers/rtc (for RTC > > > Thanks. I guess there is already a driver for DDC/EDID monitor > parameters right? Should be a fairly common feature for graphic cards See drivers/video/fb_ddc.c and drivers/video/edid.h, presumably this is what you want for a framebuffer driver. For an X driver, the code handling DDC is in X itself. Or, for testing purpose, you can use the legacy "eeprom" driver together with the ddcmon and decode-edid scripts from i2c-tools [1]. [1] http://www.lm-sensors.org/wiki/I2CTools -- Jean Delvare ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-01-24 8:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
[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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox