Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/broadcom/bcm2835/bcm2835_gpio.c
Show All 12 Lines | |||||
CTLFLAG_RD, NULL, "GPIO Pin"); | CTLFLAG_RD, NULL, "GPIO Pin"); | ||||
pinN_tree = SYSCTL_CHILDREN(pinN_node); | pinN_tree = SYSCTL_CHILDREN(pinN_node); | ||||
sc->sc_sysctl[i].sc = sc; | sc->sc_sysctl[i].sc = sc; | ||||
sc_sysctl = &sc->sc_sysctl[i]; | sc_sysctl = &sc->sc_sysctl[i]; | ||||
sc_sysctl->sc = sc; | sc_sysctl->sc = sc; | ||||
sc_sysctl->pin = sc->sc_gpio_pins[i].gp_pin; | sc_sysctl->pin = sc->sc_gpio_pins[i].gp_pin; | ||||
SYSCTL_ADD_PROC(ctx, pinN_tree, OID_AUTO, "function", | SYSCTL_ADD_PROC(ctx, pinN_tree, OID_AUTO, "function", | ||||
CTLFLAG_RW | CTLTYPE_STRING, sc_sysctl, | CTLFLAG_RW | CTLTYPE_STRING | CTLFLAG_NEEDGIANT, sc_sysctl, | ||||
sizeof(struct bcm_gpio_sysctl), bcm_gpio_func_proc, | sizeof(struct bcm_gpio_sysctl), bcm_gpio_func_proc, | ||||
"A", "Pin Function"); | "A", "Pin Function"); | ||||
} | } | ||||
} | } | ||||
static int | static int | ||||
bcm_gpio_get_ro_pins(struct bcm_gpio_softc *sc, phandle_t node, | bcm_gpio_get_ro_pins(struct bcm_gpio_softc *sc, phandle_t node, | ||||
const char *propname, const char *label) | const char *propname, const char *label) | ||||
Show All 12 Lines |