Bugfixes for Axxia when it is a target and for PEC handling of stm32f7.
Plus, fixing an of node leak pattern in the mux subsystem. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmU8qEIACgkQFA3kzBSg Kba5Sg//UAZYYdy1UsnXm1CpaPDiuZ4vDbJNlkSl1gkU/qBQCUJgb+RgOt7yqJxN NwgpuO5bmN/9lcMhHsCSdd9iL4CiqpC0lUPMWqZ1bfJoygHhyk4Re/nQeT8S783F vRQNHxt6XJSC9MchwByujJ+cj1lmnXOSqOgr7wW4UQ7TMhSFAqszgYT+9eFUC+87 v4ZBsj1UNOaEGpq5fIWdSFWL0VjK+BPx1GCfG16c7qKWXt1jLSfIoVCAz4v92ldt DQLv8z/lnl+Fkx5xAJ7BI661fCjb8mxCbeD/vgqJV0w5+h6UEtxODUOonyJniUBB 3TnWYnYGV4NCJHxybfP5B273R1fNrE+THRx2qKXdZYn6gR/+u8cecpSARFDS3dD1 oyhyItbdW4d7ewsh8MFyO4MBOTGk6TswQyQjzo8GNjJts4NeiDur/EbCOvLqj4+5 15af+ltsuhWY9/SWcdpJC7Wcdm26PCUqsunwnSg0g7xfnWinjwvEeVEGT9bEKPXO lRKlV/8Iw29h+oRVaFjAENzUEkia2XPo4trdkTUTjflHMvZ4SEBP9lqQO7fBKxdb 4zoYhhWcE+rhqhEa+W5u0YEsXPBvpxuvxg9XNOYSswYmqQEO4kPpCdGFJFCbOr98 8Zzkt6NZGUcDegtXbTYnrrGhfEO7n7gC0wZfKEq9gOhc1iG8u6I= =bIWp -----END PGP SIGNATURE----- Merge tag 'i2c-for-6.6-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Bugfixes for Axxia when it is a target and for PEC handling of stm32f7. Plus, fix an OF node leak pattern in the mux subsystem" * tag 'i2c-for-6.6-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: stm32f7: Fix PEC handling in case of SMBUS transfers i2c: muxes: i2c-mux-gpmux: Use of_get_i2c_adapter_by_node() i2c: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node() i2c: muxes: i2c-mux-pinctrl: Use of_get_i2c_adapter_by_node() i2c: aspeed: Fix i2c bus hang in slave read
This commit is contained in:
commit
8907bfd2b1
@ -749,6 +749,8 @@ static void __aspeed_i2c_reg_slave(struct aspeed_i2c_bus *bus, u16 slave_addr)
|
||||
func_ctrl_reg_val = readl(bus->base + ASPEED_I2C_FUN_CTRL_REG);
|
||||
func_ctrl_reg_val |= ASPEED_I2CD_SLAVE_EN;
|
||||
writel(func_ctrl_reg_val, bus->base + ASPEED_I2C_FUN_CTRL_REG);
|
||||
|
||||
bus->slave_state = ASPEED_I2C_SLAVE_INACTIVE;
|
||||
}
|
||||
|
||||
static int aspeed_i2c_reg_slave(struct i2c_client *client)
|
||||
@ -765,7 +767,6 @@ static int aspeed_i2c_reg_slave(struct i2c_client *client)
|
||||
__aspeed_i2c_reg_slave(bus, client->addr);
|
||||
|
||||
bus->slave = client;
|
||||
bus->slave_state = ASPEED_I2C_SLAVE_INACTIVE;
|
||||
spin_unlock_irqrestore(&bus->lock, flags);
|
||||
|
||||
return 0;
|
||||
|
@ -1059,9 +1059,10 @@ static int stm32f7_i2c_smbus_xfer_msg(struct stm32f7_i2c_dev *i2c_dev,
|
||||
/* Configure PEC */
|
||||
if ((flags & I2C_CLIENT_PEC) && f7_msg->size != I2C_SMBUS_QUICK) {
|
||||
cr1 |= STM32F7_I2C_CR1_PECEN;
|
||||
cr2 |= STM32F7_I2C_CR2_PECBYTE;
|
||||
if (!f7_msg->read_write)
|
||||
if (!f7_msg->read_write) {
|
||||
cr2 |= STM32F7_I2C_CR2_PECBYTE;
|
||||
f7_msg->count++;
|
||||
}
|
||||
} else {
|
||||
cr1 &= ~STM32F7_I2C_CR1_PECEN;
|
||||
cr2 &= ~STM32F7_I2C_CR2_PECBYTE;
|
||||
@ -1149,8 +1150,10 @@ static void stm32f7_i2c_smbus_rep_start(struct stm32f7_i2c_dev *i2c_dev)
|
||||
f7_msg->stop = true;
|
||||
|
||||
/* Add one byte for PEC if needed */
|
||||
if (cr1 & STM32F7_I2C_CR1_PECEN)
|
||||
if (cr1 & STM32F7_I2C_CR1_PECEN) {
|
||||
cr2 |= STM32F7_I2C_CR2_PECBYTE;
|
||||
f7_msg->count++;
|
||||
}
|
||||
|
||||
/* Set number of bytes to be transferred */
|
||||
cr2 &= ~(STM32F7_I2C_CR2_NBYTES_MASK);
|
||||
|
@ -61,7 +61,7 @@ static int i2c_demux_activate_master(struct i2c_demux_pinctrl_priv *priv, u32 ne
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
adap = of_find_i2c_adapter_by_node(priv->chan[new_chan].parent_np);
|
||||
adap = of_get_i2c_adapter_by_node(priv->chan[new_chan].parent_np);
|
||||
if (!adap) {
|
||||
ret = -ENODEV;
|
||||
goto err_with_revert;
|
||||
|
@ -52,7 +52,7 @@ static struct i2c_adapter *mux_parent_adapter(struct device *dev)
|
||||
dev_err(dev, "Cannot parse i2c-parent\n");
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
parent = of_find_i2c_adapter_by_node(parent_np);
|
||||
parent = of_get_i2c_adapter_by_node(parent_np);
|
||||
of_node_put(parent_np);
|
||||
if (!parent)
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
|
@ -62,7 +62,7 @@ static struct i2c_adapter *i2c_mux_pinctrl_parent_adapter(struct device *dev)
|
||||
dev_err(dev, "Cannot parse i2c-parent\n");
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
parent = of_find_i2c_adapter_by_node(parent_np);
|
||||
parent = of_get_i2c_adapter_by_node(parent_np);
|
||||
of_node_put(parent_np);
|
||||
if (!parent)
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
|
Loading…
x
Reference in New Issue
Block a user