drivers: gpio: xec: Ensure GPIO input is enabled

All GPIOs except VCI pins come in default GPIO mode and  input disabled
Need to explicitly enable input apart from setting direction.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
This commit is contained in:
Jose Alberto Meza 2019-09-26 18:22:34 -07:00 committed by Andrew Boie
commit 4c095b5cbc

View file

@ -66,6 +66,7 @@ static int gpio_xec_configure(struct device *dev,
* 0 - pin is input, 1 - pin is output
*/
mask |= MCHP_GPIO_CTRL_DIR_MASK;
mask |= MCHP_GPIO_CTRL_INPAD_DIS_MASK;
if (access_op == GPIO_ACCESS_BY_PIN) {
if ((flags & GPIO_DIR_MASK) == GPIO_DIR_IN) {
pcr1 &= ~BIT(MCHP_GPIO_CTRL_DIR_POS);