MLK-16219 pca953x_gpio: Clear the polarity invert register at init
authorYe Li <ye.li@nxp.com>
Fri, 18 Aug 2017 06:57:43 +0000 (01:57 -0500)
committerJason Liu <jason.hui.liu@nxp.com>
Thu, 2 Nov 2017 18:37:13 +0000 (02:37 +0800)
commitcc4e6b3786671ec2ce2ea74dc6334f72587cc756
tree474629bd9a47d14b76e68951e8143db99ff1dd7a
parent40a60b20276c45373a5337664943a3e14e19bdda
MLK-16219 pca953x_gpio: Clear the polarity invert register at init

The pca953x_gpio driver uses default value of polarity inversion register.
For some devices like PCA9557 and MAX7310, their polarity inversion register
default value is 0xf0. So for high 4 ports, when reading their values,
the values are inverted as the actual level.

This patch clears the polarity inversion register to 0 at init. So that the port read
and write values are aligned.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
drivers/gpio/pca953x_gpio.c