opnsense-src/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.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
gpio_if.m Add gpio methods to read/write/configure up to 32 pins simultaneously. 2017-09-10 18:08:25 +00:00
gpiobacklight.c Use GPIO pin management API in gpiobacklight 2016-05-11 00:26:52 +00:00
gpiobus.c gpiobus: provide a new hint, pin_list 2019-06-27 15:46:06 +00:00
gpiobus_if.m Add a new ioctl to allow the setting of GPIO pin names. 2015-03-08 00:47:50 +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.c Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00
gpiokeys.h Add gpiokeys driver 2016-05-11 17:57:26 +00:00
gpiokeys_codes.c Add gpiokeys driver 2016-05-11 17:57:26 +00:00
gpioled.c gpioled: add a new hint for initial state 2019-05-23 11:15:22 +00:00
gpioled_fdt.c Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00
gpiopower.c Add a GPIO poweroff and reset driver. 2016-11-16 02:14:07 +00:00
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 [gpiospi] add clock delay to avoid smashing of bits 2016-12-13 10:03:29 +00:00
gpioths.c [gpioths] new driver for temperature/humidity sensor DHT11 2017-01-16 15:36:36 +00:00
ofw_gpiobus.c Follow r349460 to complete removing "flags" in struct gpiobus_ivar 2019-06-27 22:18:21 +00:00