i2c: imx: If pm_runtime_get_sync() returned 1 device access is possible
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 12 Sep 2022 13:20:40 +0000 (15:20 +0200)
committerWolfram Sang <wsa@kernel.org>
Fri, 16 Sep 2022 19:37:50 +0000 (20:37 +0100)
commit085aacaa73163f4b8a89dec24ecb32cfacd34017
treef77c33a36d78bd9ad79a6eb7d8797d96aa1f9410
parent80e78fcce86de0288793a0ef0f6acf37656ee4cf
i2c: imx: If pm_runtime_get_sync() returned 1 device access is possible

pm_runtime_get_sync() returning 1 also means the device is powered. So
resetting the chip registers in .remove() is possible and should be
done.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: d98bdd3a5b50 ("i2c: imx: Make sure to unregister adapter on remove()")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-imx.c