diff options
author | Jimmy Huang <jimmy.huang@linux.intel.com> | 2017-04-06 16:53:05 -0700 |
---|---|---|
committer | Geoff Gustafson <geoff@linux.intel.com> | 2017-04-06 16:53:05 -0700 |
commit | fb41b478d2b7e58a910dadd27d381b2342914ee2 (patch) | |
tree | 19045141e7732740432f309f729a263acd1d742a | |
parent | 7080def7b7543042ba005be9107e02f046095292 (diff) |
[i2c] Fix bug where pinmux is screwing up I2C (#987)
Fixes #977
Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
-rw-r--r-- | src/zjs_pinmux.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/zjs_pinmux.c b/src/zjs_pinmux.c index 6b65a58..9f8ac1c 100644 --- a/src/zjs_pinmux.c +++ b/src/zjs_pinmux.c @@ -47,8 +47,15 @@ int frdm_k64f_pinmux_setup(struct device *unused) pinmux_pin_set(portd, 3, PORT_PCR_MUX(kPORT_MuxAsGpio)); struct device *porte = device_get_binding(CONFIG_PINMUX_MCUX_PORTE_NAME); - pinmux_pin_set(porte, 25, PORT_PCR_MUX(kPORT_MuxAsGpio)); +#if CONFIG_I2C_0 + pinmux_pin_set(porte, 24, PORT_PCR_MUX(kPORT_MuxAlt5) + | PORT_PCR_ODE_MASK); + pinmux_pin_set(porte, 25, PORT_PCR_MUX(kPORT_MuxAlt5) + | PORT_PCR_ODE_MASK); +#else pinmux_pin_set(porte, 24, PORT_PCR_MUX(kPORT_MuxAsGpio)); + pinmux_pin_set(porte, 25, PORT_PCR_MUX(kPORT_MuxAsGpio)); +#endif return 0; } |