I2C / SMBus TODO list
Contact us if you have comments or wish to help.
------------------------------------------------

* SMBus 2.0
  SMBus 2.0 requires PEC and ARP. Implementation is only required
  to access an SMBus 2.0 client chip that requires address resolution.
  Here is a preliminary plan.
     PEC (Packet Error Checking):
	Adapters may or may not have hardware support for PEC.
	- Add capability flag for I2C_FUNC_SMBUS_HWPEC to i2c.h
	- Add message flag for I2C_M_HWPEC for i2c_msg to i2c.h
	- Add transaction types for PEC versions to i2c.h
	- Add PEC generation/calculation to i2c-core.c
	- In i2c-core.c, pass HWPEC flag to adapter if PEC transaction
	  is supported and adapter supports HWPEC.
	  If adapter does not support HWPEC, do software PEC: add
          PEC byte to writes (convert byte write to word write, etc.);
	  verify PEC and strip off on reads.
	- New return codes for bad PEC?
	- Add PEC support to the i2c-dev interface
     ARP (Address Resolution Protocol):
	Create a module i2c-arp which will serve as ARP Master.
	The design will be similar to "chip" drivers in lm_sensors.
	It will respond to address 0x61
	(the SMBus Device Default Address) on all i2c adapters.
	It will maintain UDID tables and the Used Address Pool.	
	It may export this data via /proc.
        Additional communication may be required between i2c-arp and
	the adapter driver.
	ARP communications are SMBus Block Reads and Writes with PEC.
	Note: "Notify ARP Master" at address 0x08 does not appear
	to be required. It would depend on Host-as-slave mode (see below),
	and some method to signal the i2c-arp module.

* 16-bit Register Addresses
  There is no support for 16-bit register addresses (used by serial
  eeproms larger than 16K bit, such as the Atmel 24C32) in i2c-core.c
  or i2c-dev.c.
  Emulation support is required; the Intel i801, for example,
  supports a 16-bit address i2c block read (see i2c-i801 in lm_sensors).
  General 16-bit support for all transaction types will require
  many changes. Support for 16-bit address block
  accesses only can be added more easily, and the
  functionality #defines I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 and
  I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2 have been added to i2c.h.
  This may be enough to begin with for these new eeproms.
  The emulation layer has not been implemented.
  There is an alternate proposal from Wolfgang Denk <wd@denx.de>
  for a driver 'i2c-simple' that supports a generalized address
  length of 1-4 bytes and accesses via ioctls on /dev.

* Host-as-slave mode in i2c adapters may need to be integrated
  with the adapter host code, because the lm_sensors-type chip driver
  architecture is not well suited to implementing a chip slave,
  the slave mode will require locking with the master mode, and
  specialized commmunication such as "Notify ARP Master".
  Adapters may respond to one or more host-as-slave addresses. The
  functionality bits and the rest of the API will have to be extended
  to support slaves embedded in host adapters.

* 64-bit functionality values may be required to represent all
  the new capabilities described above.

* Emulation layer i2c block reads are fixed at 32 bytes and there is
  currently no method to change it. You cannot, for example,
  read an entire serial eeprom with a single block read, or read
  only the 7 bytes in a clock chip.

* Enhance mkpatch so it will patch additional drivers such as
  the Power PC modules to 2.4 kernels that support it. Currently
  these drivers are not patched because it would break 2.2 kernels.

* i2c-pcf-epp.h is missing, so i2c-pcf-epp.c can't be compiled.

* i2c version strings were added to i2c.h but they are used only
  for printk's. Integers would be better for use in preprocessor
  directives for conditional compiles.

* Alternative i2c implementations in kernel to be converted to
  the standard i2c implementation in this package.
  Most if not all of these are bit-banging algorithms,
  for which the official driver is drivers/i2c/i2c-algo-bit.c.
  For a good example of using i2c-algo-bit, see drivers/acorn/char/i2c.c.

	drivers/media/video/i2c-old.c	Used by:
		drivers/media/video/buz.c
		drivers/media/video/i2c-parport.c
		drivers/media/video/saa7110.c
		drivers/media/video/saa7111.c
		drivers/media/video/saa7185.c
		drivers/media/video/stradis.c
		drivers/media/video/zr36120.c
		drivers/media/video/zr36120_i2c.c
	arch/ppc/mbxboot/iic.c
	drivers/media/radio/radio-trust.c
	drivers/media/video/pms.c
	drivers/media/video/stradis.c
	drivers/net/acenic.c
	drivers/net/sk98lin/ski2c.c
	drivers/sbus/char/envctrl.c
	drivers/sbus/char/vfc_i2c.c
	drivers/scsi/cpqfcTSi2c.c
	drivers/usb/ov511.c

* Make sure the /proc registration code in i2c-core uses the same debugging
  code and other conventions as the rest of the file.

* Make especially i2c-core SMP-safe. This means: locks around all global
  variable access, especially during (de)registration activity.

* Check debugging levels in all modules are sane.

* linux/Documentation/devices.txt lists i2c0, i2c1 etc. instead of i2c-0, i2c-1

* At least the bit-lp and bit-velle modules do no detection on loading;
  ask Simon whether this is possible to add.

* Correct all module locking code (see Keith Owens' email about this)

