Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

regulator: axp20x: add support for the AXP323

The X-Powers AXP323 is a very close sibling of the AXP313A. The only
difference seems to be the ability to dual-phase the first two DC/DC
converters.

Place the new AXP323 ID next to the existing AXP313A checks, to let
them share most code.
The only difference is the poly-phase detection code, which gets
extended to check the respective bit in a newly used register.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20241007001408.27249-6-andre.przywara@arm.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Andre Przywara and committed by
Lee Jones
a0f8a889 35fec94a

+11
+11
drivers/regulator/axp20x-regulator.c
··· 1341 1341 step = 150; 1342 1342 break; 1343 1343 case AXP313A_ID: 1344 + case AXP323_ID: 1344 1345 case AXP717_ID: 1345 1346 case AXP15060_ID: 1346 1347 /* The DCDC PWM frequency seems to be fixed to 3 MHz. */ ··· 1528 1527 } 1529 1528 break; 1530 1529 1530 + case AXP323_ID: 1531 + regmap_read(axp20x->regmap, AXP323_DCDC_MODE_CTRL2, &reg); 1532 + 1533 + switch (id) { 1534 + case AXP313A_DCDC2: 1535 + return !!(reg & BIT(1)); 1536 + } 1537 + break; 1538 + 1531 1539 default: 1532 1540 return false; 1533 1541 } ··· 1575 1565 "x-powers,drive-vbus-en"); 1576 1566 break; 1577 1567 case AXP313A_ID: 1568 + case AXP323_ID: 1578 1569 regulators = axp313a_regulators; 1579 1570 nregulators = AXP313A_REG_ID_MAX; 1580 1571 break;