Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/broadcom/bcm2835/bcm2835_bsc.c
Show All 12 Lines | |||||
/* | /* | ||||
* Add system sysctl tree/handlers. | * Add system sysctl tree/handlers. | ||||
*/ | */ | ||||
ctx = device_get_sysctl_ctx(sc->sc_dev); | ctx = device_get_sysctl_ctx(sc->sc_dev); | ||||
tree_node = device_get_sysctl_tree(sc->sc_dev); | tree_node = device_get_sysctl_tree(sc->sc_dev); | ||||
tree = SYSCTL_CHILDREN(tree_node); | tree = SYSCTL_CHILDREN(tree_node); | ||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "frequency", | SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "frequency", | ||||
CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc), | CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, | ||||
sc, sizeof(*sc), | |||||
bcm_bsc_clock_proc, "IU", "I2C BUS clock frequency"); | bcm_bsc_clock_proc, "IU", "I2C BUS clock frequency"); | ||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "clock_stretch", | SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "clock_stretch", | ||||
CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc), | CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, | ||||
sc, sizeof(*sc), | |||||
bcm_bsc_clkt_proc, "IU", "I2C BUS clock stretch timeout"); | bcm_bsc_clkt_proc, "IU", "I2C BUS clock stretch timeout"); | ||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "fall_edge_delay", | SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "fall_edge_delay", | ||||
CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc), | CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, | ||||
sc, sizeof(*sc), | |||||
bcm_bsc_fall_proc, "IU", "I2C BUS falling edge delay"); | bcm_bsc_fall_proc, "IU", "I2C BUS falling edge delay"); | ||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "rise_edge_delay", | SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "rise_edge_delay", | ||||
CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc), | CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, | ||||
sc, sizeof(*sc), | |||||
bcm_bsc_rise_proc, "IU", "I2C BUS rising edge delay"); | bcm_bsc_rise_proc, "IU", "I2C BUS rising edge delay"); | ||||
SYSCTL_ADD_INT(ctx, tree, OID_AUTO, "debug", | SYSCTL_ADD_INT(ctx, tree, OID_AUTO, "debug", | ||||
CTLFLAG_RWTUN, &sc->sc_debug, 0, | CTLFLAG_RWTUN, &sc->sc_debug, 0, | ||||
"Enable debug; 1=reads/writes, 2=add starts/stops"); | "Enable debug; 1=reads/writes, 2=add starts/stops"); | ||||
} | } | ||||
static void | static void | ||||
bcm_bsc_reset(struct bcm_bsc_softc *sc) | bcm_bsc_reset(struct bcm_bsc_softc *sc) | ||||
Show All 12 Lines |