mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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>
This commit is contained in:
parent
194684e596
commit
da44bdeb95
3 changed files with 0 additions and 11 deletions
|
@ -56,12 +56,6 @@ iic_cook_addr(struct i2c_msg *msg)
|
||||||
if (msg->flags & I2C_M_RD)
|
if (msg->flags & I2C_M_RD)
|
||||||
addr |= 1;
|
addr |= 1;
|
||||||
|
|
||||||
/*
|
|
||||||
* Read or Write?
|
|
||||||
*/
|
|
||||||
if (msg->flags & I2C_M_REV_DIR_ADDR)
|
|
||||||
addr ^= 1;
|
|
||||||
|
|
||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -338,9 +338,6 @@ mv64xxx_i2c_prepare_for_io(struct mv64xxx_i2c_data *drv_data,
|
||||||
if (msg->flags & I2C_M_RD)
|
if (msg->flags & I2C_M_RD)
|
||||||
dir = 1;
|
dir = 1;
|
||||||
|
|
||||||
if (msg->flags & I2C_M_REV_DIR_ADDR)
|
|
||||||
dir ^= 1;
|
|
||||||
|
|
||||||
if (msg->flags & I2C_M_TEN) {
|
if (msg->flags & I2C_M_TEN) {
|
||||||
drv_data->addr1 = 0xf0 | (((u32)msg->addr & 0x300) >> 7) | dir;
|
drv_data->addr1 = 0xf0 | (((u32)msg->addr & 0x300) >> 7) | dir;
|
||||||
drv_data->addr2 = (u32)msg->addr & 0xff;
|
drv_data->addr2 = (u32)msg->addr & 0xff;
|
||||||
|
|
|
@ -162,8 +162,6 @@ static int i2c_powermac_master_xfer( struct i2c_adapter *adap,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
read = (msgs->flags & I2C_M_RD) != 0;
|
read = (msgs->flags & I2C_M_RD) != 0;
|
||||||
addrdir = (msgs->addr << 1) | read;
|
addrdir = (msgs->addr << 1) | read;
|
||||||
if (msgs->flags & I2C_M_REV_DIR_ADDR)
|
|
||||||
addrdir ^= 1;
|
|
||||||
|
|
||||||
rc = pmac_i2c_open(bus, 0);
|
rc = pmac_i2c_open(bus, 0);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
|
|
Loading…
Reference in a new issue