zephyr/drivers
Maciek Borzecki e53390f02d pinmux/stm32: add common driver for STM32 pinmux
Add a common driver for pin control subsystem in STM32 MCU series. The
driver allows for selection of pin's function without the ability of pin
remapping.

The driver implements a pinmux driver API, with custom `func` and `pin`
encoding in API calls. The caller is expected to use STM32PIN() helper
macro for encoding port/pin numbers or using one of the provided
STM32_PIN_* defines.

The common driver requires SoC specific support to be implemented. The
SoC code must implement these calls: stm32_get_pin_config(),
stm32_get_port_clock(), stm32_pin_configure(). Consult pinmux_stm32.h
header for detailn on semantics of these calls.

The driver also requires board level integration. The call
stm32_board_get_pinconf() is expected to privide pin function
assignments for the target board.

Whenever an IO pin is being enabled, the driver will automatically
enable the clock for corresponding port. The driver does not implement
disabling of port's clock as this has potentially disruptive, as such
such operation should be done explicitly in the code.

The pin control module needs to be initialized before any other modules,
but after clock_control. For this reason, the driver is initialized by
default at PRIMARY level, with priority set to 2. The priority can be
changed through configuration.

Change-Id: I8cb746d0f3cad72cd50b3355fe6d93a9f469be25
Origin: Original
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-03-18 16:27:04 +01:00
..
802.15.4 drivers: Replace DEV_FAIL by -EIO 2016-03-16 19:30:04 -04:00
adc adc: move each driver kconfig options into submenus 2016-03-18 11:27:09 +00:00
aio aio: put driver kconfigs under submenus 2016-03-18 11:27:09 +00:00
bluetooth Bluetooth: Move stack analysis helper to a global location 2016-03-17 16:29:05 +00:00
clock_control clock_control/stm32f10x: move kconfigs into its submenu 2016-03-18 11:27:09 +00:00
console drivers: Replace DEV_INVALID_CONF by -EINVAL 2016-03-16 19:30:04 -04:00
counter drivers: Quark AON counter and timer support 2016-03-17 08:59:04 -04:00
ethernet drivers: Replace DEV_NOT_CONFIG by -EPERM 2016-03-16 19:30:04 -04:00
flash drivers: Replace DEV_NO_SUPPORT by -ENODEV 2016-03-16 19:30:04 -04:00
gpio gpio: restructure Kconfig options 2016-03-17 21:05:12 +00:00
grove sys_log: Grove driver update to new logging API 2016-03-18 00:01:21 +00:00
i2c i2c: restructure kconfig options 2016-03-17 21:05:12 +00:00
interrupt_controller system_apic: rename irq_enable/disable 2016-03-04 18:52:53 +00:00
ipm drivers: Replace DEV_OK by 0 2016-03-16 19:30:04 -04:00
nble drivers/nble: Check firmware version for compatibility 2016-03-18 15:22:13 +00:00
pci pci: Fix PCI header initialization 2016-03-07 15:29:00 +00:00
pinmux pinmux/stm32: add common driver for STM32 pinmux 2016-03-18 16:27:04 +01:00
pwm pwm: restructure Kconfig options 2016-03-17 21:05:12 +00:00
qmsi drivers: Add infrastructure for QMSI drivers 2016-02-05 20:25:15 -05:00
random Fixed file description and applied doxygen style 2016-02-05 20:24:58 -05:00
rtc drivers: Replace DEV_FAIL by -EIO 2016-03-16 19:30:04 -04:00
sensor sensor: move driver specific options to separate Kconfig files 2016-03-17 15:59:17 +00:00
serial serial: minor kconfig semantic changes 2016-03-17 21:05:11 +00:00
shared_irq drivers: Replace DEV_FAIL by -EIO 2016-03-16 19:30:04 -04:00
spi spi: restructure kconfig options 2016-03-17 21:05:12 +00:00
timer Revert "microkernel: Add support for *_sleep() during initialization" 2016-03-11 22:08:44 +00:00
watchdog drivers: Replace DEV_FAIL by -EIO 2016-03-16 19:30:04 -04:00
Kconfig API: Add public counter API 2016-03-17 08:59:04 -04:00
Makefile API: Add public counter API 2016-03-17 08:59:04 -04:00