RE: Looking for help writing an i2c client for i2c-core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you both for your responses.  The link to the kernel wiki was also
worthwhile.

In my all too quick research into writing a Linux Driver Model driver,
somehow I missed the step of calling i2c_register_board_info() in the kernel
startup code.  I could register my driver with the i2c_core, but since there
was not i2c_board_info entry nothing else happened in my driver.  No that I
have added the i2c_register_board_info call, my driver callbacks are called
and I can get back to writing device driver code again.

When my schedule frees up some, I hope I can write up description of the
steps I took to get a new Linux Driver Model I2C device driver written.

Thank you for your help,
Brian



-----Original Message-----
From: Jean Delvare [mailto:khali@xxxxxxxxxxxx] 
Sent: Wednesday, June 24, 2009 1:54 AM
To: Brian Tompson
Cc: linux-i2c@xxxxxxxxxxxxxxx
Subject: Re: Looking for help writing an i2c client for i2c-core

On Mon, 22 Jun 2009 21:02:40 -0700, Brian Tompson wrote:
> In my i2c searches I stumbled upon this list.  I hope this message is
> appropriate here.
> 
> I am trying to write an i2c client driver for the i2c core, using the
Linux
> Driver Model (new style driver).
> I am looking for a list of steps I need to take to accomplish this.
> 
> I have been looking for a list something like this:
> 
> Load this i2c-core structure with this information.
> Call this i2c-core function to register your driver.
> Call this i2c-core function to connect to the adapter or bus or algorithm
> (don't know which)
> Write a probe function that does this.
> Write a remove function that does this.
> Call this i2c-core function to write raw i2c data (not SMBus) to your
device
> Call this i2c-core function to read raw i2c data from your device.
> Call this i2c-core function to disconnect from the adapter or bus or
> algorithm
> 
> Or whatever the actual steps should be.
> 
> I have started writing a driver and have used i2c_add_driver() to register
> my driver with i2c_core.
> Now what?  Probe, attach, send, remove, ...?  Is there a resource
available
> that simply lays out these facts?  I think a resource like that would be
> very useful to someone trying to develop a client driver for the i2c-core
> using the Linux Driver Model.

Have you read Documentation/i2c/writing-clients already? That would be
a very good start. Or more generally, the developer's documentation
section on http://i2c.wiki.kernel.org/

-- 
Jean Delvare

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux