Linux IIO development
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix Regression with AXP20X for 6.13-rc1
@ 2024-12-10 22:48 Chris Morgan
  2024-12-10 22:48 ` [PATCH 1/2] iio: core: Add devm_ API for iio_channel_get_sys Chris Morgan
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Chris Morgan @ 2024-12-10 22:48 UTC (permalink / raw)
  To: linux-pm
  Cc: linux-iio, andre.przywara, lee, wens, sre, lars, jic23,
	Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

After performing a git bisect, I identified a commit that broke the
battery and charger driver for my AXP717 PMIC. This was caused by
commit e37ec3218870 ("mfd: axp20x: Allow multiple regulators").

After digging into it, it appears when mfd_add_devices was called with
a platform ID of PLATFORM_DEVID_NONE, the devm_iio_channel_get() call
made by the various AXP20X power drivers would not be able to generate
a dev_name(dev) for some reason, and the iio_channel_get() call used in
the devm_ helper would fall back to making a iio_channel_get_sys()
call. After the platform ID was updated, now iio_channel_get() is no
longer falling back to iio_channel_get_sys(). At least this is my
limited understanding of what happened.

To fix this, I added a new devm_ helper of devm_iio_channel_get_sys()
that directly calls iio_channel_get_sys(), and I updated all the
affected drivers with the new routine. I then no longer experienced
any issues with the drivers on my devices.

Chris Morgan (2):
  iio: core: Add devm_ API for iio_channel_get_sys
  power: supply: axp20x: Use devm_iio_channel_get_sys() for iio chans

 drivers/iio/inkern.c                    | 18 ++++++++++++++++++
 drivers/power/supply/axp20x_ac_power.c  |  4 ++--
 drivers/power/supply/axp20x_battery.c   | 16 ++++++++--------
 drivers/power/supply/axp20x_usb_power.c |  6 +++---
 include/linux/iio/consumer.h            | 20 ++++++++++++++++++++
 5 files changed, 51 insertions(+), 13 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-03-08 17:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-10 22:48 [PATCH 0/2] Fix Regression with AXP20X for 6.13-rc1 Chris Morgan
2024-12-10 22:48 ` [PATCH 1/2] iio: core: Add devm_ API for iio_channel_get_sys Chris Morgan
2024-12-10 22:48 ` [PATCH 2/2] power: supply: axp20x: Use devm_iio_channel_get_sys() for iio chans Chris Morgan
2024-12-11 21:58 ` [PATCH 0/2] Fix Regression with AXP20X for 6.13-rc1 Jonathan Cameron
2024-12-11 22:06   ` Jonathan Cameron
2024-12-16 18:01   ` Chris Morgan
2024-12-16 18:04     ` Chen-Yu Tsai
2025-03-04 18:18       ` Chris Morgan
2025-03-04 23:29         ` Jonathan Cameron
2025-03-06  2:19           ` Chris Morgan
2025-03-08 17:11             ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox