Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/mv/mv_ts.c
Show All 12 Lines | |||||
sc->sc_dev = dev; | sc->sc_dev = dev; | ||||
error = bus_alloc_resources(dev, mvts_res, sc->sc_res); | error = bus_alloc_resources(dev, mvts_res, sc->sc_res); | ||||
if (error) { | if (error) { | ||||
device_printf(dev, "could not allocate resources\n"); | device_printf(dev, "could not allocate resources\n"); | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
ctx = device_get_sysctl_ctx(dev); | ctx = device_get_sysctl_ctx(dev); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), | ||||
OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, dev, | OID_AUTO, "temperature", | ||||
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, | |||||
0, ts_sysctl_handler, "IK", "Current Temperature"); | 0, ts_sysctl_handler, "IK", "Current Temperature"); | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
ts_detach(device_t dev) | ts_detach(device_t dev) | ||||
{ | { | ||||
Show All 12 Lines |