drivers: gpio: mcux: Set pin mux config to GPIO

Set the PCR[MUX] field to kPORT_MuxAsGpio as part of configuring a GPIO
pin.  This removes the need to explicitly call pinmux_pin_set() in board
code.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2021-04-02 12:15:30 -05:00 committed by Carles Cufí
commit b55ad01898

View file

@ -76,6 +76,10 @@ static int gpio_mcux_configure(const struct device *dev,
return -ENOTSUP; return -ENOTSUP;
} }
/* Set PCR mux to GPIO for the pin we are configuring */
mask |= PORT_PCR_MUX_MASK;
pcr |= PORT_PCR_MUX(kPORT_MuxAsGpio);
/* Now do the PORT module. Figure out the pullup/pulldown /* Now do the PORT module. Figure out the pullup/pulldown
* configuration, but don't write it to the PCR register yet. * configuration, but don't write it to the PCR register yet.
*/ */