mirror of
https://github.com/opnsense/src.git
synced 2026-02-25 02:42:54 -05:00
Some controllers cannot preset future output value while the pin is in
input mode. This adds a fallback for those controllers. The new code
assumes that a controller reports an error in that case.
For example, all hardware supported by nctgpio behaves in that way.
This is a temporary measure. In the future we will use
GPIO_PIN_PRESET_LOW / GPIO_PIN_PRESET_HIGH to preset the output either
in hardware, if supported, or in software (e.g., in
gpiobus_pin_setflags).
While here, I extracted common functionality of gpioiic_set{sda,scl} and
gpioiic_get{sda,scl} to gpioiic_setpin and gpioiic_getpin respectively.
MFC after: 2 weeks
|
||
|---|---|---|
| .. | ||
| dwgpio | ||
| bytgpio.c | ||
| chvgpio.c | ||
| chvgpio_reg.h | ||
| gpio_if.m | ||
| gpiobacklight.c | ||
| gpiobus.c | ||
| gpiobus_if.m | ||
| gpiobusvar.h | ||
| gpioc.c | ||
| gpioiic.c | ||
| gpiokeys.c | ||
| gpiokeys.h | ||
| gpiokeys_codes.c | ||
| gpioled.c | ||
| gpioled_fdt.c | ||
| gpiopower.c | ||
| gpiopps.c | ||
| gpioregulator.c | ||
| gpiospi.c | ||
| gpioths.c | ||
| ofw_gpiobus.c | ||