Message ID | 20250108164359.2609078-1-andre.przywara@arm.com |
---|---|
State | Accepted |
Commit | b246bd32a34c1b0d80670e60e4e4102be6366191 |
Headers | show |
Series | [v2] Revert "mfd: axp20x: Allow multiple regulators" | expand |
On Thu, 09 Jan 2025 11:38:48 +0000 Lee Jones <lee@kernel.org> wrote: Hi Lee, > On Wed, 08 Jan 2025 16:43:59 +0000, Andre Przywara wrote: > > As Chris and Vasily reported, the attempt to support multiple AXP PMICs > > in one system [1] breaks some of the battery and charging functionality > > on devices with AXP PMICs. The reason is that the drivers now fail to get > > the correct IIO channel for the ADC component, as the current code seems > > to rely on the zero-based enumeration of the regulator devices. > > A fix is possible, but not trivial, as it requires some rework in the AXP > > MFD driver, which cannot be fully reviewed or tested in time for the > > 6.13 release. > > > > [...] > > Applied, thanks! Just checking, is this on route to reach Linus' tree this week still? I don't see it in any of your kernel.org trees. Since it's a regression introduced with 6.13-rc1, so I would very much like to see this fixed before the release. If I can help with anything, please let me know. Cheers, Andre > > [1/1] Revert "mfd: axp20x: Allow multiple regulators" > commit: b246bd32a34c1b0d80670e60e4e4102be6366191 > > -- > Lee Jones [李琼斯] >
diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 251465a656d09..bce85a58944ac 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -1445,7 +1445,7 @@ int axp20x_device_probe(struct axp20x_dev *axp20x) } } - ret = mfd_add_devices(axp20x->dev, PLATFORM_DEVID_AUTO, axp20x->cells, + ret = mfd_add_devices(axp20x->dev, PLATFORM_DEVID_NONE, axp20x->cells, axp20x->nr_cells, NULL, 0, NULL); if (ret) {
As Chris and Vasily reported, the attempt to support multiple AXP PMICs in one system [1] breaks some of the battery and charging functionality on devices with AXP PMICs. The reason is that the drivers now fail to get the correct IIO channel for the ADC component, as the current code seems to rely on the zero-based enumeration of the regulator devices. A fix is possible, but not trivial, as it requires some rework in the AXP MFD driver, which cannot be fully reviewed or tested in time for the 6.13 release. So revert this patch for now, to avoid regressions on battery powered devices. This patch was really only necessary for devices with two PMICs, support for which is not mainline yet anyway, so we don't lose any functionality. This reverts commit e37ec32188701efa01455b9be42a392adab06ce4. [1] https://lore.kernel.org/linux-sunxi/20241007001408.27249-4-andre.przywara@arm.com/ Reported-by: Chris Morgan <macroalpha82@gmail.com> Closes: https://lore.kernel.org/linux-sunxi/675489c1.050a0220.8d73f.6e90@mx.google.com/ Reported-by: Vasily Khoruzhick <anarsoul@gmail.com> Closes: https://lore.kernel.org/linux-sunxi/CA+E=qVf8_9gn0y=mcdKXvj2PFoHT2eF+JN=CmtTNdRGaSnpgKg@mail.gmail.com/ Signed-off-by: Andre Przywara <andre.przywara@arm.com> --- Hi, just replacing the old -1 with the respective macro name, as Lee asked for. Also adding tags to acknowledge the reporters. Lee, feel free to change the subject line if you think the "Revert" in there is not justified anymore. Cheers, Andre Changes v1 .. v2: - use proper name for the formely used -1 value - add Reported-by: tags drivers/mfd/axp20x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)