Lines Matching +full:vdd +full:- +full:s
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
53 { "ldo1", "vdd-l1-l2", 0x4000, 225000, nldo_ranges, },
54 { "ldo2", "vdd-l1-l2", 0x4100, 225000, nldo_ranges, },
55 { "ldo3", "vdd-l3-l4", 0x4200, 300000, pldo_ranges, },
56 { "ldo4", "vdd-l3-l4", 0x4300, 300000, pldo_ranges, },
57 { "ldo5", "vdd-l5", 0x4400, 200000, pldo_ranges, },
58 { "ldo6", "vdd-l6", 0x4500, 200000, pldo_ranges, },
59 { "ldo7", "vdd-l7", 0x4600, 200000, pldo_ranges, },
77 ret = regmap_bulk_write(preg->regmap, preg->base + LDO_VSET_LB_REG, in pm8008_regulator_set_voltage_sel()
92 ret = regmap_bulk_read(preg->regmap, preg->base + LDO_VSET_LB_REG, in pm8008_regulator_get_voltage_sel()
99 return (uV - preg->desc.min_uV) / preg->desc.uV_step; in pm8008_regulator_get_voltage_sel()
115 struct device *dev = &pdev->dev; in pm8008_regulator_probe()
123 regmap = dev_get_regmap(dev->parent, "secondary"); in pm8008_regulator_probe()
125 return -EINVAL; in pm8008_regulator_probe()
132 return -ENOMEM; in pm8008_regulator_probe()
134 preg->regmap = regmap; in pm8008_regulator_probe()
135 preg->base = data->base; in pm8008_regulator_probe()
137 desc = &preg->desc; in pm8008_regulator_probe()
139 desc->name = data->name; in pm8008_regulator_probe()
140 desc->supply_name = data->supply_name; in pm8008_regulator_probe()
141 desc->of_match = data->name; in pm8008_regulator_probe()
142 desc->regulators_node = of_match_ptr("regulators"); in pm8008_regulator_probe()
143 desc->ops = &pm8008_regulator_ops; in pm8008_regulator_probe()
144 desc->type = REGULATOR_VOLTAGE; in pm8008_regulator_probe()
145 desc->owner = THIS_MODULE; in pm8008_regulator_probe()
147 desc->linear_ranges = data->voltage_range; in pm8008_regulator_probe()
148 desc->n_linear_ranges = 1; in pm8008_regulator_probe()
149 desc->uV_step = desc->linear_ranges[0].step; in pm8008_regulator_probe()
150 desc->min_uV = desc->linear_ranges[0].min; in pm8008_regulator_probe()
151 desc->n_voltages = linear_range_values_in_range(&desc->linear_ranges[0]); in pm8008_regulator_probe()
153 ret = regmap_read(regmap, preg->base + LDO_STEPPER_CTL_REG, &val); in pm8008_regulator_probe()
159 desc->ramp_delay = DEFAULT_VOLTAGE_STEPPER_RATE >> val; in pm8008_regulator_probe()
161 desc->min_dropout_uV = data->min_dropout_uV; in pm8008_regulator_probe()
163 desc->enable_reg = preg->base + LDO_ENABLE_REG; in pm8008_regulator_probe()
164 desc->enable_mask = ENABLE_BIT; in pm8008_regulator_probe()
166 config.dev = dev->parent; in pm8008_regulator_probe()
173 dev_err(dev, "failed to register regulator %s: %d\n", in pm8008_regulator_probe()
174 desc->name, ret); in pm8008_regulator_probe()
183 { "pm8008-regulator" },
190 .name = "qcom-pm8008-regulator",