linux/drivers
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
..
acorn [PATCH] fix request->cmd == INT cases 2007-07-10 08:03:34 +02:00
acpi ACPI: fix acpi_osi=!Linux 2007-07-02 21:06:48 -07:00
amba
ata [libata] sata_mv: print out additional chip info during probe 2007-07-09 12:29:31 -04:00
atm potential compiler error, irqfunc caller sites update 2007-07-06 10:23:43 -07:00
auxdisplay
base
block Merge branch 'splice-2.6.23' of git://git.kernel.dk/data/git/linux-2.6-block 2007-07-10 13:51:06 -07:00
bluetooth
cdrom Remove legacy CDROM drivers 2007-07-10 08:03:34 +02:00
char sx: switch subven and subid values 2007-07-10 17:51:13 -07:00
clocksource
connector
cpufreq
crypto
dio
dma IOATDMA: fix section mismatches 2007-06-28 11:34:53 -07:00
edac
eisa
fc4
firewire firewire: fw-sbp2: fix DMA mapping of management ORBs 2007-07-10 00:07:49 +02:00
firmware
hid Merge branches 'debug-module-param' and 'upstream' into for-linus 2007-07-09 14:23:37 +02:00
hwmon hwmon/coretemp: fix a broken error path 2007-06-24 08:59:10 -07:00
i2c i2c: Fix the i2c_smbus_read_i2c_block_data() prototype 2007-07-12 14:12:29 +02:00
ide [PATCH] fix request->cmd == INT cases 2007-07-10 08:03:34 +02:00
ieee1394 ieee1394: remove old isochronous ABI 2007-07-10 00:07:41 +02:00
infiniband IPoIB/cm: Partial error clean up unmaps wrong address 2007-07-02 20:48:31 -07:00
input Input: tsdev - fix broken usec-to-millisecs conversion 2007-07-10 00:43:06 -04:00
isdn
kvm KVM: Prevent guest fpu state from leaking into the host 2007-06-15 12:30:59 +03:00
leds
macintosh i2c: Fix the i2c_smbus_read_i2c_block_data() prototype 2007-07-12 14:12:29 +02:00
mca
md md: fix bug in error handling during raid1 repair 2007-06-16 13:16:15 -07:00
media V4L/DVB (5822): Fix the return value in ttpci_budget_init() 2007-07-03 15:11:21 -03:00
message
mfd SM501: Check SM501 ID register on initialisation 2007-06-24 08:59:11 -07:00
misc eeprom_93cx6: shorten pulse timing to match spec (bis) 2007-07-10 12:41:09 -04:00
mmc mmc: at91_mci: fix hanging and rework to match flowcharts 2007-07-09 21:29:07 +02:00
mtd [MIPS] remove LASAT Networks platforms support 2007-07-10 17:33:04 +01:00
net Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2007-07-10 14:56:22 -07:00
nubus
oprofile
parisc [PARISC] stop lcd driver from stripping initial whitespace 2007-06-21 17:46:19 -04:00
parport
pci
pcmcia
pnp PNP SMCf010 quirk: work around Toshiba Portege 4000 ACPI issues 2007-07-06 10:23:43 -07:00
power [BATTERY] One Laptop Per Child power/battery driver 2007-07-10 11:28:22 +01:00
ps3
rapidio
rtc i2c: Delete outdated x1205 driver documentation 2007-07-12 14:12:28 +02:00
s390 [S390] vmlogrdr function annotation. 2007-07-10 11:24:54 +02:00
sbus
scsi scsi disk help file is not complete 2007-07-02 10:12:34 -04:00
serial PCMCIA-NETDEV : add new ID of lan&modem multifunction card 2007-07-08 22:16:39 -04:00
sh
sn
spi Blackfin SPI driver: fix bug SPI DMA incomplete transmission 2007-06-11 17:34:17 +08:00
tc [MIPS] DEC: Fix modpost warning. 2007-07-10 17:33:05 +01:00
telephony
usb potential compiler error, irqfunc caller sites update 2007-07-06 10:23:43 -07:00
video fix section mismatch in chipsfb 2007-06-28 11:34:54 -07:00
w1 [BATTERY] ds2760 W1 slave 2007-07-10 11:28:31 +01:00
zorro
Kconfig Merge git://git.infradead.org/~dwmw2/battery-2.6 2007-07-10 14:47:59 -07:00
Makefile [BATTERY] Universal power supply class (was: battery class) 2007-07-10 11:25:44 +01:00