Lines Matching +full:acin +full:- +full:supply

354 		.n_voltages	= (((_max) - (_min)) / (_step) + 1),		\
376 .n_voltages = (((_max) - (_min)) / (_step) + 1), \
448 switch (axp20x->variant) { in axp20x_set_ramp_delay()
478 return -ENOTSUPP; in axp20x_set_ramp_delay()
497 dev_err(axp20x->dev, "unsupported ramp value %d", ramp); in axp20x_set_ramp_delay()
498 return -EINVAL; in axp20x_set_ramp_delay()
504 return regmap_update_bits(axp20x->regmap, reg, mask, cfg); in axp20x_set_ramp_delay()
512 switch (axp20x->variant) { in axp20x_regulator_enable_regmap()
515 rdev->constraints && rdev->constraints->soft_start) { in axp20x_regulator_enable_regmap()
616 AXP_DESC_FIXED(AXP20X, LDO1, "ldo1", "acin", 1300),
752 AXP_DESC_FIXED(AXP313A, RTC_LDO, "rtc-ldo", "vin1", 1800),
865 AXP_DESC_IO(AXP803, LDO_IO0, "ldo-io0", "ips", 700, 3300, 100,
869 AXP_DESC_IO(AXP803, LDO_IO1, "ldo-io1", "ips", 700, 3300, 100,
873 AXP_DESC_FIXED(AXP803, RTC_LDO, "rtc-ldo", "ips", 3000),
1105 AXP_DESC_FIXED(AXP813, RTC_LDO, "rtc-ldo", "ips", 1800),
1106 AXP_DESC_IO(AXP813, LDO_IO0, "ldo-io0", "ips", 700, 3300, 100,
1110 AXP_DESC_IO(AXP813, LDO_IO1, "ldo-io1", "ips", 700, 3300, 100,
1205 /* Supply comes from DCDC5 */
1209 /* Supply comes from DCDC1 */
1212 /* Supply comes from ALDO1 */
1213 AXP_DESC_FIXED(AXP15060, RTC_LDO, "rtc-ldo", NULL, 1800),
1218 struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent); in axp20x_set_dcdc_freq()
1222 switch (axp20x->variant) { in axp20x_set_dcdc_freq()
1244 if (axp20x->variant == AXP806_ID) in axp20x_set_dcdc_freq()
1259 dev_err(&pdev->dev, in axp20x_set_dcdc_freq()
1261 return -EINVAL; in axp20x_set_dcdc_freq()
1266 dev_err(&pdev->dev, in axp20x_set_dcdc_freq()
1268 return -EINVAL; in axp20x_set_dcdc_freq()
1276 dev_warn(&pdev->dev, "DCDC frequency too low. Set to %ukHz\n", in axp20x_set_dcdc_freq()
1282 dev_warn(&pdev->dev, "DCDC frequency too high. Set to %ukHz\n", in axp20x_set_dcdc_freq()
1286 dcdcfreq = (dcdcfreq - min) / step; in axp20x_set_dcdc_freq()
1288 return regmap_update_bits(axp20x->regmap, reg, in axp20x_set_dcdc_freq()
1298 np = of_node_get(pdev->dev.parent->of_node); in axp20x_regulator_parse_dt()
1304 dev_warn(&pdev->dev, "regulators node not found\n"); in axp20x_regulator_parse_dt()
1306 of_property_read_u32(regulators, "x-powers,dcdc-freq", &dcdcfreq); in axp20x_regulator_parse_dt()
1309 dev_err(&pdev->dev, "Error setting dcdc frequency: %d\n", ret); in axp20x_regulator_parse_dt()
1324 switch (axp20x->variant) { in axp20x_set_dcdc_workmode()
1328 return -EINVAL; in axp20x_set_dcdc_workmode()
1334 workmode <<= ffs(mask) - 1; in axp20x_set_dcdc_workmode()
1348 return -EINVAL; in axp20x_set_dcdc_workmode()
1350 mask = AXP22X_WORKMODE_DCDCX_MASK(id - AXP22X_DCDC1); in axp20x_set_dcdc_workmode()
1351 workmode <<= id - AXP22X_DCDC1; in axp20x_set_dcdc_workmode()
1356 return -EINVAL; in axp20x_set_dcdc_workmode()
1358 mask = AXP22X_WORKMODE_DCDCX_MASK(id - AXP803_DCDC1); in axp20x_set_dcdc_workmode()
1359 workmode <<= id - AXP803_DCDC1; in axp20x_set_dcdc_workmode()
1364 return -EINVAL; in axp20x_set_dcdc_workmode()
1366 mask = AXP22X_WORKMODE_DCDCX_MASK(id - AXP813_DCDC1); in axp20x_set_dcdc_workmode()
1367 workmode <<= id - AXP813_DCDC1; in axp20x_set_dcdc_workmode()
1373 return -EINVAL; in axp20x_set_dcdc_workmode()
1375 mask = AXP22X_WORKMODE_DCDCX_MASK(id - AXP15060_DCDC1); in axp20x_set_dcdc_workmode()
1376 workmode <<= id - AXP15060_DCDC1; in axp20x_set_dcdc_workmode()
1382 return -EINVAL; in axp20x_set_dcdc_workmode()
1385 return regmap_update_bits(rdev->regmap, reg, mask, workmode); in axp20x_set_dcdc_workmode()
1389 * This function checks whether a regulator is part of a poly-phase
1400 switch (axp20x->variant) { in axp20x_is_polyphase_slave()
1403 regmap_read(axp20x->regmap, AXP803_POLYPHASE_CTRL, &reg); in axp20x_is_polyphase_slave()
1414 regmap_read(axp20x->regmap, AXP806_DCDC_MODE_CTRL2, &reg); in axp20x_is_polyphase_slave()
1431 regmap_read(axp20x->regmap, AXP15060_DCDC_MODE_CTRL1, &reg); in axp20x_is_polyphase_slave()
1451 struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent); in axp20x_regulator_probe()
1454 .dev = pdev->dev.parent, in axp20x_regulator_probe()
1455 .regmap = axp20x->regmap, in axp20x_regulator_probe()
1465 switch (axp20x->variant) { in axp20x_regulator_probe()
1475 drivevbus = of_property_read_bool(pdev->dev.parent->of_node, in axp20x_regulator_probe()
1476 "x-powers,drive-vbus-en"); in axp20x_regulator_probe()
1485 drivevbus = of_property_read_bool(pdev->dev.parent->of_node, in axp20x_regulator_probe()
1486 "x-powers,drive-vbus-en"); in axp20x_regulator_probe()
1499 drivevbus = of_property_read_bool(pdev->dev.parent->of_node, in axp20x_regulator_probe()
1500 "x-powers,drive-vbus-en"); in axp20x_regulator_probe()
1507 dev_err(&pdev->dev, "Unsupported AXP variant: %ld\n", in axp20x_regulator_probe()
1508 axp20x->variant); in axp20x_regulator_probe()
1509 return -EINVAL; in axp20x_regulator_probe()
1520 * If this regulator is a slave in a poly-phase setup, in axp20x_regulator_probe()
1528 if (axp20x->variant == AXP813_ID && i == AXP813_FLDO3) in axp20x_regulator_probe()
1533 * connected internally, so we have to handle their supply in axp20x_regulator_probe()
1537 * so the supply names are correctly read. See the last in axp20x_regulator_probe()
1545 new_desc = devm_kzalloc(&pdev->dev, sizeof(*desc), in axp20x_regulator_probe()
1548 return -ENOMEM; in axp20x_regulator_probe()
1551 new_desc->supply_name = dcdc1_name; in axp20x_regulator_probe()
1558 new_desc = devm_kzalloc(&pdev->dev, sizeof(*desc), in axp20x_regulator_probe()
1561 return -ENOMEM; in axp20x_regulator_probe()
1564 new_desc->supply_name = dcdc5_name; in axp20x_regulator_probe()
1570 new_desc = devm_kzalloc(&pdev->dev, sizeof(*desc), in axp20x_regulator_probe()
1573 return -ENOMEM; in axp20x_regulator_probe()
1576 new_desc->supply_name = aldo1_name; in axp20x_regulator_probe()
1580 rdev = devm_regulator_register(&pdev->dev, desc, &config); in axp20x_regulator_probe()
1582 dev_err(&pdev->dev, "Failed to register %s\n", in axp20x_regulator_probe()
1588 ret = of_property_read_u32(rdev->dev.of_node, in axp20x_regulator_probe()
1589 "x-powers,dcdc-workmode", in axp20x_regulator_probe()
1593 dev_err(&pdev->dev, "Failed to set workmode on %s\n", in axp20x_regulator_probe()
1594 rdev->desc->name); in axp20x_regulator_probe()
1603 of_property_read_string(rdev->dev.of_node, in axp20x_regulator_probe()
1604 "regulator-name", in axp20x_regulator_probe()
1610 of_property_read_string(rdev->dev.of_node, in axp20x_regulator_probe()
1611 "regulator-name", in axp20x_regulator_probe()
1615 of_property_read_string(rdev->dev.of_node, in axp20x_regulator_probe()
1616 "regulator-name", in axp20x_regulator_probe()
1622 regmap_update_bits(axp20x->regmap, AXP20X_OVER_TMP, in axp20x_regulator_probe()
1624 rdev = devm_regulator_register(&pdev->dev, in axp20x_regulator_probe()
1628 dev_err(&pdev->dev, "Failed to register drivevbus\n"); in axp20x_regulator_probe()
1639 .name = "axp20x-regulator",
1649 MODULE_ALIAS("platform:axp20x-regulator");