« Return to Thread: i2c changes in 2.6.15+

Re: i2c changes in 2.6.15+

by Nicolas Boullis :: Rate this Message:

Reply to Author | View in Thread

On Sat, Jan 21, 2006 at 07:01:02PM +0200, Ville Skyttä wrote:

> Attached is an informational (not meant to be applied as-is, but maybe
> good for testing) patch for i2c changes in 2.6.15 and later kernels.
> Compile-tested only on the latest FC5test2/Rawhide 2.6.16-rc1-something
> kernel (which reports itself as 2.6.15, but that's outside of the scope
> of this patch and not taken into account).  I haven't actually used the
> patched modules with any kernel.  The patch also removes the
> EM8300_I2C_FORCE_*_API flags for clarity, maybe they can be restored by
> someone who groks the code and i2c versions better.
>
> Notes:
>
> i2c_driver.flags is gone in 2.6.16, apparently without a replacement.
>
> i2c_driver.{name,owner} have moved to i2c_driver.driver.{name,owner} in
> 2.6.16.  That change could apparently be done on some earlier kernels
> too; at least many in-kernel drivers were changed like that in 2.6.15.
> This patch however does that only for >= 2.6.16.
>
> Documentation/i2c/writing-clients was changed in 2.6.15 to say this
> about i2c_driver.name:
> ---
> The name field must match the driver name, including the case. It must
> not contain spaces, and may be up to 31 characters long.
> ---
> For simplicity, this patch changes the name accordingly for all kernel
> versions.

That sounds sane.


Anyway, a few comments about your patch:
   - as far as I can see no in-kernel driver sets the .driver.owner
     value; it is set in 2.6.16's i2c_add_driver
   - when LINUX_VERSION_CODE < KERNEL_VERSION(2,5,54), your patch
     removes the .name and .flags from the structure, which is certainly
     unexpected... ;-)

I just made the corresponding changes. Please see (and try) the attached
patch.

Ville, thanks a lot for investigating this.


Cheers,

Nicolas


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

 « Return to Thread: i2c changes in 2.6.15+