Skip to content

Commit

Permalink
Merge tag 'i2c-for-6.8-rc8' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/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
  • Loading branch information
Linus Torvalds committed Mar 9, 2024
2 parents 66695e7 + ac168d6 commit 005f6f3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-aspeed.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ static u32 aspeed_i2c_master_irq(struct aspeed_i2c_bus *bus, u32 irq_status)
irq_status);
irq_handled |= (irq_status & ASPEED_I2CD_INTR_MASTER_ERRORS);
if (bus->master_state != ASPEED_I2C_MASTER_INACTIVE) {
irq_handled = irq_status;
bus->cmd_err = ret;
bus->master_state = ASPEED_I2C_MASTER_INACTIVE;
goto out_complete;
Expand Down
6 changes: 4 additions & 2 deletions drivers/i2c/busses/i2c-i801.c
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,6 @@ static void i801_add_mux(struct i801_priv *priv)
lookup->table[i] = GPIO_LOOKUP(mux_config->gpio_chip,
mux_config->gpios[i], "mux", 0);
gpiod_add_lookup_table(lookup);
priv->lookup = lookup;

/*
* Register the mux device, we use PLATFORM_DEVID_NONE here
Expand All @@ -1430,7 +1429,10 @@ static void i801_add_mux(struct i801_priv *priv)
sizeof(struct i2c_mux_gpio_platform_data));
if (IS_ERR(priv->mux_pdev)) {
gpiod_remove_lookup_table(lookup);
devm_kfree(dev, lookup);
dev_err(dev, "Failed to register i2c-mux-gpio device\n");
} else {
priv->lookup = lookup;
}
}

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

i801_enable_host_notify(&priv->adapter);

i801_probe_optional_slaves(priv);
/* We ignore errors - multiplexing is optional */
i801_add_mux(priv);
i801_probe_optional_slaves(priv);

pci_set_drvdata(dev, priv);

Expand Down
6 changes: 5 additions & 1 deletion drivers/i2c/busses/i2c-wmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,11 +378,15 @@ static int wmt_i2c_probe(struct platform_device *pdev)

err = i2c_add_adapter(adap);
if (err)
return err;
goto err_disable_clk;

platform_set_drvdata(pdev, i2c_dev);

return 0;

err_disable_clk:
clk_disable_unprepare(i2c_dev->clk);
return err;
}

static void wmt_i2c_remove(struct platform_device *pdev)
Expand Down

0 comments on commit 005f6f3

Please sign in to comment.