i2c: sprd: Prevent i2c accesses after suspend is called
authorBaolin Wang <baolin.wang@linaro.org>
Mon, 9 Apr 2018 06:40:54 +0000 (14:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2018 19:02:49 +0000 (04:02 +0900)
commit201dc1345bfe7228d74830767f2a8de7be9b9723
tree730553fc4f1509950557ffefb8f4d985584f7494
parent40d526e672125a75342b779a9305b64f8792e1b0
i2c: sprd: Prevent i2c accesses after suspend is called

[ Upstream commit da33aa03fa34c918faf2c371ebda0dd961d7ccb2 ]

Add one flag to indicate if the i2c controller has been in suspend state,
which can prevent i2c accesses after i2c controller is suspended following
system suspend.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-sprd.c