Searched refs:vreg (Results 1 - 23 of 23) sorted by relevance

/linux-4.4.14/drivers/regulator/
H A Dqcom_rpm-regulator.c197 static int rpm_reg_write(struct qcom_rpm_reg *vreg, rpm_reg_write() argument
204 vreg->val[req->word] &= ~req->mask; rpm_reg_write()
205 vreg->val[req->word] |= value << req->shift; rpm_reg_write()
207 return qcom_rpm_write(vreg->rpm, rpm_reg_write()
209 vreg->resource, rpm_reg_write()
210 vreg->val, rpm_reg_write()
211 vreg->parts->request_len); rpm_reg_write()
217 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_set_mV_sel() local
218 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_set_mV_sel()
230 mutex_lock(&vreg->lock); rpm_reg_set_mV_sel()
231 if (vreg->is_enabled) rpm_reg_set_mV_sel()
232 ret = rpm_reg_write(vreg, req, uV / 1000); rpm_reg_set_mV_sel()
235 vreg->uV = uV; rpm_reg_set_mV_sel()
236 mutex_unlock(&vreg->lock); rpm_reg_set_mV_sel()
244 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_set_uV_sel() local
245 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_set_uV_sel()
257 mutex_lock(&vreg->lock); rpm_reg_set_uV_sel()
258 if (vreg->is_enabled) rpm_reg_set_uV_sel()
259 ret = rpm_reg_write(vreg, req, uV); rpm_reg_set_uV_sel()
262 vreg->uV = uV; rpm_reg_set_uV_sel()
263 mutex_unlock(&vreg->lock); rpm_reg_set_uV_sel()
270 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_get_voltage() local
272 return vreg->uV; rpm_reg_get_voltage()
277 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_mV_enable() local
278 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_mV_enable()
285 mutex_lock(&vreg->lock); rpm_reg_mV_enable()
286 ret = rpm_reg_write(vreg, req, vreg->uV / 1000); rpm_reg_mV_enable()
288 vreg->is_enabled = 1; rpm_reg_mV_enable()
289 mutex_unlock(&vreg->lock); rpm_reg_mV_enable()
296 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_uV_enable() local
297 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_uV_enable()
304 mutex_lock(&vreg->lock); rpm_reg_uV_enable()
305 ret = rpm_reg_write(vreg, req, vreg->uV); rpm_reg_uV_enable()
307 vreg->is_enabled = 1; rpm_reg_uV_enable()
308 mutex_unlock(&vreg->lock); rpm_reg_uV_enable()
315 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_switch_enable() local
316 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_switch_enable()
323 mutex_lock(&vreg->lock); rpm_reg_switch_enable()
324 ret = rpm_reg_write(vreg, req, 1); rpm_reg_switch_enable()
326 vreg->is_enabled = 1; rpm_reg_switch_enable()
327 mutex_unlock(&vreg->lock); rpm_reg_switch_enable()
334 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_mV_disable() local
335 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_mV_disable()
342 mutex_lock(&vreg->lock); rpm_reg_mV_disable()
343 ret = rpm_reg_write(vreg, req, 0); rpm_reg_mV_disable()
345 vreg->is_enabled = 0; rpm_reg_mV_disable()
346 mutex_unlock(&vreg->lock); rpm_reg_mV_disable()
353 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_uV_disable() local
354 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_uV_disable()
361 mutex_lock(&vreg->lock); rpm_reg_uV_disable()
362 ret = rpm_reg_write(vreg, req, 0); rpm_reg_uV_disable()
364 vreg->is_enabled = 0; rpm_reg_uV_disable()
365 mutex_unlock(&vreg->lock); rpm_reg_uV_disable()
372 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_switch_disable() local
373 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_switch_disable()
380 mutex_lock(&vreg->lock); rpm_reg_switch_disable()
381 ret = rpm_reg_write(vreg, req, 0); rpm_reg_switch_disable()
383 vreg->is_enabled = 0; rpm_reg_switch_disable()
384 mutex_unlock(&vreg->lock); rpm_reg_switch_disable()
391 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_is_enabled() local
393 return vreg->is_enabled; rpm_reg_is_enabled()
398 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_set_load() local
399 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_set_load()
411 mutex_lock(&vreg->lock); rpm_reg_set_load()
412 ret = rpm_reg_write(vreg, req, load_mA); rpm_reg_set_load()
413 mutex_unlock(&vreg->lock); rpm_reg_set_load()
610 static int rpm_reg_set(struct qcom_rpm_reg *vreg, rpm_reg_set() argument
617 vreg->val[req->word] &= ~req->mask; rpm_reg_set()
618 vreg->val[req->word] |= value << req->shift; rpm_reg_set()
625 struct qcom_rpm_reg *vreg) rpm_reg_of_parse_freq()
647 rpm_reg_set(vreg, &vreg->parts->freq, i + 1); rpm_reg_of_parse_freq()
660 struct qcom_rpm_reg *vreg = config->driver_data; rpm_reg_of_parse() local
670 ret = rpm_reg_set(vreg, &vreg->parts->pd, 1); rpm_reg_of_parse()
677 if (vreg->parts->freq.mask) { rpm_reg_of_parse()
678 ret = rpm_reg_of_parse_freq(dev, node, vreg); rpm_reg_of_parse()
683 if (vreg->parts->pm.mask) { rpm_reg_of_parse()
687 ret = rpm_reg_set(vreg, &vreg->parts->pm, pwm); rpm_reg_of_parse()
694 if (vreg->parts->fm.mask) { rpm_reg_of_parse()
721 if (FORCE_MODE_IS_2_BITS(vreg)) rpm_reg_of_parse()
727 if (vreg->supports_force_mode_auto) rpm_reg_of_parse()
731 if (vreg->supports_force_mode_bypass) rpm_reg_of_parse()
741 ret = rpm_reg_set(vreg, &vreg->parts->fm, force_mode); rpm_reg_of_parse()
886 struct qcom_rpm_reg *vreg; rpm_reg_probe() local
897 vreg = devm_kmalloc(&pdev->dev, sizeof(*vreg), GFP_KERNEL); rpm_reg_probe()
898 if (!vreg) rpm_reg_probe()
901 memcpy(vreg, reg->template, sizeof(*vreg)); rpm_reg_probe()
902 mutex_init(&vreg->lock); rpm_reg_probe()
904 vreg->dev = &pdev->dev; rpm_reg_probe()
905 vreg->resource = reg->resource; rpm_reg_probe()
906 vreg->rpm = rpm; rpm_reg_probe()
908 vreg->desc.id = -1; rpm_reg_probe()
909 vreg->desc.owner = THIS_MODULE; rpm_reg_probe()
910 vreg->desc.type = REGULATOR_VOLTAGE; rpm_reg_probe()
911 vreg->desc.name = reg->name; rpm_reg_probe()
912 vreg->desc.supply_name = reg->supply; rpm_reg_probe()
913 vreg->desc.of_match = reg->name; rpm_reg_probe()
914 vreg->desc.of_parse_cb = rpm_reg_of_parse; rpm_reg_probe()
917 config.driver_data = vreg; rpm_reg_probe()
918 rdev = devm_regulator_register(&pdev->dev, &vreg->desc, &config); rpm_reg_probe()
623 rpm_reg_of_parse_freq(struct device *dev, struct device_node *node, struct qcom_rpm_reg *vreg) rpm_reg_of_parse_freq() argument
H A Dqcom_smd-regulator.c48 static int rpm_reg_write_active(struct qcom_rpm_reg *vreg, rpm_reg_write_active() argument
52 return qcom_rpm_smd_write(vreg->rpm, rpm_reg_write_active()
54 vreg->type, rpm_reg_write_active()
55 vreg->id, rpm_reg_write_active()
61 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_enable() local
69 ret = rpm_reg_write_active(vreg, &req, sizeof(req)); rpm_reg_enable()
71 vreg->is_enabled = 1; rpm_reg_enable()
78 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_is_enabled() local
80 return vreg->is_enabled; rpm_reg_is_enabled()
85 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_disable() local
93 ret = rpm_reg_write_active(vreg, &req, sizeof(req)); rpm_reg_disable()
95 vreg->is_enabled = 0; rpm_reg_disable()
102 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_get_voltage() local
104 return vreg->uV; rpm_reg_get_voltage()
112 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_set_voltage() local
120 ret = rpm_reg_write_active(vreg, &req, sizeof(req)); rpm_reg_set_voltage()
122 vreg->uV = min_uV; rpm_reg_set_voltage()
129 struct qcom_rpm_reg *vreg = rdev_get_drvdata(rdev); rpm_reg_set_load() local
136 return rpm_reg_write_active(vreg, &req, sizeof(req)); rpm_reg_set_load()
288 struct qcom_rpm_reg *vreg; rpm_reg_probe() local
299 vreg = devm_kzalloc(&pdev->dev, sizeof(*vreg), GFP_KERNEL); rpm_reg_probe()
300 if (!vreg) rpm_reg_probe()
303 vreg->dev = &pdev->dev; rpm_reg_probe()
304 vreg->type = reg->type; rpm_reg_probe()
305 vreg->id = reg->id; rpm_reg_probe()
306 vreg->rpm = rpm; rpm_reg_probe()
308 memcpy(&vreg->desc, reg->desc, sizeof(vreg->desc)); rpm_reg_probe()
310 vreg->desc.id = -1; rpm_reg_probe()
311 vreg->desc.owner = THIS_MODULE; rpm_reg_probe()
312 vreg->desc.type = REGULATOR_VOLTAGE; rpm_reg_probe()
313 vreg->desc.name = reg->name; rpm_reg_probe()
314 vreg->desc.supply_name = reg->supply; rpm_reg_probe()
315 vreg->desc.of_match = reg->name; rpm_reg_probe()
318 config.driver_data = vreg; rpm_reg_probe()
319 rdev = devm_regulator_register(&pdev->dev, &vreg->desc, &config); rpm_reg_probe()
H A Dqcom_spmi-regulator.c477 static inline int spmi_vreg_read(struct spmi_regulator *vreg, u16 addr, u8 *buf, spmi_vreg_read() argument
480 return regmap_bulk_read(vreg->regmap, vreg->base + addr, buf, len); spmi_vreg_read()
483 static inline int spmi_vreg_write(struct spmi_regulator *vreg, u16 addr, spmi_vreg_write() argument
486 return regmap_bulk_write(vreg->regmap, vreg->base + addr, buf, len); spmi_vreg_write()
489 static int spmi_vreg_update_bits(struct spmi_regulator *vreg, u16 addr, u8 val, spmi_vreg_update_bits() argument
492 return regmap_update_bits(vreg->regmap, vreg->base + addr, mask, val); spmi_vreg_update_bits()
497 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_common_is_enabled() local
500 spmi_vreg_read(vreg, SPMI_COMMON_REG_ENABLE, &reg, 1); spmi_regulator_common_is_enabled()
507 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_common_enable() local
509 return spmi_vreg_update_bits(vreg, SPMI_COMMON_REG_ENABLE, spmi_regulator_common_enable()
515 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_vs_enable() local
517 if (vreg->ocp_irq) { spmi_regulator_vs_enable()
518 vreg->ocp_count = 0; spmi_regulator_vs_enable()
519 vreg->vs_enable_time = ktime_get(); spmi_regulator_vs_enable()
527 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_vs_ocp() local
530 return spmi_vreg_write(vreg, SPMI_VS_REG_OCP, &reg, 1); spmi_regulator_vs_ocp()
535 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_common_disable() local
537 return spmi_vreg_update_bits(vreg, SPMI_COMMON_REG_ENABLE, spmi_regulator_common_disable()
541 static int spmi_regulator_select_voltage(struct spmi_regulator *vreg, spmi_regulator_select_voltage() argument
550 lim_min_uV = vreg->set_points->range[0].set_point_min_uV; spmi_regulator_select_voltage()
552 vreg->set_points->range[vreg->set_points->count - 1].set_point_max_uV; spmi_regulator_select_voltage()
558 dev_err(vreg->dev, spmi_regulator_select_voltage()
565 for (i = vreg->set_points->count - 1; i > 0; i--) { spmi_regulator_select_voltage()
566 range_max_uV = vreg->set_points->range[i - 1].set_point_max_uV; spmi_regulator_select_voltage()
572 range = &vreg->set_points->range[range_id]; spmi_regulator_select_voltage()
583 dev_err(vreg->dev, spmi_regulator_select_voltage()
592 *selector += vreg->set_points->range[i].n_voltages; spmi_regulator_select_voltage()
599 spmi_regulator_find_range(struct spmi_regulator *vreg) spmi_regulator_find_range() argument
604 range = vreg->set_points->range; spmi_regulator_find_range()
605 end = range + vreg->set_points->count; spmi_regulator_find_range()
607 spmi_vreg_read(vreg, SPMI_COMMON_REG_VOLTAGE_RANGE, &range_sel, 1); spmi_regulator_find_range()
616 static int spmi_regulator_select_voltage_same_range(struct spmi_regulator *vreg, spmi_regulator_select_voltage_same_range() argument
624 range = spmi_regulator_find_range(vreg); spmi_regulator_select_voltage_same_range()
652 for (i = 0; i < vreg->set_points->count; i++) { spmi_regulator_select_voltage_same_range()
653 if (uV >= vreg->set_points->range[i].set_point_min_uV spmi_regulator_select_voltage_same_range()
654 && uV <= vreg->set_points->range[i].set_point_max_uV) { spmi_regulator_select_voltage_same_range()
656 (uV - vreg->set_points->range[i].set_point_min_uV) spmi_regulator_select_voltage_same_range()
657 / vreg->set_points->range[i].step_uV; spmi_regulator_select_voltage_same_range()
661 *selector += vreg->set_points->range[i].n_voltages; spmi_regulator_select_voltage_same_range()
664 if (*selector >= vreg->set_points->n_voltages) spmi_regulator_select_voltage_same_range()
670 return spmi_regulator_select_voltage(vreg, min_uV, max_uV, spmi_regulator_select_voltage_same_range()
677 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_common_set_voltage() local
686 ret = spmi_regulator_select_voltage_same_range(vreg, min_uV, max_uV, spmi_regulator_common_set_voltage()
693 return spmi_vreg_write(vreg, SPMI_COMMON_REG_VOLTAGE_RANGE, buf, 2); spmi_regulator_common_set_voltage()
699 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_set_voltage_time_sel() local
703 range = spmi_regulator_find_range(vreg); spmi_regulator_set_voltage_time_sel()
709 return DIV_ROUND_UP(diff_uV, vreg->slew_rate); spmi_regulator_set_voltage_time_sel()
714 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_common_get_voltage() local
718 spmi_vreg_read(vreg, SPMI_COMMON_REG_VOLTAGE_SET, &voltage_sel, 1); spmi_regulator_common_get_voltage()
720 range = spmi_regulator_find_range(vreg); spmi_regulator_common_get_voltage()
730 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_single_range_set_voltage() local
734 ret = spmi_regulator_select_voltage(vreg, min_uV, max_uV, &range_sel, spmi_regulator_single_range_set_voltage()
737 dev_err(vreg->dev, "could not set voltage, ret=%d\n", ret); spmi_regulator_single_range_set_voltage()
745 return spmi_vreg_write(vreg, SPMI_COMMON_REG_VOLTAGE_SET, &sel, 1); spmi_regulator_single_range_set_voltage()
750 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_single_range_get_voltage() local
751 const struct spmi_voltage_range *range = vreg->set_points->range; spmi_regulator_single_range_get_voltage()
754 spmi_vreg_read(vreg, SPMI_COMMON_REG_VOLTAGE_SET, &voltage_sel, 1); spmi_regulator_single_range_get_voltage()
762 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_ult_lo_smps_set_voltage() local
770 ret = spmi_regulator_select_voltage_same_range(vreg, min_uV, max_uV, spmi_regulator_ult_lo_smps_set_voltage()
785 return spmi_vreg_update_bits(vreg, SPMI_COMMON_REG_VOLTAGE_SET, spmi_regulator_ult_lo_smps_set_voltage()
791 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_ult_lo_smps_get_voltage() local
795 spmi_vreg_read(vreg, SPMI_COMMON_REG_VOLTAGE_SET, &voltage_sel, 1); spmi_regulator_ult_lo_smps_get_voltage()
797 range = spmi_regulator_find_range(vreg); spmi_regulator_ult_lo_smps_get_voltage()
810 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_common_list_voltage() local
814 if (selector >= vreg->set_points->n_voltages) spmi_regulator_common_list_voltage()
817 for (i = 0; i < vreg->set_points->count; i++) { spmi_regulator_common_list_voltage()
818 if (selector < vreg->set_points->range[i].n_voltages) { spmi_regulator_common_list_voltage()
819 uV = selector * vreg->set_points->range[i].step_uV spmi_regulator_common_list_voltage()
820 + vreg->set_points->range[i].set_point_min_uV; spmi_regulator_common_list_voltage()
824 selector -= vreg->set_points->range[i].n_voltages; spmi_regulator_common_list_voltage()
833 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_common_set_bypass() local
840 return spmi_vreg_update_bits(vreg, SPMI_COMMON_REG_MODE, val, mask); spmi_regulator_common_set_bypass()
846 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_common_get_bypass() local
850 ret = spmi_vreg_read(vreg, SPMI_COMMON_REG_MODE, &val, 1); spmi_regulator_common_get_bypass()
858 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_common_get_mode() local
861 spmi_vreg_read(vreg, SPMI_COMMON_REG_MODE, &reg, 1); spmi_regulator_common_get_mode()
875 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_common_set_mode() local
884 return spmi_vreg_update_bits(vreg, SPMI_COMMON_REG_MODE, val, mask); spmi_regulator_common_set_mode()
890 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_common_set_load() local
893 if (load_uA >= vreg->hpm_min_load) spmi_regulator_common_set_load()
903 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_common_set_pull_down() local
906 return spmi_vreg_update_bits(vreg, SPMI_COMMON_REG_PULL_DOWN, spmi_regulator_common_set_pull_down()
912 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_common_set_soft_start() local
915 return spmi_vreg_update_bits(vreg, SPMI_COMMON_REG_SOFT_START, spmi_regulator_common_set_soft_start()
921 struct spmi_regulator *vreg = rdev_get_drvdata(rdev); spmi_regulator_set_ilim() local
922 enum spmi_regulator_logical_type type = vreg->logical_type; spmi_regulator_set_ilim()
940 return spmi_vreg_update_bits(vreg, current_reg, reg, mask); spmi_regulator_set_ilim()
943 static int spmi_regulator_vs_clear_ocp(struct spmi_regulator *vreg) spmi_regulator_vs_clear_ocp() argument
947 ret = spmi_vreg_update_bits(vreg, SPMI_COMMON_REG_ENABLE, spmi_regulator_vs_clear_ocp()
950 vreg->vs_enable_time = ktime_get(); spmi_regulator_vs_clear_ocp()
952 ret = spmi_vreg_update_bits(vreg, SPMI_COMMON_REG_ENABLE, spmi_regulator_vs_clear_ocp()
961 struct spmi_regulator *vreg spmi_regulator_vs_ocp_work() local
964 spmi_regulator_vs_clear_ocp(vreg); spmi_regulator_vs_ocp_work()
969 struct spmi_regulator *vreg = data; spmi_regulator_vs_ocp_isr() local
975 vreg->vs_enable_time); spmi_regulator_vs_ocp_isr()
983 vreg->ocp_count = 0; spmi_regulator_vs_ocp_isr()
988 vreg->ocp_count++; spmi_regulator_vs_ocp_isr()
990 if (vreg->ocp_count == 1) { spmi_regulator_vs_ocp_isr()
992 spmi_regulator_vs_clear_ocp(vreg); spmi_regulator_vs_ocp_isr()
993 } else if (vreg->ocp_count <= vreg->ocp_max_retries) { spmi_regulator_vs_ocp_isr()
995 schedule_delayed_work(&vreg->ocp_work, spmi_regulator_vs_ocp_isr()
996 msecs_to_jiffies(vreg->ocp_retry_delay_ms) + 1); spmi_regulator_vs_ocp_isr()
998 dev_err(vreg->dev, spmi_regulator_vs_ocp_isr()
1000 vreg->ocp_count); spmi_regulator_vs_ocp_isr()
1193 static int spmi_regulator_match(struct spmi_regulator *vreg, u16 force_type) spmi_regulator_match() argument
1201 ret = spmi_vreg_read(vreg, SPMI_COMMON_REG_DIG_MAJOR_REV, version, spmi_regulator_match()
1204 dev_err(vreg->dev, "could not read version registers\n"); spmi_regulator_match()
1227 dev_err(vreg->dev, spmi_regulator_match()
1229 vreg->desc.name, type, subtype, dig_major_rev); spmi_regulator_match()
1234 vreg->logical_type = mapping->logical_type; spmi_regulator_match()
1235 vreg->set_points = mapping->set_points; spmi_regulator_match()
1236 vreg->hpm_min_load = mapping->hpm_min_load; spmi_regulator_match()
1237 vreg->desc.ops = mapping->ops; spmi_regulator_match()
1242 vreg->desc.n_voltages = mapping->set_points->n_voltages; spmi_regulator_match()
1248 static int spmi_regulator_ftsmps_init_slew_rate(struct spmi_regulator *vreg) spmi_regulator_ftsmps_init_slew_rate() argument
1255 ret = spmi_vreg_read(vreg, SPMI_COMMON_REG_STEP_CTRL, &reg, 1); spmi_regulator_ftsmps_init_slew_rate()
1257 dev_err(vreg->dev, "spmi read failed, ret=%d\n", ret); spmi_regulator_ftsmps_init_slew_rate()
1261 range = spmi_regulator_find_range(vreg); spmi_regulator_ftsmps_init_slew_rate()
1278 vreg->slew_rate = max(slew_rate, 1); spmi_regulator_ftsmps_init_slew_rate()
1283 static int spmi_regulator_init_registers(struct spmi_regulator *vreg, spmi_regulator_init_registers() argument
1290 type = vreg->logical_type; spmi_regulator_init_registers()
1292 ret = spmi_vreg_read(vreg, SPMI_COMMON_REG_VOLTAGE_RANGE, ctrl_reg, 8); spmi_regulator_init_registers()
1339 ret = spmi_vreg_write(vreg, SPMI_COMMON_REG_VOLTAGE_RANGE, ctrl_reg, 8); spmi_regulator_init_registers()
1350 return spmi_vreg_update_bits(vreg, spmi_regulator_init_registers()
1359 static void spmi_regulator_get_dt_config(struct spmi_regulator *vreg, spmi_regulator_get_dt_config() argument
1372 &vreg->ocp_max_retries); spmi_regulator_get_dt_config()
1374 &vreg->ocp_retry_delay_ms); spmi_regulator_get_dt_config()
1397 struct spmi_regulator *vreg = config->driver_data; spmi_regulator_of_parse() local
1401 spmi_regulator_get_dt_config(vreg, node, &data); spmi_regulator_of_parse()
1403 if (!vreg->ocp_max_retries) spmi_regulator_of_parse()
1404 vreg->ocp_max_retries = SPMI_VS_OCP_DEFAULT_MAX_RETRIES; spmi_regulator_of_parse()
1405 if (!vreg->ocp_retry_delay_ms) spmi_regulator_of_parse()
1406 vreg->ocp_retry_delay_ms = SPMI_VS_OCP_DEFAULT_RETRY_DELAY_MS; spmi_regulator_of_parse()
1408 ret = spmi_regulator_init_registers(vreg, &data); spmi_regulator_of_parse()
1414 if (vreg->logical_type == SPMI_REGULATOR_LOGICAL_TYPE_FTSMPS) { spmi_regulator_of_parse()
1415 ret = spmi_regulator_ftsmps_init_slew_rate(vreg); spmi_regulator_of_parse()
1420 if (vreg->logical_type != SPMI_REGULATOR_LOGICAL_TYPE_VS) spmi_regulator_of_parse()
1421 vreg->ocp_irq = 0; spmi_regulator_of_parse()
1423 if (vreg->ocp_irq) { spmi_regulator_of_parse()
1424 ret = devm_request_irq(dev, vreg->ocp_irq, spmi_regulator_of_parse()
1426 vreg); spmi_regulator_of_parse()
1429 vreg->ocp_irq, ret); spmi_regulator_of_parse()
1433 INIT_DELAYED_WORK(&vreg->ocp_work, spmi_regulator_vs_ocp_work); spmi_regulator_of_parse()
1527 struct spmi_regulator *vreg; qcom_spmi_regulator_probe() local
1549 vreg = devm_kzalloc(dev, sizeof(*vreg), GFP_KERNEL); qcom_spmi_regulator_probe()
1550 if (!vreg) qcom_spmi_regulator_probe()
1553 vreg->dev = dev; qcom_spmi_regulator_probe()
1554 vreg->base = reg->base; qcom_spmi_regulator_probe()
1555 vreg->regmap = regmap; qcom_spmi_regulator_probe()
1558 vreg->ocp_irq = platform_get_irq_byname(pdev, reg->ocp); qcom_spmi_regulator_probe()
1559 if (vreg->ocp_irq < 0) { qcom_spmi_regulator_probe()
1560 ret = vreg->ocp_irq; qcom_spmi_regulator_probe()
1565 vreg->desc.id = -1; qcom_spmi_regulator_probe()
1566 vreg->desc.owner = THIS_MODULE; qcom_spmi_regulator_probe()
1567 vreg->desc.type = REGULATOR_VOLTAGE; qcom_spmi_regulator_probe()
1568 vreg->desc.name = name = reg->name; qcom_spmi_regulator_probe()
1569 vreg->desc.supply_name = reg->supply; qcom_spmi_regulator_probe()
1570 vreg->desc.of_match = reg->name; qcom_spmi_regulator_probe()
1571 vreg->desc.of_parse_cb = spmi_regulator_of_parse; qcom_spmi_regulator_probe()
1572 vreg->desc.of_map_mode = spmi_regulator_of_map_mode; qcom_spmi_regulator_probe()
1574 ret = spmi_regulator_match(vreg, reg->force_type); qcom_spmi_regulator_probe()
1579 config.driver_data = vreg; qcom_spmi_regulator_probe()
1580 rdev = devm_regulator_register(dev, &vreg->desc, &config); qcom_spmi_regulator_probe()
1587 INIT_LIST_HEAD(&vreg->node); qcom_spmi_regulator_probe()
1588 list_add(&vreg->node, vreg_list); qcom_spmi_regulator_probe()
1594 list_for_each_entry(vreg, vreg_list, node) qcom_spmi_regulator_probe()
1595 if (vreg->ocp_irq) qcom_spmi_regulator_probe()
1596 cancel_delayed_work_sync(&vreg->ocp_work); qcom_spmi_regulator_probe()
1602 struct spmi_regulator *vreg; qcom_spmi_regulator_remove() local
1605 list_for_each_entry(vreg, vreg_list, node) qcom_spmi_regulator_remove()
1606 if (vreg->ocp_irq) qcom_spmi_regulator_remove()
1607 cancel_delayed_work_sync(&vreg->ocp_work); qcom_spmi_regulator_remove()
H A Dpcap-regulator.c152 struct pcap_regulator *vreg = &vreg_table[rdev_get_id(rdev)]; pcap_regulator_set_voltage_sel() local
159 return ezx_pcap_set_bits(pcap, vreg->reg, pcap_regulator_set_voltage_sel()
160 (rdev->desc->n_voltages - 1) << vreg->index, pcap_regulator_set_voltage_sel()
161 selector << vreg->index); pcap_regulator_set_voltage_sel()
166 struct pcap_regulator *vreg = &vreg_table[rdev_get_id(rdev)]; pcap_regulator_get_voltage_sel() local
173 ezx_pcap_read(pcap, vreg->reg, &tmp); pcap_regulator_get_voltage_sel()
174 tmp = ((tmp >> vreg->index) & (rdev->desc->n_voltages - 1)); pcap_regulator_get_voltage_sel()
180 struct pcap_regulator *vreg = &vreg_table[rdev_get_id(rdev)]; pcap_regulator_enable() local
183 if (vreg->en == NA) pcap_regulator_enable()
186 return ezx_pcap_set_bits(pcap, vreg->reg, 1 << vreg->en, 1 << vreg->en); pcap_regulator_enable()
191 struct pcap_regulator *vreg = &vreg_table[rdev_get_id(rdev)]; pcap_regulator_disable() local
194 if (vreg->en == NA) pcap_regulator_disable()
197 return ezx_pcap_set_bits(pcap, vreg->reg, 1 << vreg->en, 0); pcap_regulator_disable()
202 struct pcap_regulator *vreg = &vreg_table[rdev_get_id(rdev)]; pcap_regulator_is_enabled() local
206 if (vreg->en == NA) pcap_regulator_is_enabled()
209 ezx_pcap_read(pcap, vreg->reg, &tmp); pcap_regulator_is_enabled()
210 return (tmp >> vreg->en) & 1; pcap_regulator_is_enabled()
H A Dmt6397-regulator.c43 #define MT6397_BUCK(match, vreg, min, max, step, volt_ranges, enreg, \
45 [MT6397_ID_##vreg] = { \
47 .name = #vreg, \
51 .id = MT6397_ID_##vreg, \
67 #define MT6397_LDO(match, vreg, ldo_volt_table, enreg, enbit, vosel, \
69 [MT6397_ID_##vreg] = { \
71 .name = #vreg, \
75 .id = MT6397_ID_##vreg, \
87 #define MT6397_REG_FIXED(match, vreg, enreg, enbit, volt) \
88 [MT6397_ID_##vreg] = { \
90 .name = #vreg, \
94 .id = MT6397_ID_##vreg, \
H A D88pm800.c86 * vreg - the buck regs string.
94 #define PM800_BUCK(match, vreg, ereg, ebit, amax, volt_ranges, n_volt) \
97 .name = #vreg, \
102 .id = PM800_ID_##vreg, \
107 .vsel_reg = PM800_##vreg, \
116 * vreg - the LDO regs string
124 #define PM800_LDO(match, vreg, ereg, ebit, amax, ldo_volt_table) \
127 .name = #vreg, \
132 .id = PM800_ID_##vreg, \
135 .vsel_reg = PM800_##vreg##_VOUT, \
H A D88pm8607.c252 #define PM8607_DVC(vreg, ureg, ubit, ereg, ebit) \
255 .name = #vreg, \
258 .id = PM8607_ID_##vreg, \
260 .n_voltages = ARRAY_SIZE(vreg##_table), \
261 .vsel_reg = PM8607_##vreg, \
262 .vsel_mask = ARRAY_SIZE(vreg##_table) - 1, \
269 .vol_table = (unsigned int *)&vreg##_table, \
270 .vol_suspend = (unsigned int *)&vreg##_suspend_table, \
273 #define PM8607_LDO(_id, vreg, shift, ereg, ebit) \
282 .vsel_reg = PM8607_##vreg, \
H A Dhi6421-regulator.c161 * vreg - voltage select register
169 #define HI6421_LDO(_id, v_table, vreg, vmask, ereg, emask, \
180 .vsel_reg = HI6421_REG_TO_BUS_ADDR(vreg), \
197 * vreg - voltage select register
205 #define HI6421_LDO_LINEAR(_id, _min_uV, n_volt, vstep, vreg, vmask, \
217 .vsel_reg = HI6421_REG_TO_BUS_ADDR(vreg), \
234 * vreg - voltage select register
242 #define HI6421_LDO_LINEAR_RANGE(_id, n_volt, volt_ranges, vreg, vmask, \
254 .vsel_reg = HI6421_REG_TO_BUS_ADDR(vreg), \
268 * vreg - voltage select register
276 #define HI6421_BUCK012(_id, vreg, vmask, ereg, emask, sleepmask, \
288 .vsel_reg = HI6421_REG_TO_BUS_ADDR(vreg), \
303 * vreg - voltage select register
310 #define HI6421_BUCK345(_id, v_table, vreg, vmask, ereg, emask, \
321 .vsel_reg = HI6421_REG_TO_BUS_ADDR(vreg), \
H A Dda903x.c313 #define DA903x_LDO(_pmic, _id, min, max, step, vreg, shift, nbits, ereg, ebit) \
326 .vol_reg = _pmic##_##vreg, \
333 #define DA903x_DVC(_pmic, _id, min, max, step, vreg, nbits, ureg, ubit, ereg, ebit) \
346 .vol_reg = _pmic##_##vreg, \
355 #define DA9034_LDO(_id, min, max, step, vreg, shift, nbits, ereg, ebit) \
356 DA903x_LDO(DA9034, _id, min, max, step, vreg, shift, nbits, ereg, ebit)
358 #define DA9030_LDO(_id, min, max, step, vreg, shift, nbits, ereg, ebit) \
359 DA903x_LDO(DA9030, _id, min, max, step, vreg, shift, nbits, ereg, ebit)
361 #define DA9030_DVC(_id, min, max, step, vreg, nbits, ureg, ubit, ereg, ebit) \
362 DA903x_DVC(DA9030, _id, min, max, step, vreg, nbits, ureg, ubit, \
365 #define DA9034_DVC(_id, min, max, step, vreg, nbits, ureg, ubit, ereg, ebit) \
366 DA903x_DVC(DA9034, _id, min, max, step, vreg, nbits, ureg, ubit, \
369 #define DA9035_DVC(_id, min, max, step, vreg, nbits, ureg, ubit, ereg, ebit) \
370 DA903x_DVC(DA9035, _id, min, max, step, vreg, nbits, ureg, ubit, \
H A Dtps6586x-regulator.c112 #define TPS6586X_REGULATOR(_id, _ops, _pin_name, vdata, vreg, shift, nbits, \
125 .vsel_reg = TPS6586X_##vreg, \
136 uv_step, vreg, shift, nbits, ereg0, \
150 .vsel_reg = TPS6586X_##vreg, \
160 #define TPS6586X_LDO(_id, _pname, vdata, vreg, shift, nbits, \
163 TPS6586X_REGULATOR(_id, rw, _pname, vdata, vreg, shift, nbits, \
167 #define TPS6586X_LDO_LINEAR(_id, _pname, n_volt, min_uv, uv_step, vreg, \
171 min_uv, uv_step, vreg, shift, nbits, \
175 #define TPS6586X_FIXED_LDO(_id, _pname, vdata, vreg, shift, nbits, \
178 TPS6586X_REGULATOR(_id, ro, _pname, vdata, vreg, shift, nbits, \
182 #define TPS6586X_DVM(_id, _pname, n_volt, min_uv, uv_step, vreg, shift, \
186 min_uv, uv_step, vreg, shift, nbits, \
H A Drn5t618-regulator.c31 #define REG(rid, ereg, emask, vreg, vmask, min, max, step) \
45 .vsel_reg = RN5T618_##vreg, \
/linux-4.4.14/drivers/phy/
H A Dphy-qcom-ufs.c246 struct ufs_qcom_phy_vreg *vreg, const char *name, bool optional) __ufs_qcom_phy_init_vreg()
254 vreg->name = kstrdup(name, GFP_KERNEL); __ufs_qcom_phy_init_vreg()
255 if (!vreg->name) { __ufs_qcom_phy_init_vreg()
260 vreg->reg = devm_regulator_get(dev, name); __ufs_qcom_phy_init_vreg()
261 if (IS_ERR(vreg->reg)) { __ufs_qcom_phy_init_vreg()
262 err = PTR_ERR(vreg->reg); __ufs_qcom_phy_init_vreg()
263 vreg->reg = NULL; __ufs_qcom_phy_init_vreg()
272 prop_name, &vreg->max_uA); __ufs_qcom_phy_init_vreg()
277 } else if (err == -EINVAL || !vreg->max_uA) { __ufs_qcom_phy_init_vreg()
278 if (regulator_count_voltages(vreg->reg) > 0) { __ufs_qcom_phy_init_vreg()
287 vreg->is_always_on = true; __ufs_qcom_phy_init_vreg()
289 vreg->is_always_on = false; __ufs_qcom_phy_init_vreg()
293 vreg->max_uV = VDDA_PLL_MAX_UV; __ufs_qcom_phy_init_vreg()
294 vreg->min_uV = VDDA_PLL_MIN_UV; __ufs_qcom_phy_init_vreg()
296 vreg->max_uV = VDDA_PHY_MAX_UV; __ufs_qcom_phy_init_vreg()
297 vreg->min_uV = VDDA_PHY_MIN_UV; __ufs_qcom_phy_init_vreg()
299 vreg->max_uV = VDDP_REF_CLK_MAX_UV; __ufs_qcom_phy_init_vreg()
300 vreg->min_uV = VDDP_REF_CLK_MIN_UV; __ufs_qcom_phy_init_vreg()
305 kfree(vreg->name); __ufs_qcom_phy_init_vreg()
310 struct ufs_qcom_phy_vreg *vreg, const char *name) ufs_qcom_phy_init_vreg()
312 return __ufs_qcom_phy_init_vreg(phy, vreg, name, false); ufs_qcom_phy_init_vreg()
317 struct ufs_qcom_phy_vreg *vreg, bool on) ufs_qcom_phy_cfg_vreg()
320 struct regulator *reg = vreg->reg; ufs_qcom_phy_cfg_vreg()
321 const char *name = vreg->name; ufs_qcom_phy_cfg_vreg()
327 BUG_ON(!vreg); ufs_qcom_phy_cfg_vreg()
330 min_uV = on ? vreg->min_uV : 0; ufs_qcom_phy_cfg_vreg()
331 ret = regulator_set_voltage(reg, min_uV, vreg->max_uV); ufs_qcom_phy_cfg_vreg()
337 uA_load = on ? vreg->max_uA : 0; ufs_qcom_phy_cfg_vreg()
357 struct ufs_qcom_phy_vreg *vreg) ufs_qcom_phy_enable_vreg()
363 if (!vreg || vreg->enabled) ufs_qcom_phy_enable_vreg()
366 ret = ufs_qcom_phy_cfg_vreg(phy, vreg, true); ufs_qcom_phy_enable_vreg()
373 ret = regulator_enable(vreg->reg); ufs_qcom_phy_enable_vreg()
380 vreg->enabled = true; ufs_qcom_phy_enable_vreg()
439 struct ufs_qcom_phy_vreg *vreg) ufs_qcom_phy_disable_vreg()
445 if (!vreg || !vreg->enabled || vreg->is_always_on) ufs_qcom_phy_disable_vreg()
448 ret = regulator_disable(vreg->reg); ufs_qcom_phy_disable_vreg()
452 ufs_qcom_phy_cfg_vreg(phy, vreg, false); ufs_qcom_phy_disable_vreg()
453 vreg->enabled = false; ufs_qcom_phy_disable_vreg()
456 __func__, vreg->name, ret); ufs_qcom_phy_disable_vreg()
245 __ufs_qcom_phy_init_vreg(struct phy *phy, struct ufs_qcom_phy_vreg *vreg, const char *name, bool optional) __ufs_qcom_phy_init_vreg() argument
309 ufs_qcom_phy_init_vreg(struct phy *phy, struct ufs_qcom_phy_vreg *vreg, const char *name) ufs_qcom_phy_init_vreg() argument
316 ufs_qcom_phy_cfg_vreg(struct phy *phy, struct ufs_qcom_phy_vreg *vreg, bool on) ufs_qcom_phy_cfg_vreg() argument
356 ufs_qcom_phy_enable_vreg(struct phy *phy, struct ufs_qcom_phy_vreg *vreg) ufs_qcom_phy_enable_vreg() argument
438 ufs_qcom_phy_disable_vreg(struct phy *phy, struct ufs_qcom_phy_vreg *vreg) ufs_qcom_phy_disable_vreg() argument
/linux-4.4.14/drivers/scsi/ufs/
H A Dufshcd-pltfrm.c133 struct ufs_vreg *vreg = NULL; ufshcd_populate_vreg() local
148 vreg = devm_kzalloc(dev, sizeof(*vreg), GFP_KERNEL); ufshcd_populate_vreg()
149 if (!vreg) ufshcd_populate_vreg()
152 vreg->name = kstrdup(name, GFP_KERNEL); ufshcd_populate_vreg()
160 ret = of_property_read_u32(np, prop_name, &vreg->max_uA); ufshcd_populate_vreg()
167 vreg->min_uA = 0; ufshcd_populate_vreg()
170 vreg->min_uV = UFS_VREG_VCC_1P8_MIN_UV; ufshcd_populate_vreg()
171 vreg->max_uV = UFS_VREG_VCC_1P8_MAX_UV; ufshcd_populate_vreg()
173 vreg->min_uV = UFS_VREG_VCC_MIN_UV; ufshcd_populate_vreg()
174 vreg->max_uV = UFS_VREG_VCC_MAX_UV; ufshcd_populate_vreg()
177 vreg->min_uV = UFS_VREG_VCCQ_MIN_UV; ufshcd_populate_vreg()
178 vreg->max_uV = UFS_VREG_VCCQ_MAX_UV; ufshcd_populate_vreg()
180 vreg->min_uV = UFS_VREG_VCCQ2_MIN_UV; ufshcd_populate_vreg()
181 vreg->max_uV = UFS_VREG_VCCQ2_MAX_UV; ufshcd_populate_vreg()
187 devm_kfree(dev, vreg); ufshcd_populate_vreg()
188 vreg = NULL; ufshcd_populate_vreg()
191 *out_vreg = vreg; ufshcd_populate_vreg()
H A Dufshcd.c4355 static int ufshcd_config_vreg_load(struct device *dev, struct ufs_vreg *vreg, ufshcd_config_vreg_load() argument
4360 if (!vreg) ufshcd_config_vreg_load()
4363 ret = regulator_set_load(vreg->reg, ua); ufshcd_config_vreg_load()
4366 __func__, vreg->name, ua, ret); ufshcd_config_vreg_load()
4373 struct ufs_vreg *vreg) ufshcd_config_vreg_lpm()
4375 return ufshcd_config_vreg_load(hba->dev, vreg, UFS_VREG_LPM_LOAD_UA); ufshcd_config_vreg_lpm()
4379 struct ufs_vreg *vreg) ufshcd_config_vreg_hpm()
4381 return ufshcd_config_vreg_load(hba->dev, vreg, vreg->max_uA); ufshcd_config_vreg_hpm()
4385 struct ufs_vreg *vreg, bool on) ufshcd_config_vreg()
4388 struct regulator *reg = vreg->reg; ufshcd_config_vreg()
4389 const char *name = vreg->name; ufshcd_config_vreg()
4392 BUG_ON(!vreg); ufshcd_config_vreg()
4395 min_uV = on ? vreg->min_uV : 0; ufshcd_config_vreg()
4396 ret = regulator_set_voltage(reg, min_uV, vreg->max_uV); ufshcd_config_vreg()
4403 uA_load = on ? vreg->max_uA : 0; ufshcd_config_vreg()
4404 ret = ufshcd_config_vreg_load(dev, vreg, uA_load); ufshcd_config_vreg()
4412 static int ufshcd_enable_vreg(struct device *dev, struct ufs_vreg *vreg) ufshcd_enable_vreg() argument
4416 if (!vreg || vreg->enabled) ufshcd_enable_vreg()
4419 ret = ufshcd_config_vreg(dev, vreg, true); ufshcd_enable_vreg()
4421 ret = regulator_enable(vreg->reg); ufshcd_enable_vreg()
4424 vreg->enabled = true; ufshcd_enable_vreg()
4427 __func__, vreg->name, ret); ufshcd_enable_vreg()
4432 static int ufshcd_disable_vreg(struct device *dev, struct ufs_vreg *vreg) ufshcd_disable_vreg() argument
4436 if (!vreg || !vreg->enabled) ufshcd_disable_vreg()
4439 ret = regulator_disable(vreg->reg); ufshcd_disable_vreg()
4443 ufshcd_config_vreg(dev, vreg, false); ufshcd_disable_vreg()
4444 vreg->enabled = false; ufshcd_disable_vreg()
4447 __func__, vreg->name, ret); ufshcd_disable_vreg()
4493 static int ufshcd_get_vreg(struct device *dev, struct ufs_vreg *vreg) ufshcd_get_vreg() argument
4497 if (!vreg) ufshcd_get_vreg()
4500 vreg->reg = devm_regulator_get(dev, vreg->name); ufshcd_get_vreg()
4501 if (IS_ERR(vreg->reg)) { ufshcd_get_vreg()
4502 ret = PTR_ERR(vreg->reg); ufshcd_get_vreg()
4504 __func__, vreg->name, ret); ufshcd_get_vreg()
4372 ufshcd_config_vreg_lpm(struct ufs_hba *hba, struct ufs_vreg *vreg) ufshcd_config_vreg_lpm() argument
4378 ufshcd_config_vreg_hpm(struct ufs_hba *hba, struct ufs_vreg *vreg) ufshcd_config_vreg_hpm() argument
4384 ufshcd_config_vreg(struct device *dev, struct ufs_vreg *vreg, bool on) ufshcd_config_vreg() argument
/linux-4.4.14/include/linux/spi/
H A Dcc2520.h23 int vreg; member in struct:cc2520_platform_data
/linux-4.4.14/drivers/hwmon/pmbus/
H A Dzl6100.c145 int ret, vreg; zl6100_read_word_data() local
165 vreg = MFR_READ_VMON; zl6100_read_word_data()
169 vreg = MFR_VMON_OV_FAULT_LIMIT; zl6100_read_word_data()
173 vreg = MFR_VMON_UV_FAULT_LIMIT; zl6100_read_word_data()
178 vreg = reg; zl6100_read_word_data()
183 ret = pmbus_read_word_data(client, page, vreg); zl6100_read_word_data()
243 int ret, vreg; zl6100_write_word_data() local
251 vreg = MFR_VMON_OV_FAULT_LIMIT; zl6100_write_word_data()
255 vreg = MFR_VMON_OV_FAULT_LIMIT; zl6100_write_word_data()
260 vreg = MFR_VMON_UV_FAULT_LIMIT; zl6100_write_word_data()
264 vreg = MFR_VMON_UV_FAULT_LIMIT; zl6100_write_word_data()
270 vreg = reg; zl6100_write_word_data()
274 ret = pmbus_write_word_data(client, page, vreg, word); zl6100_write_word_data()
/linux-4.4.14/arch/powerpc/boot/
H A Dcpm-serial.c200 void *vreg[2]; cpm_console_init() local
232 if (dt_get_virtual_reg(devp, vreg, 2) < 2) cpm_console_init()
236 smc = vreg[0]; cpm_console_init()
238 scc = vreg[0]; cpm_console_init()
240 param = vreg[1]; cpm_console_init()
/linux-4.4.14/arch/arm64/kernel/
H A Dsignal32.c258 union __fpsimd_vreg vreg = { compat_preserve_vfp_context() local
262 __put_user_error(vreg.lo, &frame->ufp.fpregs[i], err); compat_preserve_vfp_context()
263 __put_user_error(vreg.hi, &frame->ufp.fpregs[i + 1], err); compat_preserve_vfp_context()
301 union __fpsimd_vreg vreg; compat_restore_vfp_context() local
303 __get_user_error(vreg.lo, &frame->ufp.fpregs[i], err); compat_restore_vfp_context()
304 __get_user_error(vreg.hi, &frame->ufp.fpregs[i + 1], err); compat_restore_vfp_context()
305 fpsimd.vregs[i >> 1] = vreg.raw; compat_restore_vfp_context()
/linux-4.4.14/drivers/net/ieee802154/
H A Dcc2520.c847 pdata->vreg = of_get_named_gpio(np, "vreg-gpio", 0); cc2520_get_platform_data()
1069 if (!gpio_is_valid(pdata.vreg)) { cc2520_probe()
1070 dev_err(&spi->dev, "vreg gpio is not valid\n"); cc2520_probe()
1075 ret = devm_gpio_request_one(&spi->dev, pdata.vreg, cc2520_probe()
1076 GPIOF_OUT_INIT_LOW, "vreg"); cc2520_probe()
1080 gpio_set_value(pdata.vreg, HIGH); cc2520_probe()
/linux-4.4.14/drivers/power/
H A Dbq25890_charger.c69 u8 vreg; /* regulation voltage */ member in struct:bq25890_init_data
599 {F_VREG, bq->init_data.vreg}, bq25890_hw_init()
749 {"ti,battery-regulation-voltage", false, TBL_VREG, &init->vreg}, bq25890_fw_read_u32_props()
H A Dbq24190_charger.c357 BQ24190_SYSFS_FIELD_RW(vreg, CVC, VREG),
/linux-4.4.14/drivers/gpu/drm/udl/
H A Dudl_modeset.c144 ERR(vreg(dev, 0x00, (color_depth == 16) ? 0 : 1));
159 ERR(vreg(dev, 0x1F, 0));
/linux-4.4.14/drivers/usb/phy/
H A Dphy-msm-usb.c1767 dev_err(&pdev->dev, "hsusb vreg configuration failed\n"); msm_otg_probe()
1772 dev_err(&pdev->dev, "hsusb vreg enable failed\n"); msm_otg_probe()

Completed in 994 milliseconds