android_kernel_samsung_msm8976/drivers/i2c/busses
Jean Delvare 4b2643d7d9 i2c: Fix the i2c_smbus_read_i2c_block_data() prototype
Let the drivers specify how many bytes they want to read with
i2c_smbus_read_i2c_block_data(). So far, the block count was
hard-coded to I2C_SMBUS_BLOCK_MAX (32), which did not make much sense.
Many driver authors complained about this before, and I believe it's
about time to fix it. Right now, authors have to do technically stupid
things, such as individual byte reads or full-fledged I2C messaging,
to work around the problem. We do not want to encourage that.

I even found that some bus drivers (e.g. i2c-amd8111) already
implemented I2C block read the "right" way, that is, they didn't
follow the old, broken standard. The fact that it was never noticed
before just shows how little i2c_smbus_read_i2c_block_data() was used,
which isn't that surprising given how broken its prototype was so far.

There are some obvious compatiblity considerations:
* This changes the i2c_smbus_read_i2c_block_data() prototype. Users
  outside the kernel tree will notice at compilation time, and will
  have to update their code.
* User-space has access to i2c_smbus_xfer() directly using i2c-dev, so
  the changed expectations would affect tools such as i2cdump. In order
  to preserve binary compatibility, we give I2C_SMBUS_I2C_BLOCK_DATA
  a new numeric value, and define I2C_SMBUS_I2C_BLOCK_BROKEN with the
  old numeric value. When i2c-dev receives a transaction with the
  old value, it can convert it to the new format on the fly.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-12 14:12:29 +02:00
..
i2c-acorn.c [ARM] Acorn: move the i2c bus driver into drivers/i2c 2007-03-04 20:40:50 +00:00
i2c-ali15x3.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-ali1535.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-ali1563.c i2c: Add IDs to adapters 2007-02-13 22:09:01 +01:00
i2c-amd756-s4882.c i2c: Declare more i2c_adapter parent devices 2007-02-13 22:09:03 +01:00
i2c-amd756.c Replace remaining references to "driverfs" with "sysfs". 2007-02-17 19:13:42 +01:00
i2c-amd8111.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-at91.c i2c-at91: compile fix (IS_ERR) 2007-05-10 09:26:53 -07:00
i2c-au1550.c
i2c-au1550.h
i2c-bfin-twi.c i2c: Blackfin Two Wire Interface driver 2007-05-01 23:26:32 +02:00
i2c-elektor.c i2c-elektor: Port to the new device driver model 2007-05-01 23:26:30 +02:00
i2c-gpio.c i2c: Bitbanging I2C bus driver using the GPIO API 2007-05-01 23:26:34 +02:00
i2c-hydra.c i2c: Discard the i2c algo del_bus wrappers 2006-12-10 21:21:33 +01:00
i2c-i801.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-i810.c i2c: Add IDs to adapters 2007-02-13 22:09:01 +01:00
i2c-ibm_iic.c i2c: Declare more i2c_adapter parent devices 2007-02-13 22:09:03 +01:00
i2c-ibm_iic.h
i2c-iop3xx.c Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2007-02-19 13:18:39 -08:00
i2c-iop3xx.h
i2c-isa.c i2c: Move i2c-isa-only exported symbol declarations 2007-05-01 23:26:32 +02:00
i2c-ixp4xx.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-ixp2000.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-mpc.c PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
i2c-mv64xxx.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-nforce2.c i2c-nforce2: Add support for the MCP61 and MCP65 2007-05-01 23:26:29 +02:00
i2c-ocores.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
i2c-omap.c i2c-omap: Switch to static adapter numbering 2007-05-01 23:26:32 +02:00
i2c-parport-light.c i2c-parport-light: Port to the new device driver model 2007-05-01 23:26:30 +02:00
i2c-parport.c layered parport code uses parport->dev 2007-05-08 11:15:05 -07:00
i2c-parport.h i2c-parport: Add support for One For All remote JP1 interface 2007-02-13 22:09:02 +01:00
i2c-pasemi.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-pca-isa.c Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2007-05-04 18:04:29 -07:00
i2c-piix4.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-pnx.c i2c-pnx: Fix interrupt handler, get rid of EARLY config option 2007-01-04 13:07:03 +01:00
i2c-powermac.c i2c: Fix the i2c_smbus_read_i2c_block_data() prototype 2007-07-12 14:12:29 +02:00
i2c-prosavage.c i2c: Discard the i2c algo del_bus wrappers 2006-12-10 21:21:33 +01:00
i2c-pxa.c [ARM] 4403/1: Make the PXA-I2C driver work with lockdep validator 2007-05-26 10:09:39 +01:00
i2c-rpx.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
i2c-s3c2410.c i2c-s3c2410: Fix build warning 2007-05-22 19:49:16 +02:00
i2c-savage4.c i2c: Add IDs to adapters 2007-02-13 22:09:01 +01:00
i2c-sibyte.c
i2c-simtec.c i2c: New Simtec I2C bus driver 2007-05-01 23:26:34 +02:00
i2c-sis96x.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-sis630.c Replace remaining references to "driverfs" with "sysfs". 2007-02-17 19:13:42 +01:00
i2c-sis5595.c Replace remaining references to "driverfs" with "sysfs". 2007-02-17 19:13:42 +01:00
i2c-stub.c
i2c-tiny-usb.c i2c-tiny-usb: Fix truncated adapter name 2007-05-22 19:49:16 +02:00
i2c-versatile.c i2c: New ARM Versatile/Realview bus driver 2006-12-10 21:21:32 +01:00
i2c-via.c Replace remaining references to "driverfs" with "sysfs". 2007-02-17 19:13:42 +01:00
i2c-viapro.c i2c: Fix the i2c_smbus_read_i2c_block_data() prototype 2007-07-12 14:12:29 +02:00
i2c-voodoo3.c i2c: Add IDs to adapters 2007-02-13 22:09:01 +01:00
Kconfig i2c: New i2c-tiny-usb bus driver 2007-05-01 23:26:35 +02:00
Makefile i2c: New i2c-tiny-usb bus driver 2007-05-01 23:26:35 +02:00
scx200_acb.c i2c: Fix the i2c_smbus_read_i2c_block_data() prototype 2007-07-12 14:12:29 +02:00
scx200_i2c.c i2c: Add IDs to adapters 2007-02-13 22:09:01 +01:00