Lines Matching +full:vin4 +full:- +full:supply

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()
571 AXP_DESC(AXP22X, DCDC4, "dcdc4", "vin4", 600, 1540, 20,
699 AXP_DESC_RANGES(AXP803, DCDC4, "dcdc4", "vin4",
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),
859 AXP_DESC_RANGES(AXP809, DCDC4, "dcdc4", "vin4",
931 AXP_DESC_RANGES(AXP813, DCDC4, "dcdc4", "vin4",
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()
1103 switch (axp20x->variant) { in axp20x_set_dcdc_workmode()
1107 return -EINVAL; in axp20x_set_dcdc_workmode()
1113 workmode <<= ffs(mask) - 1; in axp20x_set_dcdc_workmode()
1127 return -EINVAL; in axp20x_set_dcdc_workmode()
1129 mask = AXP22X_WORKMODE_DCDCX_MASK(id - AXP22X_DCDC1); in axp20x_set_dcdc_workmode()
1130 workmode <<= id - AXP22X_DCDC1; in axp20x_set_dcdc_workmode()
1135 return -EINVAL; in axp20x_set_dcdc_workmode()
1137 mask = AXP22X_WORKMODE_DCDCX_MASK(id - AXP803_DCDC1); in axp20x_set_dcdc_workmode()
1138 workmode <<= id - AXP803_DCDC1; in axp20x_set_dcdc_workmode()
1143 return -EINVAL; in axp20x_set_dcdc_workmode()
1145 mask = AXP22X_WORKMODE_DCDCX_MASK(id - AXP813_DCDC1); in axp20x_set_dcdc_workmode()
1146 workmode <<= id - AXP813_DCDC1; in axp20x_set_dcdc_workmode()
1152 return -EINVAL; in axp20x_set_dcdc_workmode()
1155 return regmap_update_bits(rdev->regmap, reg, mask, workmode); in axp20x_set_dcdc_workmode()
1159 * This function checks whether a regulator is part of a poly-phase
1170 switch (axp20x->variant) { in axp20x_is_polyphase_slave()
1173 regmap_read(axp20x->regmap, AXP803_POLYPHASE_CTRL, &reg); in axp20x_is_polyphase_slave()
1184 regmap_read(axp20x->regmap, AXP806_DCDC_MODE_CTRL2, &reg); in axp20x_is_polyphase_slave()
1210 struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent); in axp20x_regulator_probe()
1213 .dev = pdev->dev.parent, in axp20x_regulator_probe()
1214 .regmap = axp20x->regmap, in axp20x_regulator_probe()
1223 switch (axp20x->variant) { in axp20x_regulator_probe()
1233 drivevbus = of_property_read_bool(pdev->dev.parent->of_node, in axp20x_regulator_probe()
1234 "x-powers,drive-vbus-en"); in axp20x_regulator_probe()
1239 drivevbus = of_property_read_bool(pdev->dev.parent->of_node, in axp20x_regulator_probe()
1240 "x-powers,drive-vbus-en"); in axp20x_regulator_probe()
1253 drivevbus = of_property_read_bool(pdev->dev.parent->of_node, in axp20x_regulator_probe()
1254 "x-powers,drive-vbus-en"); in axp20x_regulator_probe()
1257 dev_err(&pdev->dev, "Unsupported AXP variant: %ld\n", in axp20x_regulator_probe()
1258 axp20x->variant); in axp20x_regulator_probe()
1259 return -EINVAL; in axp20x_regulator_probe()
1270 * If this regulator is a slave in a poly-phase setup, in axp20x_regulator_probe()
1278 if (axp20x->variant == AXP813_ID && i == AXP813_FLDO3) in axp20x_regulator_probe()
1283 * so we have to handle their supply names separately. in axp20x_regulator_probe()
1286 * so the supply names are correctly read. See the last in axp20x_regulator_probe()
1293 new_desc = devm_kzalloc(&pdev->dev, sizeof(*desc), in axp20x_regulator_probe()
1296 return -ENOMEM; in axp20x_regulator_probe()
1299 new_desc->supply_name = dcdc1_name; in axp20x_regulator_probe()
1305 new_desc = devm_kzalloc(&pdev->dev, sizeof(*desc), in axp20x_regulator_probe()
1308 return -ENOMEM; in axp20x_regulator_probe()
1311 new_desc->supply_name = dcdc5_name; in axp20x_regulator_probe()
1315 rdev = devm_regulator_register(&pdev->dev, desc, &config); in axp20x_regulator_probe()
1317 dev_err(&pdev->dev, "Failed to register %s\n", in axp20x_regulator_probe()
1323 ret = of_property_read_u32(rdev->dev.of_node, in axp20x_regulator_probe()
1324 "x-powers,dcdc-workmode", in axp20x_regulator_probe()
1328 dev_err(&pdev->dev, "Failed to set workmode on %s\n", in axp20x_regulator_probe()
1329 rdev->desc->name); in axp20x_regulator_probe()
1337 of_property_read_string(rdev->dev.of_node, in axp20x_regulator_probe()
1338 "regulator-name", in axp20x_regulator_probe()
1343 of_property_read_string(rdev->dev.of_node, in axp20x_regulator_probe()
1344 "regulator-name", in axp20x_regulator_probe()
1350 regmap_update_bits(axp20x->regmap, AXP20X_OVER_TMP, in axp20x_regulator_probe()
1352 rdev = devm_regulator_register(&pdev->dev, in axp20x_regulator_probe()
1356 dev_err(&pdev->dev, "Failed to register drivevbus\n"); in axp20x_regulator_probe()
1367 .name = "axp20x-regulator",
1376 MODULE_ALIAS("platform:axp20x-regulator");