]> git.ipfire.org Git - people/arne_f/kernel.git/commit
i2c: algo: pca: Reapply i2c bus settings after reset
authorEvan Nimmo <evan.nimmo@alliedtelesis.co.nz>
Tue, 8 Sep 2020 20:32:47 +0000 (08:32 +1200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Sep 2020 08:46:34 +0000 (10:46 +0200)
commit30ce9a30a3881ae384e98aabd68310d053474e7e
tree86e2c561f26db834c120fba7755f1a6ac09cae3c
parent856de6bc25ead48fbc0eeabebf3c5c44a110a13d
i2c: algo: pca: Reapply i2c bus settings after reset

[ Upstream commit 0a355aeb24081e4538d4d424cd189f16c0bbd983 ]

If something goes wrong (such as the SCL being stuck low) then we need
to reset the PCA chip. The issue with this is that on reset we lose all
config settings and the chip ends up in a disabled state which results
in a lock up/high CPU usage. We need to re-apply any configuration that
had previously been set and re-enable the chip.

Signed-off-by: Evan Nimmo <evan.nimmo@alliedtelesis.co.nz>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/algos/i2c-algo-pca.c
include/linux/i2c-algo-pca.h