Merge tag 'i2c-for-6.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang: "i2c-host fixes for v6.12-rc7 (from Andi): - Fix designware incorrect behavior when concluding a transmission - Fix Mule multiplexer error value evaluation" * tag 'i2c-for-6.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: designware: do not hold SCL low when I2C_DYNAMIC_TAR_UPDATE is not set i2c: muxes: Fix return value check in mule_i2c_mux_probe()
This commit is contained in:
@@ -524,7 +524,7 @@ err_release_lock:
|
|||||||
void __i2c_dw_disable(struct dw_i2c_dev *dev)
|
void __i2c_dw_disable(struct dw_i2c_dev *dev)
|
||||||
{
|
{
|
||||||
struct i2c_timings *t = &dev->timings;
|
struct i2c_timings *t = &dev->timings;
|
||||||
unsigned int raw_intr_stats;
|
unsigned int raw_intr_stats, ic_stats;
|
||||||
unsigned int enable;
|
unsigned int enable;
|
||||||
int timeout = 100;
|
int timeout = 100;
|
||||||
bool abort_needed;
|
bool abort_needed;
|
||||||
@@ -532,9 +532,11 @@ void __i2c_dw_disable(struct dw_i2c_dev *dev)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
regmap_read(dev->map, DW_IC_RAW_INTR_STAT, &raw_intr_stats);
|
regmap_read(dev->map, DW_IC_RAW_INTR_STAT, &raw_intr_stats);
|
||||||
|
regmap_read(dev->map, DW_IC_STATUS, &ic_stats);
|
||||||
regmap_read(dev->map, DW_IC_ENABLE, &enable);
|
regmap_read(dev->map, DW_IC_ENABLE, &enable);
|
||||||
|
|
||||||
abort_needed = raw_intr_stats & DW_IC_INTR_MST_ON_HOLD;
|
abort_needed = (raw_intr_stats & DW_IC_INTR_MST_ON_HOLD) ||
|
||||||
|
(ic_stats & DW_IC_STATUS_MASTER_HOLD_TX_FIFO_EMPTY);
|
||||||
if (abort_needed) {
|
if (abort_needed) {
|
||||||
if (!(enable & DW_IC_ENABLE_ENABLE)) {
|
if (!(enable & DW_IC_ENABLE_ENABLE)) {
|
||||||
regmap_write(dev->map, DW_IC_ENABLE, DW_IC_ENABLE_ENABLE);
|
regmap_write(dev->map, DW_IC_ENABLE, DW_IC_ENABLE_ENABLE);
|
||||||
|
|||||||
@@ -116,6 +116,7 @@
|
|||||||
#define DW_IC_STATUS_RFNE BIT(3)
|
#define DW_IC_STATUS_RFNE BIT(3)
|
||||||
#define DW_IC_STATUS_MASTER_ACTIVITY BIT(5)
|
#define DW_IC_STATUS_MASTER_ACTIVITY BIT(5)
|
||||||
#define DW_IC_STATUS_SLAVE_ACTIVITY BIT(6)
|
#define DW_IC_STATUS_SLAVE_ACTIVITY BIT(6)
|
||||||
|
#define DW_IC_STATUS_MASTER_HOLD_TX_FIFO_EMPTY BIT(7)
|
||||||
|
|
||||||
#define DW_IC_SDA_HOLD_RX_SHIFT 16
|
#define DW_IC_SDA_HOLD_RX_SHIFT 16
|
||||||
#define DW_IC_SDA_HOLD_RX_MASK GENMASK(23, 16)
|
#define DW_IC_SDA_HOLD_RX_MASK GENMASK(23, 16)
|
||||||
|
|||||||
@@ -66,8 +66,8 @@ static int mule_i2c_mux_probe(struct platform_device *pdev)
|
|||||||
priv = i2c_mux_priv(muxc);
|
priv = i2c_mux_priv(muxc);
|
||||||
|
|
||||||
priv->regmap = dev_get_regmap(mux_dev->parent, NULL);
|
priv->regmap = dev_get_regmap(mux_dev->parent, NULL);
|
||||||
if (IS_ERR(priv->regmap))
|
if (!priv->regmap)
|
||||||
return dev_err_probe(mux_dev, PTR_ERR(priv->regmap),
|
return dev_err_probe(mux_dev, -ENODEV,
|
||||||
"No parent i2c register map\n");
|
"No parent i2c register map\n");
|
||||||
|
|
||||||
platform_set_drvdata(pdev, muxc);
|
platform_set_drvdata(pdev, muxc);
|
||||||
|
|||||||
Reference in New Issue
Block a user