lkml.org 
[lkml]   [1999]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: I2C support
Date
Jeff Garzik wrote:
> It's pretty basic, but
>
> drivers/char/i2c.c
> include/linux/i2c.h

A bit too basic in some ways. Here are a couple of suggestions for
improvement:

1. Make i2c_attach_device and i2c_register_bus call i2c_write instead
of the the i2c_start, i2c_sendbyte, i2c_stop sequence. This allows
the bus driver to take control of any line waggling that needs to be
done.

2. Implement variations of the i2c_read and i2c_write functions and the
corresponding bus driver vectors that can deal with messages of
arbitrary length.

The main problem with 2 is that it is blocking. There is hardware that
allow sending and receiving of messages over an I2C bus using DMA and
interrupts (e.g. the MPC8xx PowerPC chips). It would be nice if this
sort of thing could be supported by a generic kernel I2C interface.

--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:1.707 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site