Lines Matching refs:dev
39 #include <dev/ofw/ofw_bus.h>
40 #include <dev/ofw/openfirm.h>
46 device_t dev;
53 static int pmufreq_probe(device_t dev);
54 static int pmufreq_attach(device_t dev);
55 static int pmufreq_settings(device_t dev, struct cf_setting *sets, int *count);
56 static int pmufreq_set(device_t dev, const struct cf_setting *set);
57 static int pmufreq_get(device_t dev, struct cf_setting *set);
58 static int pmufreq_type(device_t dev, int *type);
107 pmufreq_probe(device_t dev)
116 sc = device_get_softc(dev);
117 node = ofw_bus_get_node(device_get_parent(dev));
124 device_set_desc(dev, "PMU-based frequency scaling");
129 pmufreq_attach(device_t dev)
134 sc = device_get_softc(dev);
135 sc->dev = dev;
137 node = ofw_bus_get_node(device_get_parent(dev));
145 cpufreq_register(dev);
150 pmufreq_settings(device_t dev, struct cf_setting *sets, int *count)
154 sc = device_get_softc(dev);
163 sets[0].freq = sc->maxfreq; sets[0].dev = dev;
164 sets[1].freq = sc->minfreq; sets[1].dev = dev;
174 pmufreq_set(device_t dev, const struct cf_setting *set)
182 sc = device_get_softc(dev);
197 pmufreq_get(device_t dev, struct cf_setting *set)
203 sc = device_get_softc(dev);
206 set->dev = dev;
212 pmufreq_type(device_t dev, int *type)