]> git.baikalelectronics.ru Git - 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)
committerWolfram Sang <wsa@kernel.org>
Wed, 9 Sep 2020 08:22:40 +0000 (10:22 +0200)
commitc5356897b0c858bb26b8a9aa4cc25551cc72ed6b
tree1b60d8759866b80c55351986b16f9b6ad9695d98
parent8374fa848e539f2776af5d4eb1b0d839cff25b08
i2c: algo: pca: Reapply i2c bus settings after reset

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>
drivers/i2c/algos/i2c-algo-pca.c
include/linux/i2c-algo-pca.h