From: Wolfram Sang Date: Wed, 22 Mar 2017 08:32:44 +0000 (+0100) Subject: Merge tag 'topic/designware-baytrail-2017-03-02' of git://anongit.freedesktop.org... X-Git-Tag: v4.14-rc1~1008^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a528fab6cc66acdccb48552a79300bc1fbda6b5b;p=platform%2Fkernel%2Flinux-rpi.git Merge tag 'topic/designware-baytrail-2017-03-02' of git://anongit.freedesktop.org/git/drm-intel into i2c/for-next Pull immutable branch as a common base for further development: "Baytrail PMIC vs. PMU race fixes from Hans de Goede This time the right version (v4), with the compile fix." --- a528fab6cc66acdccb48552a79300bc1fbda6b5b diff --cc drivers/i2c/busses/i2c-designware-platdrv.c index 79c4b4e,df0ff7d..d866509 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@@ -244,13 -235,12 +244,13 @@@ static int dw_i2c_plat_probe(struct pla && dev->clk_freq != 1000000 && dev->clk_freq != 3400000) { dev_err(&pdev->dev, "Only 100kHz, 400kHz, 1MHz and 3.4MHz supported"); - return -EINVAL; + r = -EINVAL; + goto exit_reset; } - r = i2c_dw_eval_lock_support(dev); + r = i2c_dw_probe_lock_support(dev); if (r) - return r; + goto exit_reset; dev->functionality = I2C_FUNC_10BIT_ADDR | DW_IC_DEFAULT_FUNCTIONALITY; @@@ -324,9 -306,9 +324,11 @@@ static int dw_i2c_plat_remove(struct pl pm_runtime_put_sync(&pdev->dev); if (!dev->pm_runtime_disabled) pm_runtime_disable(&pdev->dev); + if (!IS_ERR_OR_NULL(dev->rst)) + reset_control_assert(dev->rst); + i2c_dw_remove_lock_support(dev); + return 0; }