Commit ee4eb6ee authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'i2c-for-5.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "MAINTAINERS rectifications and a few minor driver fixes"

* tag 'i2c-for-5.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: mediatek: Fix an error handling path in mtk_i2c_probe()
  i2c: designware: Use standard optional ref clock implementation
  MAINTAINERS: core DT include belongs to core
  MAINTAINERS: add include/dt-bindings/i2c to I2C SUBSYSTEM HOST DRIVERS
  i2c: npcm7xx: Add check for platform_driver_register
  MAINTAINERS: Update Synopsys DesignWare I2C to Supported
parents 063232b6 de87b603
...@@ -9276,6 +9276,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git ...@@ -9276,6 +9276,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git
F: Documentation/devicetree/bindings/i2c/i2c.txt F: Documentation/devicetree/bindings/i2c/i2c.txt
F: Documentation/i2c/ F: Documentation/i2c/
F: drivers/i2c/* F: drivers/i2c/*
F: include/dt-bindings/i2c/i2c.h
F: include/linux/i2c-dev.h F: include/linux/i2c-dev.h
F: include/linux/i2c-smbus.h F: include/linux/i2c-smbus.h
F: include/linux/i2c.h F: include/linux/i2c.h
...@@ -9291,6 +9292,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git ...@@ -9291,6 +9292,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git
F: Documentation/devicetree/bindings/i2c/ F: Documentation/devicetree/bindings/i2c/
F: drivers/i2c/algos/ F: drivers/i2c/algos/
F: drivers/i2c/busses/ F: drivers/i2c/busses/
F: include/dt-bindings/i2c/
I2C-TAOS-EVM DRIVER I2C-TAOS-EVM DRIVER
M: Jean Delvare <jdelvare@suse.com> M: Jean Delvare <jdelvare@suse.com>
...@@ -19305,7 +19307,7 @@ R: Andy Shevchenko <andriy.shevchenko@linux.intel.com> ...@@ -19305,7 +19307,7 @@ R: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
R: Mika Westerberg <mika.westerberg@linux.intel.com> R: Mika Westerberg <mika.westerberg@linux.intel.com>
R: Jan Dabros <jsd@semihalf.com> R: Jan Dabros <jsd@semihalf.com>
L: linux-i2c@vger.kernel.org L: linux-i2c@vger.kernel.org
S: Maintained S: Supported
F: drivers/i2c/busses/i2c-designware-* F: drivers/i2c/busses/i2c-designware-*
SYNOPSYS DESIGNWARE MMC/SD/SDIO DRIVER SYNOPSYS DESIGNWARE MMC/SD/SDIO DRIVER
......
...@@ -477,9 +477,6 @@ int i2c_dw_prepare_clk(struct dw_i2c_dev *dev, bool prepare) ...@@ -477,9 +477,6 @@ int i2c_dw_prepare_clk(struct dw_i2c_dev *dev, bool prepare)
{ {
int ret; int ret;
if (IS_ERR(dev->clk))
return PTR_ERR(dev->clk);
if (prepare) { if (prepare) {
/* Optional interface clock */ /* Optional interface clock */
ret = clk_prepare_enable(dev->pclk); ret = clk_prepare_enable(dev->pclk);
......
...@@ -320,8 +320,17 @@ static int dw_i2c_plat_probe(struct platform_device *pdev) ...@@ -320,8 +320,17 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
goto exit_reset; goto exit_reset;
} }
dev->clk = devm_clk_get(&pdev->dev, NULL); dev->clk = devm_clk_get_optional(&pdev->dev, NULL);
if (!i2c_dw_prepare_clk(dev, true)) { if (IS_ERR(dev->clk)) {
ret = PTR_ERR(dev->clk);
goto exit_reset;
}
ret = i2c_dw_prepare_clk(dev, true);
if (ret)
goto exit_reset;
if (dev->clk) {
u64 clk_khz; u64 clk_khz;
dev->get_clk_rate_khz = i2c_dw_get_clk_rate_khz; dev->get_clk_rate_khz = i2c_dw_get_clk_rate_khz;
......
...@@ -1420,17 +1420,22 @@ static int mtk_i2c_probe(struct platform_device *pdev) ...@@ -1420,17 +1420,22 @@ static int mtk_i2c_probe(struct platform_device *pdev)
if (ret < 0) { if (ret < 0) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"Request I2C IRQ %d fail\n", irq); "Request I2C IRQ %d fail\n", irq);
return ret; goto err_bulk_unprepare;
} }
i2c_set_adapdata(&i2c->adap, i2c); i2c_set_adapdata(&i2c->adap, i2c);
ret = i2c_add_adapter(&i2c->adap); ret = i2c_add_adapter(&i2c->adap);
if (ret) if (ret)
return ret; goto err_bulk_unprepare;
platform_set_drvdata(pdev, i2c); platform_set_drvdata(pdev, i2c);
return 0; return 0;
err_bulk_unprepare:
clk_bulk_unprepare(I2C_MT65XX_CLK_MAX, i2c->clocks);
return ret;
} }
static int mtk_i2c_remove(struct platform_device *pdev) static int mtk_i2c_remove(struct platform_device *pdev)
......
...@@ -2372,8 +2372,7 @@ static struct platform_driver npcm_i2c_bus_driver = { ...@@ -2372,8 +2372,7 @@ static struct platform_driver npcm_i2c_bus_driver = {
static int __init npcm_i2c_init(void) static int __init npcm_i2c_init(void)
{ {
npcm_i2c_debugfs_dir = debugfs_create_dir("npcm_i2c", NULL); npcm_i2c_debugfs_dir = debugfs_create_dir("npcm_i2c", NULL);
platform_driver_register(&npcm_i2c_bus_driver); return platform_driver_register(&npcm_i2c_bus_driver);
return 0;
} }
module_init(npcm_i2c_init); module_init(npcm_i2c_init);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment