freebsd-dev/sys/dev/gpio
Andriy Gapon ab0a202863 gpioiic: set output after switching to output mode if presetting it failed
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
2019-10-25 09:37:54 +00:00
..
dwgpio o Add support for multi-port instances of Synopsys DesignWare APB GPIO 2019-09-04 15:37:24 +00:00
bytgpio.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
chvgpio_reg.h Add SPDX tags for chvgpio driver sources 2018-02-24 20:19:31 +00:00
chvgpio.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
gpio_if.m
gpiobacklight.c
gpiobus_if.m
gpiobus.c gpiobus: provide a new hint, pin_list 2019-06-27 15:46:06 +00:00
gpiobusvar.h gpiobus: provide a new hint, pin_list 2019-06-27 15:46:06 +00:00
gpioc.c Fix typo: the 4th argument to GPIO_PIN_ACCESS_32 is the set of pins to 2019-04-25 22:27:56 +00:00
gpioiic.c gpioiic: set output after switching to output mode if presetting it failed 2019-10-25 09:37:54 +00:00
gpiokeys_codes.c
gpiokeys.c Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00
gpiokeys.h
gpioled_fdt.c Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00
gpioled.c gpioled: add a new hint for initial state 2019-05-23 11:15:22 +00:00
gpiopower.c
gpiopps.c Add PNP_INFO to the gpiopps driver. 2019-08-13 15:38:05 +00:00
gpioregulator.c Zero the GPIO regulator pins memory. 2019-06-06 20:54:09 +00:00
gpiospi.c
gpioths.c
ofw_gpiobus.c Follow r349460 to complete removing "flags" in struct gpiobus_ivar 2019-06-27 22:18:21 +00:00