Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/gpio/gpiobus.c
Show First 20 Lines • Show All 746 Lines • ▼ Show 20 Lines | gpiobus_hinted_child(device_t bus, const char *dname, int dunit) | ||||
} | } | ||||
if (resource_int_value(dname, dunit, "irq", &irq) == 0) { | if (resource_int_value(dname, dunit, "irq", &irq) == 0) { | ||||
if (bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1) != 0) | if (bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1) != 0) | ||||
device_printf(bus, | device_printf(bus, | ||||
"warning: bus_set_resource() failed\n"); | "warning: bus_set_resource() failed\n"); | ||||
} | } | ||||
} | } | ||||
static int | int | ||||
gpiobus_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) | gpiobus_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) | ||||
{ | { | ||||
struct gpiobus_ivar *devi; | struct gpiobus_ivar *devi; | ||||
devi = GPIOBUS_IVAR(child); | devi = GPIOBUS_IVAR(child); | ||||
switch (which) { | switch (which) { | ||||
case GPIOBUS_IVAR_NPINS: | case GPIOBUS_IVAR_NPINS: | ||||
*result = devi->npins; | *result = devi->npins; | ||||
▲ Show 20 Lines • Show All 316 Lines • Show Last 20 Lines |