Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Pass the controller devhandle along to the GPIO l...
details: https://anonhg.NetBSD.org/src/rev/ef0dded3195f
branches: trunk
changeset: 359701:ef0dded3195f
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon Jan 17 19:38:14 2022 +0000
description:
Pass the controller devhandle along to the GPIO layer.
diffstat:
sys/arch/arm/broadcom/bcm2835_gpio.c | 7 ++++---
sys/dev/ic/mcp23xxxgpio.c | 9 +++++----
2 files changed, 9 insertions(+), 7 deletions(-)
diffs (65 lines):
diff -r 785b867391e3 -r ef0dded3195f sys/arch/arm/broadcom/bcm2835_gpio.c
--- a/sys/arch/arm/broadcom/bcm2835_gpio.c Mon Jan 17 19:36:54 2022 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_gpio.c Mon Jan 17 19:38:14 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_gpio.c,v 1.23 2021/08/21 23:00:31 andvar Exp $ */
+/* $NetBSD: bcm2835_gpio.c,v 1.24 2022/01/17 19:38:14 thorpej Exp $ */
/*-
* Copyright (c) 2013, 2014, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_gpio.c,v 1.23 2021/08/21 23:00:31 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_gpio.c,v 1.24 2022/01/17 19:38:14 thorpej Exp $");
/*
* Driver for BCM2835 GPIO
@@ -383,7 +383,8 @@
gba.gba_gc = &sc->sc_gpio_gc;
gba.gba_pins = &sc->sc_gpio_pins[0];
gba.gba_npins = sc->sc_maxpins;
- config_found(self, &gba, gpiobus_print, CFARGS_NONE);
+ config_found(self, &gba, gpiobus_print,
+ CFARGS(.devhandle = device_handle(self)));
}
/* GPIO interrupt support functions */
diff -r 785b867391e3 -r ef0dded3195f sys/dev/ic/mcp23xxxgpio.c
--- a/sys/dev/ic/mcp23xxxgpio.c Mon Jan 17 19:36:54 2022 +0000
+++ b/sys/dev/ic/mcp23xxxgpio.c Mon Jan 17 19:38:14 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mcp23xxxgpio.c,v 1.1 2022/01/17 16:31:23 thorpej Exp $ */
+/* $NetBSD: mcp23xxxgpio.c,v 1.2 2022/01/17 19:38:14 thorpej Exp $ */
/*-
* Copyright (c) 2014, 2022 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mcp23xxxgpio.c,v 1.1 2022/01/17 16:31:23 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcp23xxxgpio.c,v 1.2 2022/01/17 19:38:14 thorpej Exp $");
/*
* Driver for Microchip serial I/O expansers:
@@ -293,7 +293,7 @@
*/
if (sc->sc_npins == 0) {
sc->sc_npins = sc->sc_variant->type == MCPGPIO_TYPE_23x08
- ? MCP23x08_GPIO_NPINS : MCP23x17_GPIO_NPINS;
+ ? MCP23x08_GPIO_NPINS : MCP23x17_GPIO_NPINS;
}
sc->sc_gpio_pins =
kmem_zalloc(sc->sc_npins * sizeof(*sc->sc_gpio_pins), KM_SLEEP);
@@ -348,7 +348,8 @@
gba.gba_pins = sc->sc_gpio_pins;
gba.gba_npins = sc->sc_npins;
- config_found(sc->sc_dev, &gba, gpiobus_print, CFARGS_NONE);
+ config_found(sc->sc_dev, &gba, gpiobus_print,
+ CFARGS(.devhandle = device_handle(sc->sc_dev)));
#else
aprint_normal_dev(sc->sc_dev, "no GPIO configured in kernel");
#endif
Home |
Main Index |
Thread Index |
Old Index