zephyr/drivers/pinmux/dev
Paul Sokolovsky 6b2a1af1cd pinmux: Make default init priority be between GPIO's prio and device prio.
Pinmux driver almost certainly should be initialized before the
rest of hardware devices (which may need specific pins already
configured for them), and usually after generic GPIO drivers.
Thus, its priority should be between KERNEL_INIT_PRIORITY_DEFAULT
(default 40) and KERNEL_INIT_PRIORITY_DEVICE (default 50). Thus,
we set PINMUX_INIT_PRIORITY to 45.

There are exceptions to the rule above for particular boards. For
example, BOARD=galileo has GPIO and pinmuxer on I2C bus and thus
overrides PINMUX_INIT_PRIORITY to be much higher. Note that while
PINMUX_INIT_PRIORITY was defined previously (at 60), it was used
only for galileo, which overrides it anyway.

This fix was prompted by investigation why eth_ksdk driver was
non-functional after kernel priorities re-hashing: both eth_ksdk
and pinmux used the same priority, and eth_ksdk happened to run
before pinmux. While bumping eth_ksdk priority would help in the
particular case, the same would likely reoccur with other drivers
like I2C, SPI, etc.

Change-Id: Ie5ca3135c1ee2fe8d9cf48d5c12e62eac63487f7
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2016-11-18 16:43:45 +00:00
..
Kconfig pinmux: Add support for "runtime" pinmux on ARM V2M Beetle 2016-11-11 20:39:53 +00:00
Makefile pinmux: Add support for "runtime" pinmux on ARM V2M Beetle 2016-11-11 20:39:53 +00:00
pinmux_dev_arm_beetle.c pinmux: Add support for "runtime" pinmux on ARM V2M Beetle 2016-11-11 20:39:53 +00:00
pinmux_dev_atmel_sam3x.c kernel: deprecate old init levels 2016-11-09 17:59:44 +00:00
pinmux_dev_k64.c pinmux: Make default init priority be between GPIO's prio and device prio. 2016-11-18 16:43:45 +00:00
pinmux_dev_qmsi.c kernel: deprecate old init levels 2016-11-09 17:59:44 +00:00
pinmux_dev_stm32.c kernel: deprecate old init levels 2016-11-09 17:59:44 +00:00