Lines Matching +full:ldo +full:- +full:v
282 .n_voltages = (((_max) - (_min)) / (_step) + 1), \
304 .n_voltages = (((_max) - (_min)) / (_step) + 1), \
376 switch (axp20x->variant) { in axp20x_set_ramp_delay()
406 return -ENOTSUPP; in axp20x_set_ramp_delay()
425 dev_err(axp20x->dev, "unsupported ramp value %d", ramp); in axp20x_set_ramp_delay()
426 return -EINVAL; in axp20x_set_ramp_delay()
432 return regmap_update_bits(axp20x->regmap, reg, mask, cfg); in axp20x_set_ramp_delay()
440 switch (axp20x->variant) { in axp20x_regulator_enable_regmap()
443 rdev->constraints && rdev->constraints->soft_start) { in axp20x_regulator_enable_regmap()
467 * setting the voltage and enabling the LDO to give the in axp20x_regulator_enable_regmap()
580 /* LDO regulator internally chained to DCDC5 */
615 * 3.3V, this needs to be enforced via dts provided constraints */
621 * 3.3V, this needs to be enforced via dts provided constraints */
751 AXP_DESC_IO(AXP803, LDO_IO0, "ldo-io0", "ips", 700, 3300, 100,
755 AXP_DESC_IO(AXP803, LDO_IO1, "ldo-io1", "ips", 700, 3300, 100,
759 AXP_DESC_FIXED(AXP803, RTC_LDO, "rtc-ldo", "ips", 3000),
869 /* LDO regulator internally chained to DCDC5 */
900 * 3.3V, this needs to be enforced via dts provided constraints
908 * 3.3V, this needs to be enforced via dts provided constraints
991 AXP_DESC_FIXED(AXP813, RTC_LDO, "rtc-ldo", "ips", 1800),
992 AXP_DESC_IO(AXP813, LDO_IO0, "ldo-io0", "ips", 700, 3300, 100,
996 AXP_DESC_IO(AXP813, LDO_IO1, "ldo-io1", "ips", 700, 3300, 100,
1006 struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent); in axp20x_set_dcdc_freq()
1010 switch (axp20x->variant) { in axp20x_set_dcdc_freq()
1032 if (axp20x->variant == AXP806_ID) in axp20x_set_dcdc_freq()
1044 dev_err(&pdev->dev, in axp20x_set_dcdc_freq()
1046 return -EINVAL; in axp20x_set_dcdc_freq()
1054 dev_warn(&pdev->dev, "DCDC frequency too low. Set to %ukHz\n", in axp20x_set_dcdc_freq()
1060 dev_warn(&pdev->dev, "DCDC frequency too high. Set to %ukHz\n", in axp20x_set_dcdc_freq()
1064 dcdcfreq = (dcdcfreq - min) / step; in axp20x_set_dcdc_freq()
1066 return regmap_update_bits(axp20x->regmap, reg, in axp20x_set_dcdc_freq()
1076 np = of_node_get(pdev->dev.parent->of_node); in axp20x_regulator_parse_dt()
1082 dev_warn(&pdev->dev, "regulators node not found\n"); in axp20x_regulator_parse_dt()
1084 of_property_read_u32(regulators, "x-powers,dcdc-freq", &dcdcfreq); in axp20x_regulator_parse_dt()
1087 dev_err(&pdev->dev, "Error setting dcdc frequency: %d\n", ret); in axp20x_regulator_parse_dt()
1102 switch (axp20x->variant) { in axp20x_set_dcdc_workmode()
1106 return -EINVAL; in axp20x_set_dcdc_workmode()
1112 workmode <<= ffs(mask) - 1; in axp20x_set_dcdc_workmode()
1126 return -EINVAL; in axp20x_set_dcdc_workmode()
1128 mask = AXP22X_WORKMODE_DCDCX_MASK(id - AXP22X_DCDC1); in axp20x_set_dcdc_workmode()
1129 workmode <<= id - AXP22X_DCDC1; in axp20x_set_dcdc_workmode()
1134 return -EINVAL; in axp20x_set_dcdc_workmode()
1136 mask = AXP22X_WORKMODE_DCDCX_MASK(id - AXP803_DCDC1); in axp20x_set_dcdc_workmode()
1137 workmode <<= id - AXP803_DCDC1; in axp20x_set_dcdc_workmode()
1142 return -EINVAL; in axp20x_set_dcdc_workmode()
1144 mask = AXP22X_WORKMODE_DCDCX_MASK(id - AXP813_DCDC1); in axp20x_set_dcdc_workmode()
1145 workmode <<= id - AXP813_DCDC1; in axp20x_set_dcdc_workmode()
1151 return -EINVAL; in axp20x_set_dcdc_workmode()
1154 return regmap_update_bits(rdev->regmap, reg, mask, workmode); in axp20x_set_dcdc_workmode()
1158 * This function checks whether a regulator is part of a poly-phase
1169 switch (axp20x->variant) { in axp20x_is_polyphase_slave()
1172 regmap_read(axp20x->regmap, AXP803_POLYPHASE_CTRL, ®); in axp20x_is_polyphase_slave()
1183 regmap_read(axp20x->regmap, AXP806_DCDC_MODE_CTRL2, ®); in axp20x_is_polyphase_slave()
1209 struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent); in axp20x_regulator_probe()
1212 .dev = pdev->dev.parent, in axp20x_regulator_probe()
1213 .regmap = axp20x->regmap, in axp20x_regulator_probe()
1222 switch (axp20x->variant) { in axp20x_regulator_probe()
1232 drivevbus = of_property_read_bool(pdev->dev.parent->of_node, in axp20x_regulator_probe()
1233 "x-powers,drive-vbus-en"); in axp20x_regulator_probe()
1238 drivevbus = of_property_read_bool(pdev->dev.parent->of_node, in axp20x_regulator_probe()
1239 "x-powers,drive-vbus-en"); in axp20x_regulator_probe()
1252 drivevbus = of_property_read_bool(pdev->dev.parent->of_node, in axp20x_regulator_probe()
1253 "x-powers,drive-vbus-en"); in axp20x_regulator_probe()
1256 dev_err(&pdev->dev, "Unsupported AXP variant: %ld\n", in axp20x_regulator_probe()
1257 axp20x->variant); in axp20x_regulator_probe()
1258 return -EINVAL; in axp20x_regulator_probe()
1269 * If this regulator is a slave in a poly-phase setup, in axp20x_regulator_probe()
1277 if (axp20x->variant == AXP813_ID && i == AXP813_FLDO3) in axp20x_regulator_probe()
1292 new_desc = devm_kzalloc(&pdev->dev, sizeof(*desc), in axp20x_regulator_probe()
1295 return -ENOMEM; in axp20x_regulator_probe()
1298 new_desc->supply_name = dcdc1_name; in axp20x_regulator_probe()
1304 new_desc = devm_kzalloc(&pdev->dev, sizeof(*desc), in axp20x_regulator_probe()
1307 return -ENOMEM; in axp20x_regulator_probe()
1310 new_desc->supply_name = dcdc5_name; in axp20x_regulator_probe()
1314 rdev = devm_regulator_register(&pdev->dev, desc, &config); in axp20x_regulator_probe()
1316 dev_err(&pdev->dev, "Failed to register %s\n", in axp20x_regulator_probe()
1322 ret = of_property_read_u32(rdev->dev.of_node, in axp20x_regulator_probe()
1323 "x-powers,dcdc-workmode", in axp20x_regulator_probe()
1327 dev_err(&pdev->dev, "Failed to set workmode on %s\n", in axp20x_regulator_probe()
1328 rdev->desc->name); in axp20x_regulator_probe()
1336 of_property_read_string(rdev->dev.of_node, in axp20x_regulator_probe()
1337 "regulator-name", in axp20x_regulator_probe()
1342 of_property_read_string(rdev->dev.of_node, in axp20x_regulator_probe()
1343 "regulator-name", in axp20x_regulator_probe()
1349 regmap_update_bits(axp20x->regmap, AXP20X_OVER_TMP, in axp20x_regulator_probe()
1351 rdev = devm_regulator_register(&pdev->dev, in axp20x_regulator_probe()
1355 dev_err(&pdev->dev, "Failed to register drivevbus\n"); in axp20x_regulator_probe()
1366 .name = "axp20x-regulator",
1375 MODULE_ALIAS("platform:axp20x-regulator");