mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-12-03 11:39:08 +00:00
tps6598x: Get rid of TPS_WRITE_DELAY
This was a poor workaround for the broken i2c code. Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
d20a79435c
commit
675f11dc59
1 changed files with 2 additions and 6 deletions
|
@ -16,9 +16,6 @@
|
|||
#define TPS_REG_POWER_STATE 0x20
|
||||
#define TPS_CMD_INVALID 0x21434d44 // !CMD
|
||||
|
||||
// 80 ms is not enough
|
||||
#define TPS_WRITE_DELAY 120
|
||||
|
||||
struct tps6598x_dev {
|
||||
i2c_dev_t *i2c;
|
||||
u8 addr;
|
||||
|
@ -102,13 +99,12 @@ int tps6598x_disable_irqs(tps6598x_dev_t *dev, tps6598x_irq_state_t *state)
|
|||
printf("tps6598x: writing TPS_REG_INT_CLEAR1 failed, written: %d\n", written);
|
||||
return -1;
|
||||
}
|
||||
udelay(TPS_WRITE_DELAY);
|
||||
written = i2c_smbus_write(dev->i2c, dev->addr, TPS_REG_INT_MASK1, zeros, sizeof(zeros));
|
||||
if (written != sizeof(ones)) {
|
||||
printf("tps6598x: writing TPS_REG_INT_MASK1 failed, written: %d\n", written);
|
||||
return -1;
|
||||
}
|
||||
udelay(TPS_WRITE_DELAY);
|
||||
|
||||
#ifdef DEBUG
|
||||
u8 tmp[CD3218B12_IRQ_WIDTH] = {0x00};
|
||||
read = i2c_smbus_read(dev->i2c, dev->addr, TPS_REG_INT_MASK1, tmp, CD3218B12_IRQ_WIDTH);
|
||||
|
@ -133,7 +129,7 @@ int tps6598x_restore_irqs(tps6598x_dev_t *dev, tps6598x_irq_state_t *state)
|
|||
printf("tps6598x: restoring TPS_REG_INT_MASK1 failed\n");
|
||||
return -1;
|
||||
}
|
||||
udelay(TPS_WRITE_DELAY);
|
||||
|
||||
#ifdef DEBUG
|
||||
int read;
|
||||
u8 tmp[CD3218B12_IRQ_WIDTH];
|
||||
|
|
Loading…
Reference in a new issue