diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-03 14:42:01 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-03 14:42:01 -0400 |
| commit | 82463436a7fa40345c6febf0baa4c954af506ca6 (patch) | |
| tree | 8fcb00eda7f80c6860e4ca691468fb6d98144373 | |
| parent | a4ccb5f9dc6c4fb4d4c0a9d73a911986f20ec88a (diff) | |
| parent | 72bfcee11cf89509795c56b0e40a3785ab00bbdd (diff) | |
Merge branch 'i2c/for-current-fixed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang:
"I2C driver bugfixes and a MAINTAINERS update for you"
* 'i2c/for-current-fixed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: Prevent runtime suspend of adapter when Host Notify is required
i2c: synquacer: fix enumeration of slave devices
MAINTAINERS: friendly takeover of i2c-gpio driver
i2c: designware: ratelimit 'transfer when suspended' errors
i2c: imx: correct the method of getting private data in notifier_call
| -rw-r--r-- | MAINTAINERS | 2 | ||||
| -rw-r--r-- | drivers/i2c/busses/i2c-designware-master.c | 3 | ||||
| -rw-r--r-- | drivers/i2c/busses/i2c-imx.c | 4 | ||||
| -rw-r--r-- | drivers/i2c/busses/i2c-synquacer.c | 2 | ||||
| -rw-r--r-- | drivers/i2c/i2c-core-base.c | 4 |
5 files changed, 10 insertions, 5 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 5c38f21aee78..057a72a85156 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -6462,7 +6462,7 @@ S: Maintained | |||
| 6462 | F: drivers/media/radio/radio-gemtek* | 6462 | F: drivers/media/radio/radio-gemtek* |
| 6463 | 6463 | ||
| 6464 | GENERIC GPIO I2C DRIVER | 6464 | GENERIC GPIO I2C DRIVER |
| 6465 | M: Haavard Skinnemoen <hskinnemoen@gmail.com> | 6465 | M: Wolfram Sang <wsa+renesas@sang-engineering.com> |
| 6466 | S: Supported | 6466 | S: Supported |
| 6467 | F: drivers/i2c/busses/i2c-gpio.c | 6467 | F: drivers/i2c/busses/i2c-gpio.c |
| 6468 | F: include/linux/platform_data/i2c-gpio.h | 6468 | F: include/linux/platform_data/i2c-gpio.h |
diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c index bb8e3f149979..d464799e40a3 100644 --- a/drivers/i2c/busses/i2c-designware-master.c +++ b/drivers/i2c/busses/i2c-designware-master.c | |||
| @@ -426,8 +426,7 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) | |||
| 426 | 426 | ||
| 427 | pm_runtime_get_sync(dev->dev); | 427 | pm_runtime_get_sync(dev->dev); |
| 428 | 428 | ||
| 429 | if (dev->suspended) { | 429 | if (dev_WARN_ONCE(dev->dev, dev->suspended, "Transfer while suspended\n")) { |
| 430 | dev_err(dev->dev, "Error %s call while suspended\n", __func__); | ||
| 431 | ret = -ESHUTDOWN; | 430 | ret = -ESHUTDOWN; |
| 432 | goto done_nolock; | 431 | goto done_nolock; |
| 433 | } | 432 | } |
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index c0c3043b5d61..fd70b110e8f4 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c | |||
| @@ -515,9 +515,9 @@ static int i2c_imx_clk_notifier_call(struct notifier_block *nb, | |||
| 515 | unsigned long action, void *data) | 515 | unsigned long action, void *data) |
| 516 | { | 516 | { |
| 517 | struct clk_notifier_data *ndata = data; | 517 | struct clk_notifier_data *ndata = data; |
| 518 | struct imx_i2c_struct *i2c_imx = container_of(&ndata->clk, | 518 | struct imx_i2c_struct *i2c_imx = container_of(nb, |
| 519 | struct imx_i2c_struct, | 519 | struct imx_i2c_struct, |
| 520 | clk); | 520 | clk_change_nb); |
| 521 | 521 | ||
| 522 | if (action & POST_RATE_CHANGE) | 522 | if (action & POST_RATE_CHANGE) |
| 523 | i2c_imx_set_clk(i2c_imx, ndata->new_rate); | 523 | i2c_imx_set_clk(i2c_imx, ndata->new_rate); |
diff --git a/drivers/i2c/busses/i2c-synquacer.c b/drivers/i2c/busses/i2c-synquacer.c index d18b0941b71a..f14d4b3fab44 100644 --- a/drivers/i2c/busses/i2c-synquacer.c +++ b/drivers/i2c/busses/i2c-synquacer.c | |||
| @@ -597,6 +597,8 @@ static int synquacer_i2c_probe(struct platform_device *pdev) | |||
| 597 | i2c->adapter = synquacer_i2c_ops; | 597 | i2c->adapter = synquacer_i2c_ops; |
| 598 | i2c_set_adapdata(&i2c->adapter, i2c); | 598 | i2c_set_adapdata(&i2c->adapter, i2c); |
| 599 | i2c->adapter.dev.parent = &pdev->dev; | 599 | i2c->adapter.dev.parent = &pdev->dev; |
| 600 | i2c->adapter.dev.of_node = pdev->dev.of_node; | ||
| 601 | ACPI_COMPANION_SET(&i2c->adapter.dev, ACPI_COMPANION(&pdev->dev)); | ||
| 600 | i2c->adapter.nr = pdev->id; | 602 | i2c->adapter.nr = pdev->id; |
| 601 | init_completion(&i2c->completion); | 603 | init_completion(&i2c->completion); |
| 602 | 604 | ||
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index c480ca385ffb..688aa3b5f3ac 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c | |||
| @@ -327,6 +327,8 @@ static int i2c_device_probe(struct device *dev) | |||
| 327 | 327 | ||
| 328 | if (client->flags & I2C_CLIENT_HOST_NOTIFY) { | 328 | if (client->flags & I2C_CLIENT_HOST_NOTIFY) { |
| 329 | dev_dbg(dev, "Using Host Notify IRQ\n"); | 329 | dev_dbg(dev, "Using Host Notify IRQ\n"); |
| 330 | /* Keep adapter active when Host Notify is required */ | ||
| 331 | pm_runtime_get_sync(&client->adapter->dev); | ||
| 330 | irq = i2c_smbus_host_notify_to_irq(client); | 332 | irq = i2c_smbus_host_notify_to_irq(client); |
| 331 | } else if (dev->of_node) { | 333 | } else if (dev->of_node) { |
| 332 | irq = of_irq_get_byname(dev->of_node, "irq"); | 334 | irq = of_irq_get_byname(dev->of_node, "irq"); |
| @@ -431,6 +433,8 @@ static int i2c_device_remove(struct device *dev) | |||
| 431 | device_init_wakeup(&client->dev, false); | 433 | device_init_wakeup(&client->dev, false); |
| 432 | 434 | ||
| 433 | client->irq = client->init_irq; | 435 | client->irq = client->init_irq; |
| 436 | if (client->flags & I2C_CLIENT_HOST_NOTIFY) | ||
| 437 | pm_runtime_put(&client->adapter->dev); | ||
| 434 | 438 | ||
| 435 | return status; | 439 | return status; |
| 436 | } | 440 | } |
