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:
parent
e4a349ff76
commit
b55ad01898
1 changed files with 4 additions and 0 deletions
|
@ -76,6 +76,10 @@ static int gpio_mcux_configure(const struct device *dev,
|
|||
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
|
||||
* configuration, but don't write it to the PCR register yet.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue