Commit 1382f77c authored by Wolfram Sang's avatar Wolfram Sang Committed by Stefan Bader

i2c: rcar: fix resume by always initializing registers before transfer

BugLink: https://bugs.launchpad.net/bugs/1784409

commit ae481cc1 upstream.

Resume failed because of uninitialized registers. Instead of adding a
resume callback, we simply initialize registers before every transfer.
This lightweight change is more robust and will keep us safe if we ever
need support for power domains or dynamic frequency changes.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent a9eb5ace
...@@ -484,6 +484,8 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap, ...@@ -484,6 +484,8 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
pm_runtime_get_sync(dev); pm_runtime_get_sync(dev);
rcar_i2c_init(priv);
ret = rcar_i2c_bus_barrier(priv); ret = rcar_i2c_bus_barrier(priv);
if (ret < 0) if (ret < 0)
goto out; goto out;
...@@ -624,7 +626,6 @@ static int rcar_i2c_probe(struct platform_device *pdev) ...@@ -624,7 +626,6 @@ static int rcar_i2c_probe(struct platform_device *pdev)
if (ret < 0) if (ret < 0)
goto out_pm_put; goto out_pm_put;
rcar_i2c_init(priv);
pm_runtime_put(dev); pm_runtime_put(dev);
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
......
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