* Re: [PATCH] Revert "mfd: axp20x: Allow multiple regulators"
2024-12-31 16:51 [PATCH] Revert "mfd: axp20x: Allow multiple regulators" Andre Przywara
@ 2024-12-31 17:44 ` Chen-Yu Tsai
2024-12-31 19:31 ` Vasily Khoruzhick
2025-01-06 15:44 ` Lee Jones
2 siblings, 0 replies; 4+ messages in thread
From: Chen-Yu Tsai @ 2024-12-31 17:44 UTC (permalink / raw)
To: Andre Przywara
Cc: Lee Jones, linux-sunxi, Chris Morgan, Vasily Khoruzhick,
Jonathan Cameron, linux-pm, linux-kernel
On Wed, Jan 1, 2025 at 12:51 AM Andre Przywara <andre.przywara@arm.com> 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.
>
> 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/
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
> ---
> drivers/mfd/axp20x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
> index 251465a656d09..5b8e88341a305 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, -1, axp20x->cells,
> axp20x->nr_cells, NULL, 0, NULL);
>
> if (ret) {
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Revert "mfd: axp20x: Allow multiple regulators"
2024-12-31 16:51 [PATCH] Revert "mfd: axp20x: Allow multiple regulators" Andre Przywara
2024-12-31 17:44 ` Chen-Yu Tsai
@ 2024-12-31 19:31 ` Vasily Khoruzhick
2025-01-06 15:44 ` Lee Jones
2 siblings, 0 replies; 4+ messages in thread
From: Vasily Khoruzhick @ 2024-12-31 19:31 UTC (permalink / raw)
To: Andre Przywara
Cc: Lee Jones, Chen-Yu Tsai, linux-sunxi, Chris Morgan,
Jonathan Cameron, linux-pm, linux-kernel
On Tue, Dec 31, 2024 at 8:51 AM Andre Przywara <andre.przywara@arm.com> 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.
>
> 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/
Doesn't it need a Fixes tag?
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> drivers/mfd/axp20x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
> index 251465a656d09..5b8e88341a305 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, -1, axp20x->cells,
> axp20x->nr_cells, NULL, 0, NULL);
>
> if (ret) {
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Revert "mfd: axp20x: Allow multiple regulators"
2024-12-31 16:51 [PATCH] Revert "mfd: axp20x: Allow multiple regulators" Andre Przywara
2024-12-31 17:44 ` Chen-Yu Tsai
2024-12-31 19:31 ` Vasily Khoruzhick
@ 2025-01-06 15:44 ` Lee Jones
2 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2025-01-06 15:44 UTC (permalink / raw)
To: Andre Przywara
Cc: Chen-Yu Tsai, linux-sunxi, Chris Morgan, Vasily Khoruzhick,
Jonathan Cameron, linux-pm, linux-kernel
On Tue, 31 Dec 2024, 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.
>
> 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/
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> drivers/mfd/axp20x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
> index 251465a656d09..5b8e88341a305 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, -1, axp20x->cells,
> axp20x->nr_cells, NULL, 0, NULL);
Please submit a new patch and use PLATFORM_DEVID_NONE instead.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 4+ messages in thread