Commit d0d0f827 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Wolfram Sang

i2c: i801: use i2c_mark_adapter_suspended/resumed

When entering the suspend callback, at first we should ensure that
transfers are finished and I2C core can't start further transfers.
Use i2c_mark_adapter_suspended() for this purpose, and complement it
with a call to i2c_mark_adapter_resumed() in the resume path.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: default avatarJean Delvare <jdelvare@suse.de>
Reviewed-by: default avatarAndi Shyti <andi.shyti@kernel.org>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent cdb55bdb
......@@ -1818,6 +1818,7 @@ static int i801_suspend(struct device *dev)
{
struct i801_priv *priv = dev_get_drvdata(dev);
i2c_mark_adapter_suspended(&priv->adapter);
i801_restore_regs(priv);
return 0;
......@@ -1829,6 +1830,7 @@ static int i801_resume(struct device *dev)
i801_setup_hstcfg(priv);
i801_enable_host_notify(&priv->adapter);
i2c_mark_adapter_resumed(&priv->adapter);
return 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