Skip to content

Commit 005f6f3

Browse files
committed
Merge tag 'i2c-for-6.8-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang: "Two patches from Heiner for the i801 are targeting muxes discovered while working on some other features. Essentially, there is a reordering when adding optional slaves and proper cleanup upon registering a mux device. Christophe fixes the exit path in the wmt driver that was leaving the clocks hanging, and the last fix from Tommy avoids false error reports in IRQ" * tag 'i2c-for-6.8-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: aspeed: Fix the dummy irq expected print i2c: wmt: Fix an error handling path in wmt_i2c_probe() i2c: i801: Avoid potential double call to gpiod_remove_lookup_table i2c: i801: Fix using mux_pdev before it's set
2 parents 66695e7 + ac168d6 commit 005f6f3

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

drivers/i2c/busses/i2c-aspeed.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ static u32 aspeed_i2c_master_irq(struct aspeed_i2c_bus *bus, u32 irq_status)
445445
irq_status);
446446
irq_handled |= (irq_status & ASPEED_I2CD_INTR_MASTER_ERRORS);
447447
if (bus->master_state != ASPEED_I2C_MASTER_INACTIVE) {
448+
irq_handled = irq_status;
448449
bus->cmd_err = ret;
449450
bus->master_state = ASPEED_I2C_MASTER_INACTIVE;
450451
goto out_complete;

drivers/i2c/busses/i2c-i801.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,7 +1416,6 @@ static void i801_add_mux(struct i801_priv *priv)
14161416
lookup->table[i] = GPIO_LOOKUP(mux_config->gpio_chip,
14171417
mux_config->gpios[i], "mux", 0);
14181418
gpiod_add_lookup_table(lookup);
1419-
priv->lookup = lookup;
14201419

14211420
/*
14221421
* Register the mux device, we use PLATFORM_DEVID_NONE here
@@ -1430,7 +1429,10 @@ static void i801_add_mux(struct i801_priv *priv)
14301429
sizeof(struct i2c_mux_gpio_platform_data));
14311430
if (IS_ERR(priv->mux_pdev)) {
14321431
gpiod_remove_lookup_table(lookup);
1432+
devm_kfree(dev, lookup);
14331433
dev_err(dev, "Failed to register i2c-mux-gpio device\n");
1434+
} else {
1435+
priv->lookup = lookup;
14341436
}
14351437
}
14361438

@@ -1742,9 +1744,9 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
17421744

17431745
i801_enable_host_notify(&priv->adapter);
17441746

1745-
i801_probe_optional_slaves(priv);
17461747
/* We ignore errors - multiplexing is optional */
17471748
i801_add_mux(priv);
1749+
i801_probe_optional_slaves(priv);
17481750

17491751
pci_set_drvdata(dev, priv);
17501752

drivers/i2c/busses/i2c-wmt.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,11 +378,15 @@ static int wmt_i2c_probe(struct platform_device *pdev)
378378

379379
err = i2c_add_adapter(adap);
380380
if (err)
381-
return err;
381+
goto err_disable_clk;
382382

383383
platform_set_drvdata(pdev, i2c_dev);
384384

385385
return 0;
386+
387+
err_disable_clk:
388+
clk_disable_unprepare(i2c_dev->clk);
389+
return err;
386390
}
387391

388392
static void wmt_i2c_remove(struct platform_device *pdev)

0 commit comments

Comments
 (0)