Home
last modified time | relevance | path

Searched refs:uc_pdata (Results 1 – 25 of 38) sorted by relevance

12

/external/u-boot/drivers/power/regulator/
Dregulator-uclass.c16 struct dm_regulator_uclass_platdata *uc_pdata; in regulator_mode() local
20 uc_pdata = dev_get_uclass_platdata(dev); in regulator_mode()
21 if (!uc_pdata) in regulator_mode()
24 *modep = uc_pdata->mode; in regulator_mode()
25 return uc_pdata->mode_count; in regulator_mode()
52 struct dm_regulator_uclass_platdata *uc_pdata; in regulator_set_value() local
55 uc_pdata = dev_get_uclass_platdata(dev); in regulator_set_value()
56 if (uc_pdata->min_uV != -ENODATA && uV < uc_pdata->min_uV) in regulator_set_value()
58 if (uc_pdata->max_uV != -ENODATA && uV > uc_pdata->max_uV) in regulator_set_value()
64 if (uc_pdata->ramp_delay) { in regulator_set_value()
[all …]
Dfixed.c17 struct dm_regulator_uclass_platdata *uc_pdata; in fixed_regulator_ofdata_to_platdata() local
21 uc_pdata = dev_get_uclass_platdata(dev); in fixed_regulator_ofdata_to_platdata()
22 if (!uc_pdata) in fixed_regulator_ofdata_to_platdata()
25 uc_pdata->type = REGULATOR_TYPE_FIXED; in fixed_regulator_ofdata_to_platdata()
32 struct dm_regulator_uclass_platdata *uc_pdata; in fixed_regulator_get_value() local
34 uc_pdata = dev_get_uclass_platdata(dev); in fixed_regulator_get_value()
35 if (!uc_pdata) in fixed_regulator_get_value()
38 if (uc_pdata->min_uV != uc_pdata->max_uV) { in fixed_regulator_get_value()
39 debug("Invalid constraints for: %s\n", uc_pdata->name); in fixed_regulator_get_value()
43 return uc_pdata->min_uV; in fixed_regulator_get_value()
[all …]
Dpalmas_regulator.c54 struct dm_regulator_uclass_platdata *uc_pdata; in palmas_smps_enable() local
56 uc_pdata = dev_get_uclass_platdata(dev); in palmas_smps_enable()
57 adr = uc_pdata->ctrl_reg; in palmas_smps_enable()
123 struct dm_regulator_uclass_platdata *uc_pdata; in palmas_smps_val() local
125 uc_pdata = dev_get_uclass_platdata(dev); in palmas_smps_val()
130 adr = uc_pdata->volt_reg; in palmas_smps_val()
199 struct dm_regulator_uclass_platdata *uc_pdata; in palmas_ldo_enable() local
201 uc_pdata = dev_get_uclass_platdata(dev); in palmas_ldo_enable()
202 adr = uc_pdata->ctrl_reg; in palmas_ldo_enable()
259 struct dm_regulator_uclass_platdata *uc_pdata; in palmas_ldo_val() local
[all …]
Dlp873x_regulator.c27 struct dm_regulator_uclass_platdata *uc_pdata; in lp873x_buck_enable() local
29 uc_pdata = dev_get_uclass_platdata(dev); in lp873x_buck_enable()
30 adr = uc_pdata->ctrl_reg; in lp873x_buck_enable()
90 struct dm_regulator_uclass_platdata *uc_pdata; in lp873x_buck_val() local
92 uc_pdata = dev_get_uclass_platdata(dev); in lp873x_buck_val()
97 adr = uc_pdata->volt_reg; in lp873x_buck_val()
129 struct dm_regulator_uclass_platdata *uc_pdata; in lp873x_ldo_enable() local
131 uc_pdata = dev_get_uclass_platdata(dev); in lp873x_ldo_enable()
132 adr = uc_pdata->ctrl_reg; in lp873x_ldo_enable()
185 struct dm_regulator_uclass_platdata *uc_pdata; in lp873x_ldo_val() local
[all …]
Dtps65941_regulator.c31 struct dm_regulator_uclass_platdata *uc_pdata; in tps65941_buck_enable() local
33 uc_pdata = dev_get_uclass_platdata(dev); in tps65941_buck_enable()
34 adr = uc_pdata->ctrl_reg; in tps65941_buck_enable()
122 struct dm_regulator_uclass_platdata *uc_pdata; in tps65941_buck_val() local
124 uc_pdata = dev_get_uclass_platdata(dev); in tps65941_buck_val()
129 adr = uc_pdata->volt_reg; in tps65941_buck_val()
154 slew = pmic_reg_read(dev->parent, uc_pdata->ctrl_reg + 1); in tps65941_buck_val()
183 struct dm_regulator_uclass_platdata *uc_pdata; in tps65941_ldo_enable() local
185 uc_pdata = dev_get_uclass_platdata(dev); in tps65941_ldo_enable()
186 adr = uc_pdata->ctrl_reg; in tps65941_ldo_enable()
[all …]
Dstpmic1.c186 struct dm_regulator_uclass_platdata *uc_pdata; in stpmic1_buck_set_enable() local
196 uc_pdata = dev_get_uclass_platdata(dev); in stpmic1_buck_set_enable()
198 if (uv < uc_pdata->min_uV || uv > uc_pdata->max_uV) in stpmic1_buck_set_enable()
199 stpmic1_buck_set_value(dev, uc_pdata->min_uV); in stpmic1_buck_set_enable()
233 struct dm_regulator_uclass_platdata *uc_pdata; in stpmic1_buck_probe() local
238 uc_pdata = dev_get_uclass_platdata(dev); in stpmic1_buck_probe()
240 uc_pdata->type = REGULATOR_TYPE_BUCK; in stpmic1_buck_probe()
241 uc_pdata->mode = (struct dm_regulator_mode *)buck_modes; in stpmic1_buck_probe()
242 uc_pdata->mode_count = ARRAY_SIZE(buck_modes); in stpmic1_buck_probe()
365 struct dm_regulator_uclass_platdata *uc_pdata; in stpmic1_ldo_set_enable() local
[all …]
Dsandbox.c143 struct dm_regulator_uclass_platdata *uc_pdata; in out_get_mode() local
149 uc_pdata = dev_get_uclass_platdata(dev); in out_get_mode()
158 for (i = 0; i < uc_pdata->mode_count; i++) { in out_get_mode()
159 if (reg_val == uc_pdata->mode[i].register_value) in out_get_mode()
160 return uc_pdata->mode[i].id; in out_get_mode()
169 struct dm_regulator_uclass_platdata *uc_pdata; in out_set_mode() local
175 uc_pdata = dev_get_uclass_platdata(dev); in out_set_mode()
177 if (mode >= uc_pdata->mode_count) in out_set_mode()
180 for (i = 0; i < uc_pdata->mode_count; i++) { in out_set_mode()
181 if (mode == uc_pdata->mode[i].id) { in out_set_mode()
[all …]
Dlp87565_regulator.c25 struct dm_regulator_uclass_platdata *uc_pdata; in lp87565_buck_enable() local
27 uc_pdata = dev_get_uclass_platdata(dev); in lp87565_buck_enable()
28 adr = uc_pdata->ctrl_reg; in lp87565_buck_enable()
88 struct dm_regulator_uclass_platdata *uc_pdata; in lp87565_buck_val() local
90 uc_pdata = dev_get_uclass_platdata(dev); in lp87565_buck_val()
95 adr = uc_pdata->volt_reg; in lp87565_buck_val()
125 struct dm_regulator_uclass_platdata *uc_pdata; in lp87565_buck_probe() local
128 uc_pdata = dev_get_uclass_platdata(dev); in lp87565_buck_probe()
129 uc_pdata->type = REGULATOR_TYPE_BUCK; in lp87565_buck_probe()
143 uc_pdata->ctrl_reg = lp87565_buck_ctrl1[idx]; in lp87565_buck_probe()
[all …]
Dpfuze100.c262 struct dm_regulator_uclass_platdata *uc_pdata; in pfuze100_regulator_probe() local
292 uc_pdata = dev_get_uclass_platdata(dev); in pfuze100_regulator_probe()
294 uc_pdata->type = desc->type; in pfuze100_regulator_probe()
295 if (uc_pdata->type == REGULATOR_TYPE_BUCK) { in pfuze100_regulator_probe()
297 uc_pdata->mode = pfuze_swbst_modes; in pfuze100_regulator_probe()
298 uc_pdata->mode_count = ARRAY_SIZE(pfuze_swbst_modes); in pfuze100_regulator_probe()
300 uc_pdata->mode = pfuze_sw_modes; in pfuze100_regulator_probe()
301 uc_pdata->mode_count = ARRAY_SIZE(pfuze_sw_modes); in pfuze100_regulator_probe()
303 } else if (uc_pdata->type == REGULATOR_TYPE_LDO) { in pfuze100_regulator_probe()
304 uc_pdata->mode = pfuze_ldo_modes; in pfuze100_regulator_probe()
[all …]
Dgpio-regulator.c30 struct dm_regulator_uclass_platdata *uc_pdata; in gpio_regulator_ofdata_to_platdata() local
39 uc_pdata = dev_get_uclass_platdata(dev); in gpio_regulator_ofdata_to_platdata()
40 if (!uc_pdata) in gpio_regulator_ofdata_to_platdata()
44 uc_pdata->type = REGULATOR_TYPE_GPIO; in gpio_regulator_ofdata_to_platdata()
75 struct dm_regulator_uclass_platdata *uc_pdata; in gpio_regulator_get_value() local
82 uc_pdata = dev_get_uclass_platdata(dev); in gpio_regulator_get_value()
83 if (uc_pdata->min_uV > uc_pdata->max_uV) { in gpio_regulator_get_value()
84 debug("Invalid constraints for: %s\n", uc_pdata->name); in gpio_regulator_get_value()
Das3722_regulator.c116 struct dm_regulator_uclass_platdata *uc_pdata; in as3722_stepdown_probe() local
118 uc_pdata = dev_get_uclass_platdata(dev); in as3722_stepdown_probe()
120 uc_pdata->type = REGULATOR_TYPE_BUCK; in as3722_stepdown_probe()
127 struct dm_regulator_uclass_platdata *uc_pdata; in as3722_ldo_probe() local
129 uc_pdata = dev_get_uclass_platdata(dev); in as3722_ldo_probe()
131 uc_pdata->type = REGULATOR_TYPE_LDO; in as3722_ldo_probe()
Dpwm_regulator.c123 struct dm_regulator_uclass_platdata *uc_pdata; in pwm_regulator_probe() local
125 uc_pdata = dev_get_uclass_platdata(dev); in pwm_regulator_probe()
127 uc_pdata->type = REGULATOR_TYPE_BUCK; in pwm_regulator_probe()
128 uc_pdata->mode_count = 0; in pwm_regulator_probe()
129 priv->max_voltage = uc_pdata->max_uV; in pwm_regulator_probe()
130 priv->min_voltage = uc_pdata->min_uV; in pwm_regulator_probe()
Ds5m8767.c133 struct dm_regulator_uclass_platdata *uc_pdata; in s5m8767_ldo_probe() local
135 uc_pdata = dev_get_uclass_platdata(dev); in s5m8767_ldo_probe()
137 uc_pdata->type = REGULATOR_TYPE_LDO; in s5m8767_ldo_probe()
138 uc_pdata->mode_count = 0; in s5m8767_ldo_probe()
202 struct dm_regulator_uclass_platdata *uc_pdata; in s5m8767_buck_probe() local
204 uc_pdata = dev_get_uclass_platdata(dev); in s5m8767_buck_probe()
206 uc_pdata->type = REGULATOR_TYPE_BUCK; in s5m8767_buck_probe()
207 uc_pdata->mode_count = 0; in s5m8767_buck_probe()
/external/u-boot/cmd/
Dregulator.c27 struct dm_regulator_uclass_platdata *uc_pdata; in do_dev() local
45 uc_pdata = dev_get_uclass_platdata(currdev); in do_dev()
46 if (!uc_pdata) { in do_dev()
51 printf("dev: %s @ %s\n", uc_pdata->name, currdev->name); in do_dev()
58 struct dm_regulator_uclass_platdata **uc_pdata, in curr_dev_and_platdata() argument
62 *uc_pdata = NULL; in curr_dev_and_platdata()
71 *uc_pdata = dev_get_uclass_platdata(*devp); in curr_dev_and_platdata()
72 if (!*uc_pdata) { in curr_dev_and_platdata()
77 if (!allow_type_fixed && (*uc_pdata)->type == REGULATOR_TYPE_FIXED) { in curr_dev_and_platdata()
87 struct dm_regulator_uclass_platdata *uc_pdata; in do_list() local
[all …]
/external/u-boot/drivers/remoteproc/
Dsandbox_testproc.c126 struct dm_rproc_uclass_pdata *uc_pdata; in sandbox_testproc_probe() local
130 uc_pdata = dev_get_uclass_platdata(dev); in sandbox_testproc_probe()
133 debug("%s: platform private data missing\n", uc_pdata->name); in sandbox_testproc_probe()
137 debug("%s: called(%d)\n", uc_pdata->name, ret); in sandbox_testproc_probe()
150 struct dm_rproc_uclass_pdata *uc_pdata; in sandbox_testproc_init() local
153 uc_pdata = dev_get_uclass_platdata(dev); in sandbox_testproc_init()
157 debug("%s: called(%d)\n", uc_pdata->name, ret); in sandbox_testproc_init()
159 debug("%s init failed\n", uc_pdata->name); in sandbox_testproc_init()
172 struct dm_rproc_uclass_pdata *uc_pdata; in sandbox_testproc_reset() local
175 uc_pdata = dev_get_uclass_platdata(dev); in sandbox_testproc_reset()
[all …]
Drproc-uclass.c31 struct dm_rproc_uclass_pdata *uc_pdata, in for_each_remoteproc_device() argument
37 struct dm_rproc_uclass_pdata *uc_pdata; in for_each_remoteproc_device() local
44 uc_pdata = dev_get_uclass_platdata(dev); in for_each_remoteproc_device()
45 ret = fn(dev, uc_pdata, data); in for_each_remoteproc_device()
63 struct dm_rproc_uclass_pdata *uc_pdata, in _rproc_name_is_unique() argument
69 if (!uc_pdata->name || !check_name) in _rproc_name_is_unique()
73 if (strlen(uc_pdata->name) != strlen(check_name)) in _rproc_name_is_unique()
76 if (!strcmp(uc_pdata->name, check_name)) in _rproc_name_is_unique()
110 struct dm_rproc_uclass_pdata *uc_pdata; in rproc_pre_probe() local
113 uc_pdata = dev_get_uclass_platdata(dev); in rproc_pre_probe()
[all …]
Dti_power_proc.c69 struct dm_rproc_uclass_pdata *uc_pdata; in ti_powerproc_probe() local
73 uc_pdata = dev_get_uclass_platdata(dev); in ti_powerproc_probe()
79 uc_pdata->name, priv->loadaddr, priv->psc_module, ret); in ti_powerproc_probe()
94 struct dm_rproc_uclass_pdata *uc_pdata; in ti_powerproc_load() local
98 uc_pdata = dev_get_uclass_platdata(dev); in ti_powerproc_load()
99 if (!uc_pdata) { in ti_powerproc_load()
108 uc_pdata->name, priv->psc_module, ret); in ti_powerproc_load()
113 uc_pdata->name, addr, size, priv->loadaddr); in ti_powerproc_load()
117 debug("%s: Complete!\n", uc_pdata->name); in ti_powerproc_load()
129 struct dm_rproc_uclass_pdata *uc_pdata; in ti_powerproc_start() local
[all …]
/external/u-boot/drivers/adc/
Dadc-uclass.c31 struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev); in check_channel() local
39 if ((uc_pdata->channel_mask >= mask) && (uc_pdata->channel_mask & mask)) in check_channel()
50 struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev); in adc_supply_enable() local
54 if (uc_pdata->vdd_supply) { in adc_supply_enable()
56 ret = regulator_set_enable(uc_pdata->vdd_supply, true); in adc_supply_enable()
59 if (!ret && uc_pdata->vss_supply) { in adc_supply_enable()
61 ret = regulator_set_enable(uc_pdata->vss_supply, true); in adc_supply_enable()
72 struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev); in adc_data_mask() local
74 if (!uc_pdata) in adc_data_mask()
77 *data_mask = uc_pdata->data_mask; in adc_data_mask()
[all …]
Dstm32-adc.c79 struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev); in stm32_adc_start_channel() local
119 writel(uc_pdata->channel_mask, adc->regs + STM32H7_ADC_PCSEL); in stm32_adc_start_channel()
163 struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev); in stm32_adc_chan_of_init() local
193 uc_pdata->channel_mask |= 1 << chans[i]; in stm32_adc_chan_of_init()
196 uc_pdata->data_mask = (1 << adc->cfg->num_bits) - 1; in stm32_adc_chan_of_init()
197 uc_pdata->data_format = ADC_DATA_FORMAT_BIN; in stm32_adc_chan_of_init()
198 uc_pdata->data_timeout_us = 100000; in stm32_adc_chan_of_init()
205 struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev); in stm32_adc_probe() local
219 uc_pdata->vdd_supply = common->vref; in stm32_adc_probe()
220 uc_pdata->vdd_microvolts = common->vref_uv; in stm32_adc_probe()
[all …]
Drockchip-saradc.c45 struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev); in rockchip_saradc_channel_data() local
58 *data &= uc_pdata->data_mask; in rockchip_saradc_channel_data()
120 struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev); in rockchip_saradc_ofdata_to_platdata() local
132 uc_pdata->data_mask = (1 << priv->data->num_bits) - 1;; in rockchip_saradc_ofdata_to_platdata()
133 uc_pdata->data_format = ADC_DATA_FORMAT_BIN; in rockchip_saradc_ofdata_to_platdata()
134 uc_pdata->data_timeout_us = SARADC_TIMEOUT / 5; in rockchip_saradc_ofdata_to_platdata()
135 uc_pdata->channel_mask = (1 << priv->data->num_channels) - 1; in rockchip_saradc_ofdata_to_platdata()
Dsandbox.c140 struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev); in sandbox_adc_ofdata_to_platdata() local
142 uc_pdata->data_mask = SANDBOX_ADC_DATA_MASK; in sandbox_adc_ofdata_to_platdata()
143 uc_pdata->data_format = ADC_DATA_FORMAT_BIN; in sandbox_adc_ofdata_to_platdata()
144 uc_pdata->data_timeout_us = 0; in sandbox_adc_ofdata_to_platdata()
147 uc_pdata->channel_mask = (1 << SANDBOX_ADC_CHANNELS) - 1; in sandbox_adc_ofdata_to_platdata()
Dexynos-adc.c106 struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev); in exynos_adc_ofdata_to_platdata() local
115 uc_pdata->data_mask = ADC_V2_DAT_MASK; in exynos_adc_ofdata_to_platdata()
116 uc_pdata->data_format = ADC_DATA_FORMAT_BIN; in exynos_adc_ofdata_to_platdata()
117 uc_pdata->data_timeout_us = ADC_V2_CONV_TIMEOUT_US; in exynos_adc_ofdata_to_platdata()
120 uc_pdata->channel_mask = (2 << ADC_V2_MAX_CHANNEL) - 1; in exynos_adc_ofdata_to_platdata()
/external/u-boot/test/dm/
Dregulator.c51 struct dm_regulator_uclass_platdata *uc_pdata; in dm_test_power_regulator_get() local
78 uc_pdata = dev_get_uclass_platdata(dev_by_platname); in dm_test_power_regulator_get()
79 ut_assert(uc_pdata); in dm_test_power_regulator_get()
80 ut_asserteq_str(platname, uc_pdata->name); in dm_test_power_regulator_get()
96 struct dm_regulator_uclass_platdata *uc_pdata; in dm_test_power_regulator_set_get_voltage() local
105 uc_pdata = dev_get_uclass_platdata(dev); in dm_test_power_regulator_set_get_voltage()
106 ut_assert(uc_pdata); in dm_test_power_regulator_set_get_voltage()
108 val_set = uc_pdata->min_uV; in dm_test_power_regulator_set_get_voltage()
123 struct dm_regulator_uclass_platdata *uc_pdata; in dm_test_power_regulator_set_get_current() local
132 uc_pdata = dev_get_uclass_platdata(dev); in dm_test_power_regulator_set_get_current()
[all …]
Dtest-uclass.c32 struct dm_test_perdev_uc_pdata *uc_pdata; in test_post_bind() local
37 uc_pdata = dev_get_uclass_platdata(dev); in test_post_bind()
38 ut_assert(uc_pdata); in test_post_bind()
40 uc_pdata->intval1 = TEST_UC_PDATA_INTVAL1; in test_post_bind()
41 uc_pdata->intval2 = TEST_UC_PDATA_INTVAL2; in test_post_bind()
42 uc_pdata->intval3 = TEST_UC_PDATA_INTVAL3; in test_post_bind()
/external/u-boot/arch/arm/mach-stm32mp/
Dpwr_regulator.c136 struct dm_regulator_uclass_platdata *uc_pdata; in stm32mp_pwr_regulator_probe() local
138 uc_pdata = dev_get_uclass_platdata(dev); in stm32mp_pwr_regulator_probe()
165 uc_pdata->type = REGULATOR_TYPE_FIXED; in stm32mp_pwr_regulator_probe()
173 struct dm_regulator_uclass_platdata *uc_pdata; in stm32mp_pwr_regulator_set_value() local
175 uc_pdata = dev_get_uclass_platdata(dev); in stm32mp_pwr_regulator_set_value()
176 if (!uc_pdata) in stm32mp_pwr_regulator_set_value()
179 if (uc_pdata->min_uV != uV) { in stm32mp_pwr_regulator_set_value()
180 dev_dbg(dev, "Invalid uV=%d for: %s\n", uV, uc_pdata->name); in stm32mp_pwr_regulator_set_value()
189 struct dm_regulator_uclass_platdata *uc_pdata; in stm32mp_pwr_regulator_get_value() local
191 uc_pdata = dev_get_uclass_platdata(dev); in stm32mp_pwr_regulator_get_value()
[all …]

12