Lines Matching refs:rf

26     struct regulator_fixed *rf = raw_to_regulator_fixed(reg_np);  in regulator_fixed_enable()  local
27 struct rt_regulator_param *param = &rf->param; in regulator_fixed_enable()
29 if (rf->enable_pin < 0 || param->always_on) in regulator_fixed_enable()
34 rt_pin_mode(rf->enable_pin, PIN_MODE_OUTPUT); in regulator_fixed_enable()
35 rt_pin_write(rf->enable_pin, param->enable_active_high ? PIN_HIGH : PIN_LOW); in regulator_fixed_enable()
42 struct regulator_fixed *rf = raw_to_regulator_fixed(reg_np); in regulator_fixed_disable() local
43 struct rt_regulator_param *param = &rf->param; in regulator_fixed_disable()
45 if (rf->enable_pin < 0 || param->always_on) in regulator_fixed_disable()
50 rt_pin_mode(rf->enable_pin, PIN_MODE_OUTPUT); in regulator_fixed_disable()
51 rt_pin_write(rf->enable_pin, param->enable_active_high ? PIN_LOW: PIN_HIGH); in regulator_fixed_disable()
59 struct regulator_fixed *rf = raw_to_regulator_fixed(reg_np); in regulator_fixed_is_enabled() local
60 struct rt_regulator_param *param = &rf->param; in regulator_fixed_is_enabled()
62 if (rf->enable_pin < 0 || param->always_on) in regulator_fixed_is_enabled()
67 rt_pin_mode(rf->enable_pin, PIN_MODE_INPUT); in regulator_fixed_is_enabled()
68 active = rt_pin_read(rf->enable_pin); in regulator_fixed_is_enabled()
80 struct regulator_fixed *rf = raw_to_regulator_fixed(reg_np); in regulator_fixed_get_voltage() local
82 return rf->param.min_uvolt + (rf->param.max_uvolt - rf->param.min_uvolt) / 2; in regulator_fixed_get_voltage()
98 struct regulator_fixed *rf = rt_calloc(1, sizeof(*rf)); in regulator_fixed_probe() local
101 if (!rf) in regulator_fixed_probe()
106 regulator_ofw_parse(dev->ofw_node, &rf->param); in regulator_fixed_probe()
108 rnp = &rf->parent; in regulator_fixed_probe()
109 rnp->supply_name = rf->param.name; in regulator_fixed_probe()
111 rnp->param = &rf->param; in regulator_fixed_probe()
114 rf->enable_pin = rt_pin_get_named_pin(dev, "enable", 0, RT_NULL, RT_NULL); in regulator_fixed_probe()
116 if (rf->enable_pin < 0) in regulator_fixed_probe()
118 rf->enable_pin = rt_pin_get_named_pin(dev, RT_NULL, 0, RT_NULL, RT_NULL); in regulator_fixed_probe()
121 if (rf->enable_pin < 0) in regulator_fixed_probe()
123 rf->enable_pin = -1; in regulator_fixed_probe()
130 rf->param.enable_delay = val; in regulator_fixed_probe()
135 rf->param.off_on_delay = val; in regulator_fixed_probe()
146 rt_free(rf); in regulator_fixed_probe()