Lines Matching refs:rc
62 struct fdtbus_regulator_controller *rc;
64 rc = kmem_zalloc(sizeof(*rc), KM_SLEEP);
65 rc->rc_dev = dev;
66 rc->rc_phandle = phandle;
67 rc->rc_funcs = funcs;
68 rc->rc_reg.reg_rc = rc;
70 of_getprop_uint32(phandle, "regulator-enable-ramp-delay", &rc->rc_enable_ramp_delay);
72 LIST_INSERT_HEAD(&fdtbus_regulator_controllers, rc, rc_next);
80 struct fdtbus_regulator_controller *rc;
82 LIST_FOREACH(rc, &fdtbus_regulator_controllers, rc_next) {
83 if (rc->rc_phandle == phandle)
84 return rc;
93 struct fdtbus_regulator_controller *rc;
102 rc = fdtbus_get_regulator_controller(regulator_phandle);
103 if (rc == NULL) {
107 error = rc->rc_funcs->acquire(rc->rc_dev);
109 aprint_error_dev(rc->rc_dev, "failed to acquire regulator: %d\n", error);
113 return &rc->rc_reg;
119 struct fdtbus_regulator_controller *rc = REGULATOR_TO_RC(reg);
121 rc->rc_funcs->release(rc->rc_dev);
127 struct fdtbus_regulator_controller *rc = REGULATOR_TO_RC(reg);
130 error = rc->rc_funcs->enable(rc->rc_dev, true);
134 if (rc->rc_enable_ramp_delay != 0)
135 delay(rc->rc_enable_ramp_delay);
143 struct fdtbus_regulator_controller *rc = REGULATOR_TO_RC(reg);
145 if (of_hasprop(rc->rc_phandle, "regulator-always-on"))
148 return rc->rc_funcs->enable(rc->rc_dev, false);
155 struct fdtbus_regulator_controller *rc = REGULATOR_TO_RC(reg);
157 if (rc->rc_funcs->set_voltage == NULL)
160 return rc->rc_funcs->set_voltage(rc->rc_dev, min_uvol, max_uvol);
166 struct fdtbus_regulator_controller *rc = REGULATOR_TO_RC(reg);
168 if (rc->rc_funcs->get_voltage == NULL)
171 return rc->rc_funcs->get_voltage(rc->rc_dev, puvol);
178 struct fdtbus_regulator_controller *rc = REGULATOR_TO_RC(reg);
181 if (rc->rc_funcs->set_voltage == NULL)
184 if (of_getprop_uint32(rc->rc_phandle, "regulator-min-microvolt", &uvol) == 0) {
188 if (of_getprop_uint32(rc->rc_phandle, "regulator-max-microvolt", &uvol) == 0) {