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

+9
MAINTAINERS
··· 9116 9116 F: Documentation/devicetree/bindings/net/snps,dwc-qos-ethernet.txt 9117 9117 F: drivers/net/ethernet/synopsys/dwc_eth_qos.c 9118 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 + 9119 9128 SYNOPSYS DESIGNWARE MMC/SD/SDIO DRIVER 9120 9129 M: Seungwon Jeon <tgih.jun@samsung.com> 9121 9130 M: Jaehoon Chung <jh80.chung@samsung.com>
+27 -6
drivers/i2c/busses/i2c-designware-platdrv.c
··· 24 24 #include <linux/kernel.h> 25 25 #include <linux/module.h> 26 26 #include <linux/delay.h> 27 + #include <linux/dmi.h> 27 28 #include <linux/i2c.h> 28 29 #include <linux/clk.h> 29 30 #include <linux/clk-provider.h> ··· 52 51 } 53 52 54 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 + 55 70 static void dw_i2c_acpi_params(struct platform_device *pdev, char method[], 56 71 u16 *hcnt, u16 *lcnt, u32 *sda_hold) 57 72 { 58 73 struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER }; 59 74 acpi_handle handle = ACPI_HANDLE(&pdev->dev); 60 75 union acpi_object *obj; 76 + 77 + if (dmi_check_system(dw_i2c_no_acpi_params)) 78 + return; 61 79 62 80 if (ACPI_FAILURE(acpi_evaluate_object(handle, method, NULL, &buf))) 63 81 return; ··· 273 253 adap->dev.parent = &pdev->dev; 274 254 adap->dev.of_node = pdev->dev.of_node; 275 255 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 256 if (dev->pm_runtime_disabled) { 283 257 pm_runtime_forbid(&pdev->dev); 284 258 } else { ··· 280 266 pm_runtime_use_autosuspend(&pdev->dev); 281 267 pm_runtime_set_active(&pdev->dev); 282 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; 283 276 } 284 277 285 278 return 0;
+4 -3
drivers/i2c/busses/i2c-rcar.c
··· 690 690 return ret; 691 691 } 692 692 693 + pm_runtime_enable(dev); 694 + platform_set_drvdata(pdev, priv); 695 + 693 696 ret = i2c_add_numbered_adapter(adap); 694 697 if (ret < 0) { 695 698 dev_err(dev, "reg adap failed: %d\n", ret); 699 + pm_runtime_disable(dev); 696 700 return ret; 697 701 } 698 - 699 - pm_runtime_enable(dev); 700 - platform_set_drvdata(pdev, priv); 701 702 702 703 dev_info(dev, "probed\n"); 703 704
+5 -3
drivers/i2c/busses/i2c-s3c2410.c
··· 1243 1243 i2c->adap.nr = i2c->pdata->bus_num; 1244 1244 i2c->adap.dev.of_node = pdev->dev.of_node; 1245 1245 1246 + platform_set_drvdata(pdev, i2c); 1247 + 1248 + pm_runtime_enable(&pdev->dev); 1249 + 1246 1250 ret = i2c_add_numbered_adapter(&i2c->adap); 1247 1251 if (ret < 0) { 1248 1252 dev_err(&pdev->dev, "failed to add bus to i2c core\n"); 1253 + pm_runtime_disable(&pdev->dev); 1249 1254 s3c24xx_i2c_deregister_cpufreq(i2c); 1250 1255 clk_unprepare(i2c->clk); 1251 1256 return ret; 1252 1257 } 1253 1258 1254 - platform_set_drvdata(pdev, i2c); 1255 - 1256 - pm_runtime_enable(&pdev->dev); 1257 1259 pm_runtime_enable(&i2c->adap.dev); 1258 1260 1259 1261 dev_info(&pdev->dev, "%s: S3C I2C adapter\n", dev_name(&i2c->adap.dev));
+6 -6
drivers/i2c/i2c-core.c
··· 694 694 goto err_clear_wakeup_irq; 695 695 696 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 - } 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 703 704 704 return 0; 705 705