Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
"Here are some bugfixes for the I2C subsystem.

Kieran found a flaw in the recently renewed wake irq handling. Mika
handled a user bug report where the ACPI info turned out to be
unusable. I updated MAINTAINERS so that such bug reports will sooner
get to the right people. Geert pointed me to a problem of some i2c
drivers regarding PM which I fixed"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: designware: Do not use parameters from ACPI on Dell Inspiron 7348
MAINTAINERS: add maintainers for Synopsis Designware I2C drivers
i2c: designware-platdrv: enable RuntimePM before registering to the core
i2c: s3c2410: enable RuntimePM before registering to the core
i2c: rcar: enable RuntimePM before registering to the core
i2c: return probe deferred status on dev_pm_domain_attach

+51 -18
+9
MAINTAINERS
··· 9116 F: Documentation/devicetree/bindings/net/snps,dwc-qos-ethernet.txt 9117 F: drivers/net/ethernet/synopsys/dwc_eth_qos.c 9118 9119 SYNOPSYS DESIGNWARE MMC/SD/SDIO DRIVER 9120 M: Seungwon Jeon <tgih.jun@samsung.com> 9121 M: Jaehoon Chung <jh80.chung@samsung.com>
··· 9116 F: Documentation/devicetree/bindings/net/snps,dwc-qos-ethernet.txt 9117 F: drivers/net/ethernet/synopsys/dwc_eth_qos.c 9118 9119 + SYNOPSYS DESIGNWARE I2C DRIVER 9120 + M: Andy Shevchenko <andriy.shevchenko@linux.intel.com> 9121 + M: Jarkko Nikula <jarkko.nikula@linux.intel.com> 9122 + M: Mika Westerberg <mika.westerberg@linux.intel.com> 9123 + L: linux-i2c@vger.kernel.org 9124 + S: Maintained 9125 + F: drivers/i2c/busses/i2c-designware-* 9126 + F: include/linux/platform_data/i2c-designware.h 9127 + 9128 SYNOPSYS DESIGNWARE MMC/SD/SDIO DRIVER 9129 M: Seungwon Jeon <tgih.jun@samsung.com> 9130 M: Jaehoon Chung <jh80.chung@samsung.com>
+27 -6
drivers/i2c/busses/i2c-designware-platdrv.c
··· 24 #include <linux/kernel.h> 25 #include <linux/module.h> 26 #include <linux/delay.h> 27 #include <linux/i2c.h> 28 #include <linux/clk.h> 29 #include <linux/clk-provider.h> ··· 52 } 53 54 #ifdef CONFIG_ACPI 55 static void dw_i2c_acpi_params(struct platform_device *pdev, char method[], 56 u16 *hcnt, u16 *lcnt, u32 *sda_hold) 57 { 58 struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER }; 59 acpi_handle handle = ACPI_HANDLE(&pdev->dev); 60 union acpi_object *obj; 61 62 if (ACPI_FAILURE(acpi_evaluate_object(handle, method, NULL, &buf))) 63 return; ··· 273 adap->dev.parent = &pdev->dev; 274 adap->dev.of_node = pdev->dev.of_node; 275 276 - r = i2c_add_numbered_adapter(adap); 277 - if (r) { 278 - dev_err(&pdev->dev, "failure adding adapter\n"); 279 - return r; 280 - } 281 - 282 if (dev->pm_runtime_disabled) { 283 pm_runtime_forbid(&pdev->dev); 284 } else { ··· 280 pm_runtime_use_autosuspend(&pdev->dev); 281 pm_runtime_set_active(&pdev->dev); 282 pm_runtime_enable(&pdev->dev); 283 } 284 285 return 0;
··· 24 #include <linux/kernel.h> 25 #include <linux/module.h> 26 #include <linux/delay.h> 27 + #include <linux/dmi.h> 28 #include <linux/i2c.h> 29 #include <linux/clk.h> 30 #include <linux/clk-provider.h> ··· 51 } 52 53 #ifdef CONFIG_ACPI 54 + /* 55 + * The HCNT/LCNT information coming from ACPI should be the most accurate 56 + * for given platform. However, some systems get it wrong. On such systems 57 + * we get better results by calculating those based on the input clock. 58 + */ 59 + static const struct dmi_system_id dw_i2c_no_acpi_params[] = { 60 + { 61 + .ident = "Dell Inspiron 7348", 62 + .matches = { 63 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 64 + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 7348"), 65 + }, 66 + }, 67 + { } 68 + }; 69 + 70 static void dw_i2c_acpi_params(struct platform_device *pdev, char method[], 71 u16 *hcnt, u16 *lcnt, u32 *sda_hold) 72 { 73 struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER }; 74 acpi_handle handle = ACPI_HANDLE(&pdev->dev); 75 union acpi_object *obj; 76 + 77 + if (dmi_check_system(dw_i2c_no_acpi_params)) 78 + return; 79 80 if (ACPI_FAILURE(acpi_evaluate_object(handle, method, NULL, &buf))) 81 return; ··· 253 adap->dev.parent = &pdev->dev; 254 adap->dev.of_node = pdev->dev.of_node; 255 256 if (dev->pm_runtime_disabled) { 257 pm_runtime_forbid(&pdev->dev); 258 } else { ··· 266 pm_runtime_use_autosuspend(&pdev->dev); 267 pm_runtime_set_active(&pdev->dev); 268 pm_runtime_enable(&pdev->dev); 269 + } 270 + 271 + r = i2c_add_numbered_adapter(adap); 272 + if (r) { 273 + dev_err(&pdev->dev, "failure adding adapter\n"); 274 + pm_runtime_disable(&pdev->dev); 275 + return r; 276 } 277 278 return 0;
+4 -3
drivers/i2c/busses/i2c-rcar.c
··· 690 return ret; 691 } 692 693 ret = i2c_add_numbered_adapter(adap); 694 if (ret < 0) { 695 dev_err(dev, "reg adap failed: %d\n", ret); 696 return ret; 697 } 698 - 699 - pm_runtime_enable(dev); 700 - platform_set_drvdata(pdev, priv); 701 702 dev_info(dev, "probed\n"); 703
··· 690 return ret; 691 } 692 693 + pm_runtime_enable(dev); 694 + platform_set_drvdata(pdev, priv); 695 + 696 ret = i2c_add_numbered_adapter(adap); 697 if (ret < 0) { 698 dev_err(dev, "reg adap failed: %d\n", ret); 699 + pm_runtime_disable(dev); 700 return ret; 701 } 702 703 dev_info(dev, "probed\n"); 704
+5 -3
drivers/i2c/busses/i2c-s3c2410.c
··· 1243 i2c->adap.nr = i2c->pdata->bus_num; 1244 i2c->adap.dev.of_node = pdev->dev.of_node; 1245 1246 ret = i2c_add_numbered_adapter(&i2c->adap); 1247 if (ret < 0) { 1248 dev_err(&pdev->dev, "failed to add bus to i2c core\n"); 1249 s3c24xx_i2c_deregister_cpufreq(i2c); 1250 clk_unprepare(i2c->clk); 1251 return ret; 1252 } 1253 1254 - platform_set_drvdata(pdev, i2c); 1255 - 1256 - pm_runtime_enable(&pdev->dev); 1257 pm_runtime_enable(&i2c->adap.dev); 1258 1259 dev_info(&pdev->dev, "%s: S3C I2C adapter\n", dev_name(&i2c->adap.dev));
··· 1243 i2c->adap.nr = i2c->pdata->bus_num; 1244 i2c->adap.dev.of_node = pdev->dev.of_node; 1245 1246 + platform_set_drvdata(pdev, i2c); 1247 + 1248 + pm_runtime_enable(&pdev->dev); 1249 + 1250 ret = i2c_add_numbered_adapter(&i2c->adap); 1251 if (ret < 0) { 1252 dev_err(&pdev->dev, "failed to add bus to i2c core\n"); 1253 + pm_runtime_disable(&pdev->dev); 1254 s3c24xx_i2c_deregister_cpufreq(i2c); 1255 clk_unprepare(i2c->clk); 1256 return ret; 1257 } 1258 1259 pm_runtime_enable(&i2c->adap.dev); 1260 1261 dev_info(&pdev->dev, "%s: S3C I2C adapter\n", dev_name(&i2c->adap.dev));
+6 -6
drivers/i2c/i2c-core.c
··· 694 goto err_clear_wakeup_irq; 695 696 status = dev_pm_domain_attach(&client->dev, true); 697 - if (status != -EPROBE_DEFER) { 698 - status = driver->probe(client, i2c_match_id(driver->id_table, 699 - client)); 700 - if (status) 701 - goto err_detach_pm_domain; 702 - } 703 704 return 0; 705
··· 694 goto err_clear_wakeup_irq; 695 696 status = dev_pm_domain_attach(&client->dev, true); 697 + if (status == -EPROBE_DEFER) 698 + goto err_clear_wakeup_irq; 699 + 700 + status = driver->probe(client, i2c_match_id(driver->id_table, client)); 701 + if (status) 702 + goto err_detach_pm_domain; 703 704 return 0; 705