OpenGrok
Cross Reference: mcp23xxxgpio_spi.c
xref
: /
src
/
sys
/
dev
/
spi
/
mcp23xxxgpio_spi.c
Home
|
History
|
Annotate
|
Download
|
only in
spi
History log of
/src/sys/dev/spi/mcp23xxxgpio_spi.c
Revision
Date
Author
Comments
1.8
13-Sep-2025
thorpej
Define and use spi_handle_t to drive home the point that it's an opaque
type.
1.7
12-Sep-2025
thorpej
Enable direct configuration via the device tree.
1.6
11-Sep-2025
thorpej
Use SPI_MATCH_DEFAULT rather than hard-coding 1.
1.5
10-Sep-2025
thorpej
Use speed calculation helper macros. This actally fixes tmp121, where
comment did not match code (comment was correct, confirmed against
data sheet).
1.4
19-Jan-2022
thorpej
Pass the device_t into spi_configure(), and make the API contract that
spi_configure() will print errors if they occur; the driver is off the
hook.
1.3
19-Jan-2022
thorpej
Probe / match routines should not have side-effects: do the spi_configure()
calls in the attach routines.
1.2
17-Jan-2022
thorpej
G/C mcpgpio_softc::sc_phandle; nothing is using it.
1.1
17-Jan-2022
thorpej
Re-factor and overhaul the "mcp23s17gpio" driver as "mcpgpio", and
add support for 8-bit and I2C variants of the chip:
- MCP23008 / MCP23S08: 8-bit (I2C / SPI)
- MCP23017 / MCP23S17: 16-bit (I2C / SPI)
- MCP23018 / MCP23S18: 16-bit (I2C / SPI), open-drain outputs
The MCP23x17 and MCP23x18 are essentially identical, software-wise; we
merely report different GPIO pin capabilities (no push-pull output for
MCP23x18). Also, remove the tri-state capability that was previously
advertised by the old version of this driver; these chips have no way
to put the pin into a HI-Z mode.
All 3 I2C versions are supported, but the SPI front-end still only
supports the MCP23S17 for now (SPI autoconfiguration needs an overhaul).
mcp23s17gpio(4) remains present as a link to the new mcpgpio(4) man page.
XXX Still to-do: FDT integration, interrupt suppoort.
Indexes created Tue Sep 30 17:09:57 GMT 2025