Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ow/ow_temp.c
Show All 12 Lines | |||||
{ | { | ||||
struct ow_temp_softc *sc; | struct ow_temp_softc *sc; | ||||
sc = device_get_softc(dev); | sc = device_get_softc(dev); | ||||
sc->dev = dev; | sc->dev = dev; | ||||
sc->type = ow_get_family(dev); | sc->type = ow_get_family(dev); | ||||
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", CTLFLAG_RD | CTLTYPE_INT, | OID_AUTO, "temperature", | ||||
CTLFLAG_RD | CTLTYPE_INT | CTLFLAG_NEEDGIANT, | |||||
&sc->temp, 0, sysctl_handle_int, | &sc->temp, 0, sysctl_handle_int, | ||||
"IK3", "Current Temperature"); | "IK3", "Current Temperature"); | ||||
SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), | SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), | ||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), | SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), | ||||
OID_AUTO, "badcrc", CTLFLAG_RD, | OID_AUTO, "badcrc", CTLFLAG_RD, | ||||
&sc->bad_crc, 0, | &sc->bad_crc, 0, | ||||
"Number of Bad CRC on reading scratchpad"); | "Number of Bad CRC on reading scratchpad"); | ||||
SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), | SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), | ||||
Show All 12 Lines |