Lines Matching full:states
58 struct gpioregulator_state *states; member
134 if (sc->def->states[n].val >= min_uvolt && in gpioregulator_regnode_set_voltage()
135 sc->def->states[n].val <= max_uvolt) { in gpioregulator_regnode_set_voltage()
136 state = &sc->def->states[n]; in gpioregulator_regnode_set_voltage()
174 if (sc->def->states[n].mask == mask) { in gpioregulator_regnode_get_voltage()
175 *uvolt = sc->def->states[n].val; in gpioregulator_regnode_get_voltage()
212 /* "states" property (required) */ in gpioregulator_parse_fdt()
213 len = OF_getencprop_alloc_multi(node, "states", sizeof(*pstates), in gpioregulator_parse_fdt()
216 device_printf(sc->dev, "invalid 'states' property\n"); in gpioregulator_parse_fdt()
221 sc->init_def.states = malloc(sc->init_def.nstates * in gpioregulator_parse_fdt()
222 sizeof(*sc->init_def.states), M_DEVBUF, M_WAITOK); in gpioregulator_parse_fdt()
224 sc->init_def.states[n].val = pstates[n * 2 + 0]; in gpioregulator_parse_fdt()
225 sc->init_def.states[n].mask = pstates[n * 2 + 1]; in gpioregulator_parse_fdt()
226 mask |= sc->init_def.states[n].mask; in gpioregulator_parse_fdt()
262 free(sc->init_def.states, M_DEVBUF); in gpioregulator_parse_fdt()