Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply pending patches that are based on newer code already present upstream.
This commit is contained in:
@@ -193,7 +193,13 @@ static void bfin_twi_handle_interrupt(struct bfin_twi_iface *iface,
|
||||
return;
|
||||
}
|
||||
if (twi_int_status & MCOMP) {
|
||||
if (iface->cur_mode == TWI_I2C_MODE_COMBINED) {
|
||||
if ((read_MASTER_CTL(iface) & MEN) == 0 &&
|
||||
(iface->cur_mode == TWI_I2C_MODE_REPEAT ||
|
||||
iface->cur_mode == TWI_I2C_MODE_COMBINED)) {
|
||||
iface->result = -1;
|
||||
write_INT_MASK(iface, 0);
|
||||
write_MASTER_CTL(iface, 0);
|
||||
} else if (iface->cur_mode == TWI_I2C_MODE_COMBINED) {
|
||||
if (iface->readNum == 0) {
|
||||
/* set the read number to 1 and ask for manual
|
||||
* stop in block combine mode
|
||||
|
@@ -248,12 +248,12 @@ static inline int is_msgend(struct s3c24xx_i2c *i2c)
|
||||
return i2c->msg_ptr >= i2c->msg->len;
|
||||
}
|
||||
|
||||
/* i2s_s3c_irq_nextbyte
|
||||
/* i2c_s3c_irq_nextbyte
|
||||
*
|
||||
* process an interrupt and work out what to do
|
||||
*/
|
||||
|
||||
static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
|
||||
static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
|
||||
{
|
||||
unsigned long tmp;
|
||||
unsigned char byte;
|
||||
@@ -264,7 +264,6 @@ static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
|
||||
case STATE_IDLE:
|
||||
dev_err(i2c->dev, "%s: called in STATE_IDLE\n", __func__);
|
||||
goto out;
|
||||
break;
|
||||
|
||||
case STATE_STOP:
|
||||
dev_err(i2c->dev, "%s: called in STATE_STOP\n", __func__);
|
||||
@@ -444,7 +443,7 @@ static irqreturn_t s3c24xx_i2c_irq(int irqno, void *dev_id)
|
||||
/* pretty much this leaves us with the fact that we've
|
||||
* transmitted or received whatever byte we last sent */
|
||||
|
||||
i2s_s3c_irq_nextbyte(i2c, status);
|
||||
i2c_s3c_irq_nextbyte(i2c, status);
|
||||
|
||||
out:
|
||||
return IRQ_HANDLED;
|
||||
|
@@ -234,7 +234,7 @@ static int taos_connect(struct serio *serio, struct serio_driver *drv)
|
||||
|
||||
if (taos->state != TAOS_STATE_IDLE) {
|
||||
err = -ENODEV;
|
||||
dev_dbg(&serio->dev, "TAOS EVM reset failed (state=%d, "
|
||||
dev_err(&serio->dev, "TAOS EVM reset failed (state=%d, "
|
||||
"pos=%d)\n", taos->state, taos->pos);
|
||||
goto exit_close;
|
||||
}
|
||||
@@ -255,7 +255,7 @@ static int taos_connect(struct serio *serio, struct serio_driver *drv)
|
||||
msecs_to_jiffies(250));
|
||||
if (taos->state != TAOS_STATE_IDLE) {
|
||||
err = -ENODEV;
|
||||
dev_err(&adapter->dev, "Echo off failed "
|
||||
dev_err(&serio->dev, "TAOS EVM echo off failed "
|
||||
"(state=%d)\n", taos->state);
|
||||
goto exit_close;
|
||||
}
|
||||
@@ -263,7 +263,7 @@ static int taos_connect(struct serio *serio, struct serio_driver *drv)
|
||||
err = i2c_add_adapter(adapter);
|
||||
if (err)
|
||||
goto exit_close;
|
||||
dev_dbg(&serio->dev, "Connected to TAOS EVM\n");
|
||||
dev_info(&serio->dev, "Connected to TAOS EVM\n");
|
||||
|
||||
taos->client = taos_instantiate_device(adapter);
|
||||
return 0;
|
||||
@@ -288,7 +288,7 @@ static void taos_disconnect(struct serio *serio)
|
||||
serio_set_drvdata(serio, NULL);
|
||||
kfree(taos);
|
||||
|
||||
dev_dbg(&serio->dev, "Disconnected from TAOS EVM\n");
|
||||
dev_info(&serio->dev, "Disconnected from TAOS EVM\n");
|
||||
}
|
||||
|
||||
static struct serio_device_id taos_serio_ids[] = {
|
||||
|
@@ -40,8 +40,10 @@
|
||||
#define I2C_CNFG_NEW_MASTER_FSM (1<<11)
|
||||
#define I2C_STATUS 0x01C
|
||||
#define I2C_SL_CNFG 0x020
|
||||
#define I2C_SL_CNFG_NACK (1<<1)
|
||||
#define I2C_SL_CNFG_NEWSL (1<<2)
|
||||
#define I2C_SL_ADDR1 0x02c
|
||||
#define I2C_SL_ADDR2 0x030
|
||||
#define I2C_TX_FIFO 0x050
|
||||
#define I2C_RX_FIFO 0x054
|
||||
#define I2C_PACKET_TRANSFER_STATUS 0x058
|
||||
@@ -337,7 +339,11 @@ static int tegra_i2c_init(struct tegra_i2c_dev *i2c_dev)
|
||||
|
||||
if (!i2c_dev->is_dvc) {
|
||||
u32 sl_cfg = i2c_readl(i2c_dev, I2C_SL_CNFG);
|
||||
i2c_writel(i2c_dev, sl_cfg | I2C_SL_CNFG_NEWSL, I2C_SL_CNFG);
|
||||
sl_cfg |= I2C_SL_CNFG_NACK | I2C_SL_CNFG_NEWSL;
|
||||
i2c_writel(i2c_dev, sl_cfg, I2C_SL_CNFG);
|
||||
i2c_writel(i2c_dev, 0xfc, I2C_SL_ADDR1);
|
||||
i2c_writel(i2c_dev, 0x00, I2C_SL_ADDR2);
|
||||
|
||||
}
|
||||
|
||||
val = 7 << I2C_FIFO_CONTROL_TX_TRIG_SHIFT |
|
||||
|
@@ -201,10 +201,11 @@ static int pca954x_probe(struct i2c_client *client,
|
||||
|
||||
i2c_set_clientdata(client, data);
|
||||
|
||||
/* Read the mux register at addr to verify
|
||||
* that the mux is in fact present.
|
||||
/* Write the mux register at addr to verify
|
||||
* that the mux is in fact present. This also
|
||||
* initializes the mux to disconnected state.
|
||||
*/
|
||||
if (i2c_smbus_read_byte(client) < 0) {
|
||||
if (i2c_smbus_write_byte(client, 0) < 0) {
|
||||
dev_warn(&client->dev, "probe failed\n");
|
||||
goto exit_free;
|
||||
}
|
||||
|
Reference in New Issue
Block a user