Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/conf Re-factor and overhaul the "mcp23s17gpio" driver as...
details: https://anonhg.NetBSD.org/src/rev/c9f3374b2bf5
branches: trunk
changeset: 359692:c9f3374b2bf5
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon Jan 17 16:33:00 2022 +0000
description:
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.
(File missed in prior commit.)
diffstat:
sys/conf/files | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r 721dad51c18a -r c9f3374b2bf5 sys/conf/files
--- a/sys/conf/files Mon Jan 17 16:31:23 2022 +0000
+++ b/sys/conf/files Mon Jan 17 16:33:00 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files,v 1.1293 2022/01/03 17:19:41 jmcneill Exp $
+# $NetBSD: files,v 1.1294 2022/01/17 16:33:00 thorpej Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
version 20171118
@@ -420,6 +420,10 @@
device spdmem
file dev/ic/spdmem.c spdmem
+# Microchip MCP23x08 / MCP23x17 general purpose input/output
+device mcpgpio: gpiobus
+file dev/ic/mcp23xxxgpio.c mcpgpio
+
# SSD1306 or SH1106 OLED/PLED display (attaches via I2C or SPI)
device ssdfb: wsemuldisplaydev
file dev/ic/ssdfb.c ssdfb
Home |
Main Index |
Thread Index |
Old Index