/external/u-boot/drivers/power/regulator/ |
D | regulator-uclass.c | 16 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 …]
|
D | fixed.c | 17 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 …]
|
D | palmas_regulator.c | 54 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 …]
|
D | lp873x_regulator.c | 27 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 …]
|
D | tps65941_regulator.c | 31 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 …]
|
D | stpmic1.c | 186 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 …]
|
D | sandbox.c | 143 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 …]
|
D | lp87565_regulator.c | 25 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 …]
|
D | pfuze100.c | 262 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 …]
|
D | gpio-regulator.c | 30 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()
|
D | as3722_regulator.c | 116 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()
|
D | pwm_regulator.c | 123 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()
|
D | s5m8767.c | 133 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/ |
D | regulator.c | 27 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/ |
D | sandbox_testproc.c | 126 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 …]
|
D | rproc-uclass.c | 31 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 …]
|
D | ti_power_proc.c | 69 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/ |
D | adc-uclass.c | 31 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 …]
|
D | stm32-adc.c | 79 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 …]
|
D | rockchip-saradc.c | 45 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()
|
D | sandbox.c | 140 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()
|
D | exynos-adc.c | 106 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/ |
D | regulator.c | 51 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 …]
|
D | test-uclass.c | 32 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/ |
D | pwr_regulator.c | 136 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 …]
|