Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c: Bus drivers don't have to support I2C_M_REV_DIR_ADDR

I2C bus drivers don't have to support I2C_M_REV_DIR_ADDR. It is a
deviation from the I2C specification, which only makes sense to
implement when really needed.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ben Dooks <ben-linux@fluff.org>

-11
-6
drivers/i2c/busses/i2c-iop3xx.c
··· 56 56 if (msg->flags & I2C_M_RD) 57 57 addr |= 1; 58 58 59 - /* 60 - * Read or Write? 61 - */ 62 - if (msg->flags & I2C_M_REV_DIR_ADDR) 63 - addr ^= 1; 64 - 65 59 return addr; 66 60 } 67 61
-3
drivers/i2c/busses/i2c-mv64xxx.c
··· 338 338 if (msg->flags & I2C_M_RD) 339 339 dir = 1; 340 340 341 - if (msg->flags & I2C_M_REV_DIR_ADDR) 342 - dir ^= 1; 343 - 344 341 if (msg->flags & I2C_M_TEN) { 345 342 drv_data->addr1 = 0xf0 | (((u32)msg->addr & 0x300) >> 7) | dir; 346 343 drv_data->addr2 = (u32)msg->addr & 0xff;
-2
drivers/i2c/busses/i2c-powermac.c
··· 162 162 return -EINVAL; 163 163 read = (msgs->flags & I2C_M_RD) != 0; 164 164 addrdir = (msgs->addr << 1) | read; 165 - if (msgs->flags & I2C_M_REV_DIR_ADDR) 166 - addrdir ^= 1; 167 165 168 166 rc = pmac_i2c_open(bus, 0); 169 167 if (rc) {