Add basic TCA6416 GPIO expander support. The driver handles
enabling and disabling pins, setting pin mode to IN and OUT and
toggling the pins. External interrupts are not supported.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/dev/iicbus/tca6416.c | ||
---|---|---|
151 ↗ | (On Diff #70396) | Are all those extern devclass needed ? |
sys/dev/iicbus/tca6416.c | ||
---|---|---|
151 ↗ | (On Diff #70396) | These aren't needed. |
sys/dev/iicbus/tca6416.c | ||
---|---|---|
151 ↗ | (On Diff #70396) | Exactly, The trick is that driver class name (the string in driver_t structure or first argument to DEFINE_CLASS_0) should be "gpio" while driver module name (first argument to DRIVER_MODULE) should be unique. |
228 ↗ | (On Diff #70396) | This is not a safe. Changing polarity inversion register may also changes output value for affected output pin which may drive board reset for example. |
244 ↗ | (On Diff #70396) | This looks like leftover of debug code. |
290 ↗ | (On Diff #70396) | and since many gpio controllers are required to operate before interrupts start, the only real solution is teaching iic controller how to do polled mode. |
293 ↗ | (On Diff #70396) | We have config_intrhook_oneshot() exactly for this design pattern. |