MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ts_probe

Function ts_probe

freebsd/arm/mv/mv_ts.c:57–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55};
56
57static int
58ts_probe(device_t dev)
59{
60 uint32_t d, r;
61
62 if (!ofw_bus_status_okay(dev))
63 return (ENXIO);
64
65 if (!ofw_bus_is_compatible(dev, "mrvl,ts"))
66 return (ENXIO);
67 soc_id(&d, &r);
68 switch (d) {
69 case MV_DEV_88F6282:
70 break;
71 default:
72 device_printf(dev, "unsupported SoC (ID: 0x%08X)!\n", d);
73 return (ENXIO);
74 }
75 device_set_desc(dev, "Marvell Thermal Sensor");
76
77 return (0);
78}
79
80#define MV_TEMP_VALID_BIT (1 << 9)
81#define MV_TEMP_SENS_OFFS 10

Callers

nothing calls this directly

Calls 3

soc_idFunction · 0.85
device_printfFunction · 0.85
device_set_descFunction · 0.85

Tested by

no test coverage detected