Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/allwinner/aw_ts.c
Show All 12 Lines | |||||
WRITE(sc, TP_TPR, TP_TPR_TEMP_EN | TP_TPR_TEMP_PERIOD(1953)); | WRITE(sc, TP_TPR, TP_TPR_TEMP_EN | TP_TPR_TEMP_PERIOD(1953)); | ||||
/* Enable temp irq */ | /* Enable temp irq */ | ||||
WRITE(sc, TP_FIFOC, TP_FIFOC_TEMP_IRQ_ENABLE); | WRITE(sc, TP_FIFOC, TP_FIFOC_TEMP_IRQ_ENABLE); | ||||
/* Add sysctl */ | /* Add sysctl */ | ||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), | SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), | ||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), | SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), | ||||
OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, | OID_AUTO, "temperature", | ||||
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, | |||||
&sc->temp_data, 0, sysctl_handle_int, | &sc->temp_data, 0, sysctl_handle_int, | ||||
"IK3", "CPU Temperature"); | "IK3", "CPU Temperature"); | ||||
return (0); | return (0); | ||||
} | } | ||||
static device_method_t aw_ts_methods[] = { | static device_method_t aw_ts_methods[] = { | ||||
DEVMETHOD(device_probe, aw_ts_probe), | DEVMETHOD(device_probe, aw_ts_probe), | ||||
Show All 12 Lines |