Module Name: src Committed By: thorpej Date: Mon Jan 17 16:33:00 UTC 2022
Modified Files: src/sys/conf: files Log Message: 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.) To generate a diff of this commit: cvs rdiff -u -r1.1293 -r1.1294 src/sys/conf/files Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/conf/files diff -u src/sys/conf/files:1.1293 src/sys/conf/files:1.1294 --- src/sys/conf/files:1.1293 Mon Jan 3 17:19:41 2022 +++ src/sys/conf/files Mon Jan 17 16:33:00 2022 @@ -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 @@ file dev/ic/nslm7x.c lm needs-flag 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