Skip to content

Commit

Permalink
Merge tag 'i2c-for-6.5-rc1' 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 updates from Wolfram Sang:

 - I2C has now a co-maintainer taking care of the host drivers. Welcome
   Andi Shyti and have fun!

 - platform remove callback converted to return void in drivers

 - simplify drivers by using devm_clk_get_enabled()

 - introduce i2c_get_match_data() to avoid more boilerplate code
   (especially since the core stopped delivering an i2c_device_id)

 - and the usual bunch of driver updates

* tag 'i2c-for-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (38 commits)
  i2c: uniphier: Use devm_clk_get_enabled()
  i2c: uniphier-f: Use devm_clk_get_enabled()
  i2c: owl: Use devm_clk_get_enabled()
  i2c: lpc2k: Use devm_clk_get_enabled()
  i2c: hix5hd2: Use devm_clk_get_enabled()
  i2c: sun6i-p2wi: Use devm_clk_get_enabled()
  i2c: pasemi-platform: Use devm_clk_get_enabled()
  i2c: mt7621: Use devm_clk_get_enabled()
  i2c: xiic: Use devm_clk_get_enabled()
  i2c: davinci: Use platform table macro over module_alias
  i2c: ocores: use devm_ managed clks
  i2c: nomadik: Use dev_err_probe() whenever possible
  i2c: nomadik: Use devm_clk_get_enabled()
  i2c: nomadik: Remove unnecessary goto label
  usb: typec: ucsi: Mark dGPUs as DEVICE scope
  i2c: wmt: Use devm_platform_get_and_ioremap_resource()
  i2c: versatile: Use devm_platform_get_and_ioremap_resource()
  i2c: hix5hd2: Add I2C_M_STOP flag support for i2c-hix5hd2 driver.
  i2c: mpc: Use of_property_read_reg() to parse "reg"
  i2c: imx-lpi2c: Don't open-code DIV_ROUND_UP
  ...
  • Loading branch information
Linus Torvalds committed Jul 2, 2023
2 parents ed77ac9 + 6fb605c commit 5def00c
Show file tree
Hide file tree
Showing 103 changed files with 585 additions and 727 deletions.
2 changes: 1 addition & 1 deletion Documentation/i2c/busses/i2c-i801.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Supported adapters:
* Intel Emmitsburg (PCH)
* Intel Alder Lake (PCH)
* Intel Raptor Lake (PCH)
* Intel Meteor Lake (SOC)
* Intel Meteor Lake (SOC and PCH)

Datasheets: Publicly available at the Intel website

Expand Down
4 changes: 2 additions & 2 deletions drivers/i2c/busses/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ config I2C_I801
Emmitsburg (PCH)
Alder Lake (PCH)
Raptor Lake (PCH)
Meteor Lake (SOC)
Meteor Lake (SOC and PCH)

This driver can also be built as a module. If so, the module
will be called i2c-i801.
Expand Down Expand Up @@ -1025,7 +1025,7 @@ config I2C_RZV2M
depends on ARCH_RENESAS || COMPILE_TEST
help
If you say yes to this option, support will be included for the
Renesas RZ/V2M I2C interface.
Renesas RZ/V2M I2C interface.

This driver can also be built as a module. If so, the module
will be called i2c-rzv2m.
Expand Down
6 changes: 2 additions & 4 deletions drivers/i2c/busses/i2c-altera.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,14 +465,12 @@ static int altr_i2c_probe(struct platform_device *pdev)
return 0;
}

static int altr_i2c_remove(struct platform_device *pdev)
static void altr_i2c_remove(struct platform_device *pdev)
{
struct altr_i2c_dev *idev = platform_get_drvdata(pdev);

clk_disable_unprepare(idev->i2c_clk);
i2c_del_adapter(&idev->adapter);

return 0;
}

/* Match table for of_platform binding */
Expand All @@ -484,7 +482,7 @@ MODULE_DEVICE_TABLE(of, altr_i2c_of_match);

static struct platform_driver altr_i2c_driver = {
.probe = altr_i2c_probe,
.remove = altr_i2c_remove,
.remove_new = altr_i2c_remove,
.driver = {
.name = "altera-i2c",
.of_match_table = altr_i2c_of_match,
Expand Down
5 changes: 2 additions & 3 deletions drivers/i2c/busses/i2c-amd-mp2-plat.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ static int i2c_amd_probe(struct platform_device *pdev)
return ret;
}

static int i2c_amd_remove(struct platform_device *pdev)
static void i2c_amd_remove(struct platform_device *pdev)
{
struct amd_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
struct amd_i2c_common *i2c_common = &i2c_dev->common;
Expand All @@ -336,7 +336,6 @@ static int i2c_amd_remove(struct platform_device *pdev)
i2c_unlock_bus(&i2c_dev->adap, I2C_LOCK_ROOT_ADAPTER);

i2c_del_adapter(&i2c_dev->adap);
return 0;
}

static const struct acpi_device_id i2c_amd_acpi_match[] = {
Expand All @@ -347,7 +346,7 @@ MODULE_DEVICE_TABLE(acpi, i2c_amd_acpi_match);

static struct platform_driver i2c_amd_plat_driver = {
.probe = i2c_amd_probe,
.remove = i2c_amd_remove,
.remove_new = i2c_amd_remove,
.driver = {
.name = "i2c_amd_mp2",
.acpi_match_table = ACPI_PTR(i2c_amd_acpi_match),
Expand Down
6 changes: 2 additions & 4 deletions drivers/i2c/busses/i2c-aspeed.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ static int aspeed_i2c_probe_bus(struct platform_device *pdev)
return 0;
}

static int aspeed_i2c_remove_bus(struct platform_device *pdev)
static void aspeed_i2c_remove_bus(struct platform_device *pdev)
{
struct aspeed_i2c_bus *bus = platform_get_drvdata(pdev);
unsigned long flags;
Expand All @@ -1077,13 +1077,11 @@ static int aspeed_i2c_remove_bus(struct platform_device *pdev)
reset_control_assert(bus->rst);

i2c_del_adapter(&bus->adap);

return 0;
}

static struct platform_driver aspeed_i2c_bus_driver = {
.probe = aspeed_i2c_probe_bus,
.remove = aspeed_i2c_remove_bus,
.remove_new = aspeed_i2c_remove_bus,
.driver = {
.name = "aspeed-i2c-bus",
.of_match_table = aspeed_i2c_bus_of_table,
Expand Down
6 changes: 2 additions & 4 deletions drivers/i2c/busses/i2c-at91-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static int at91_twi_probe(struct platform_device *pdev)
return 0;
}

static int at91_twi_remove(struct platform_device *pdev)
static void at91_twi_remove(struct platform_device *pdev)
{
struct at91_twi_dev *dev = platform_get_drvdata(pdev);

Expand All @@ -282,8 +282,6 @@ static int at91_twi_remove(struct platform_device *pdev)

pm_runtime_disable(dev->dev);
pm_runtime_set_suspended(dev->dev);

return 0;
}

static int __maybe_unused at91_twi_runtime_suspend(struct device *dev)
Expand Down Expand Up @@ -342,7 +340,7 @@ static const struct dev_pm_ops __maybe_unused at91_twi_pm = {

static struct platform_driver at91_twi_driver = {
.probe = at91_twi_probe,
.remove = at91_twi_remove,
.remove_new = at91_twi_remove,
.id_table = at91_twi_devtypes,
.driver = {
.name = "at91_i2c",
Expand Down
5 changes: 2 additions & 3 deletions drivers/i2c/busses/i2c-au1550.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,12 @@ i2c_au1550_probe(struct platform_device *pdev)
return 0;
}

static int i2c_au1550_remove(struct platform_device *pdev)
static void i2c_au1550_remove(struct platform_device *pdev)
{
struct i2c_au1550_data *priv = platform_get_drvdata(pdev);

i2c_del_adapter(&priv->adap);
i2c_au1550_disable(priv);
return 0;
}

#ifdef CONFIG_PM
Expand Down Expand Up @@ -379,7 +378,7 @@ static struct platform_driver au1xpsc_smbus_driver = {
.pm = AU1XPSC_SMBUS_PMOPS,
},
.probe = i2c_au1550_probe,
.remove = i2c_au1550_remove,
.remove_new = i2c_au1550_remove,
};

module_platform_driver(au1xpsc_smbus_driver);
Expand Down
6 changes: 2 additions & 4 deletions drivers/i2c/busses/i2c-axxia.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,14 +804,12 @@ static int axxia_i2c_probe(struct platform_device *pdev)
return ret;
}

static int axxia_i2c_remove(struct platform_device *pdev)
static void axxia_i2c_remove(struct platform_device *pdev)
{
struct axxia_i2c_dev *idev = platform_get_drvdata(pdev);

clk_disable_unprepare(idev->i2c_clk);
i2c_del_adapter(&idev->adapter);

return 0;
}

/* Match table for of_platform binding */
Expand All @@ -824,7 +822,7 @@ MODULE_DEVICE_TABLE(of, axxia_i2c_of_match);

static struct platform_driver axxia_i2c_driver = {
.probe = axxia_i2c_probe,
.remove = axxia_i2c_remove,
.remove_new = axxia_i2c_remove,
.driver = {
.name = "axxia-i2c",
.of_match_table = axxia_i2c_of_match,
Expand Down
6 changes: 2 additions & 4 deletions drivers/i2c/busses/i2c-bcm-iproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ static int bcm_iproc_i2c_probe(struct platform_device *pdev)
return i2c_add_adapter(adap);
}

static int bcm_iproc_i2c_remove(struct platform_device *pdev)
static void bcm_iproc_i2c_remove(struct platform_device *pdev)
{
struct bcm_iproc_i2c_dev *iproc_i2c = platform_get_drvdata(pdev);

Expand All @@ -1123,8 +1123,6 @@ static int bcm_iproc_i2c_remove(struct platform_device *pdev)

i2c_del_adapter(&iproc_i2c->adapter);
bcm_iproc_i2c_enable_disable(iproc_i2c, false);

return 0;
}

#ifdef CONFIG_PM_SLEEP
Expand Down Expand Up @@ -1260,7 +1258,7 @@ static struct platform_driver bcm_iproc_i2c_driver = {
.pm = BCM_IPROC_I2C_PM_OPS,
},
.probe = bcm_iproc_i2c_probe,
.remove = bcm_iproc_i2c_remove,
.remove_new = bcm_iproc_i2c_remove,
};
module_platform_driver(bcm_iproc_i2c_driver);

Expand Down
6 changes: 2 additions & 4 deletions drivers/i2c/busses/i2c-bcm-kona.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,13 +859,11 @@ static int bcm_kona_i2c_probe(struct platform_device *pdev)
return rc;
}

static int bcm_kona_i2c_remove(struct platform_device *pdev)
static void bcm_kona_i2c_remove(struct platform_device *pdev)
{
struct bcm_kona_i2c_dev *dev = platform_get_drvdata(pdev);

i2c_del_adapter(&dev->adapter);

return 0;
}

static const struct of_device_id bcm_kona_i2c_of_match[] = {
Expand All @@ -880,7 +878,7 @@ static struct platform_driver bcm_kona_i2c_driver = {
.of_match_table = bcm_kona_i2c_of_match,
},
.probe = bcm_kona_i2c_probe,
.remove = bcm_kona_i2c_remove,
.remove_new = bcm_kona_i2c_remove,
};
module_platform_driver(bcm_kona_i2c_driver);

Expand Down
6 changes: 2 additions & 4 deletions drivers/i2c/busses/i2c-bcm2835.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ static int bcm2835_i2c_probe(struct platform_device *pdev)
return ret;
}

static int bcm2835_i2c_remove(struct platform_device *pdev)
static void bcm2835_i2c_remove(struct platform_device *pdev)
{
struct bcm2835_i2c_dev *i2c_dev = platform_get_drvdata(pdev);

Expand All @@ -512,8 +512,6 @@ static int bcm2835_i2c_remove(struct platform_device *pdev)

free_irq(i2c_dev->irq, i2c_dev);
i2c_del_adapter(&i2c_dev->adapter);

return 0;
}

static const struct of_device_id bcm2835_i2c_of_match[] = {
Expand All @@ -525,7 +523,7 @@ MODULE_DEVICE_TABLE(of, bcm2835_i2c_of_match);

static struct platform_driver bcm2835_i2c_driver = {
.probe = bcm2835_i2c_probe,
.remove = bcm2835_i2c_remove,
.remove_new = bcm2835_i2c_remove,
.driver = {
.name = "i2c-bcm2835",
.of_match_table = bcm2835_i2c_of_match,
Expand Down
5 changes: 2 additions & 3 deletions drivers/i2c/busses/i2c-brcmstb.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,12 +690,11 @@ static int brcmstb_i2c_probe(struct platform_device *pdev)
return rc;
}

static int brcmstb_i2c_remove(struct platform_device *pdev)
static void brcmstb_i2c_remove(struct platform_device *pdev)
{
struct brcmstb_i2c_dev *dev = platform_get_drvdata(pdev);

i2c_del_adapter(&dev->adapter);
return 0;
}

#ifdef CONFIG_PM_SLEEP
Expand Down Expand Up @@ -736,7 +735,7 @@ static struct platform_driver brcmstb_i2c_driver = {
.pm = &brcmstb_i2c_pm,
},
.probe = brcmstb_i2c_probe,
.remove = brcmstb_i2c_remove,
.remove_new = brcmstb_i2c_remove,
};
module_platform_driver(brcmstb_i2c_driver);

Expand Down
6 changes: 2 additions & 4 deletions drivers/i2c/busses/i2c-cadence.c
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ static int cdns_i2c_probe(struct platform_device *pdev)
*
* Return: 0 always
*/
static int cdns_i2c_remove(struct platform_device *pdev)
static void cdns_i2c_remove(struct platform_device *pdev)
{
struct cdns_i2c *id = platform_get_drvdata(pdev);

Expand All @@ -1427,8 +1427,6 @@ static int cdns_i2c_remove(struct platform_device *pdev)
clk_notifier_unregister(id->clk, &id->clk_rate_change_nb);
reset_control_assert(id->reset);
clk_disable_unprepare(id->clk);

return 0;
}

static struct platform_driver cdns_i2c_drv = {
Expand All @@ -1438,7 +1436,7 @@ static struct platform_driver cdns_i2c_drv = {
.pm = &cdns_i2c_dev_pm_ops,
},
.probe = cdns_i2c_probe,
.remove = cdns_i2c_remove,
.remove_new = cdns_i2c_remove,
};

module_platform_driver(cdns_i2c_drv);
Expand Down
6 changes: 2 additions & 4 deletions drivers/i2c/busses/i2c-cbus-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,11 @@ static const struct i2c_algorithm cbus_i2c_algo = {
.functionality = cbus_i2c_func,
};

static int cbus_i2c_remove(struct platform_device *pdev)
static void cbus_i2c_remove(struct platform_device *pdev)
{
struct i2c_adapter *adapter = platform_get_drvdata(pdev);

i2c_del_adapter(adapter);

return 0;
}

static int cbus_i2c_probe(struct platform_device *pdev)
Expand Down Expand Up @@ -266,7 +264,7 @@ MODULE_DEVICE_TABLE(of, i2c_cbus_dt_ids);

static struct platform_driver cbus_i2c_driver = {
.probe = cbus_i2c_probe,
.remove = cbus_i2c_remove,
.remove_new = cbus_i2c_remove,
.driver = {
.name = "i2c-cbus-gpio",
.of_match_table = of_match_ptr(i2c_cbus_dt_ids),
Expand Down
6 changes: 2 additions & 4 deletions drivers/i2c/busses/i2c-cht-wc.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,15 +529,13 @@ static int cht_wc_i2c_adap_i2c_probe(struct platform_device *pdev)
return ret;
}

static int cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev)
static void cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev)
{
struct cht_wc_i2c_adap *adap = platform_get_drvdata(pdev);

i2c_unregister_device(adap->client);
i2c_del_adapter(&adap->adapter);
irq_domain_remove(adap->irq_domain);

return 0;
}

static const struct platform_device_id cht_wc_i2c_adap_id_table[] = {
Expand All @@ -548,7 +546,7 @@ MODULE_DEVICE_TABLE(platform, cht_wc_i2c_adap_id_table);

static struct platform_driver cht_wc_i2c_adap_driver = {
.probe = cht_wc_i2c_adap_i2c_probe,
.remove = cht_wc_i2c_adap_i2c_remove,
.remove_new = cht_wc_i2c_adap_i2c_remove,
.driver = {
.name = "cht_wcove_ext_chgr",
},
Expand Down
6 changes: 2 additions & 4 deletions drivers/i2c/busses/i2c-cpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ static int cpm_i2c_probe(struct platform_device *ofdev)
return result;
}

static int cpm_i2c_remove(struct platform_device *ofdev)
static void cpm_i2c_remove(struct platform_device *ofdev)
{
struct cpm_i2c *cpm = platform_get_drvdata(ofdev);

Expand All @@ -685,8 +685,6 @@ static int cpm_i2c_remove(struct platform_device *ofdev)
cpm_i2c_shutdown(cpm);

kfree(cpm);

return 0;
}

static const struct of_device_id cpm_i2c_match[] = {
Expand All @@ -703,7 +701,7 @@ MODULE_DEVICE_TABLE(of, cpm_i2c_match);

static struct platform_driver cpm_i2c_driver = {
.probe = cpm_i2c_probe,
.remove = cpm_i2c_remove,
.remove_new = cpm_i2c_remove,
.driver = {
.name = "fsl-i2c-cpm",
.of_match_table = cpm_i2c_match,
Expand Down
Loading

0 comments on commit 5def00c

Please sign in to comment.