Andre Przywara
e37ec32188
mfd: axp20x: Allow multiple regulators
...
At the moment trying to register a second AXP chip makes the probe fail,
as some sysfs registration fails due to a duplicate name:
...
[ 3.688215] axp20x-i2c 0-0035: AXP20X driver loaded
[ 3.695610] axp20x-i2c 0-0036: AXP20x variant AXP323 found
[ 3.706151] sysfs: cannot create duplicate filename '/bus/platform/devices/axp20x-regulator'
[ 3.714718] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.0-rc1-00026-g50bf2e2c079d-dirty #192
[ 3.724020] Hardware name: Avaota A1 (DT)
[ 3.728029] Call trace:
[ 3.730477] dump_backtrace+0x94/0xec
[ 3.734146] show_stack+0x18/0x24
[ 3.737462] dump_stack_lvl+0x80/0xf4
[ 3.741128] dump_stack+0x18/0x24
[ 3.744444] sysfs_warn_dup+0x64/0x80
[ 3.748109] sysfs_do_create_link_sd+0xf0/0xf8
[ 3.752553] sysfs_create_link+0x20/0x40
[ 3.756476] bus_add_device+0x64/0x104
[ 3.760229] device_add+0x310/0x760
[ 3.763717] platform_device_add+0x10c/0x238
[ 3.767990] mfd_add_device+0x4ec/0x5c8
[ 3.771829] mfd_add_devices+0x88/0x11c
[ 3.775666] axp20x_device_probe+0x70/0x184
[ 3.779851] axp20x_i2c_probe+0x9c/0xd8
...
This is because we use PLATFORM_DEVID_NONE for the mfd_add_devices()
call, which would number the child devices in the same 0-based way, even
for the second (or any other) instance.
Use PLATFORM_DEVID_AUTO instead, which automatically assigns
non-conflicting device numbers.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20241007001408.27249-4-andre.przywara@arm.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-31 15:51:27 +00:00
..
2023-06-15 09:19:37 +01:00
2024-08-30 09:40:11 +01:00
2024-08-30 09:40:11 +01:00
2024-08-30 09:40:13 +01:00
2024-06-28 15:41:05 +01:00
2024-07-04 17:08:02 +01:00
2023-08-18 21:48:03 +01:00
2024-01-10 11:25:56 +00:00
2024-02-23 14:58:03 +00:00
2023-08-18 21:48:03 +01:00
2024-07-04 17:08:02 +01:00
2023-06-15 09:19:37 +01:00
2024-08-01 14:09:28 +01:00
2023-08-22 08:07:50 +01:00
2024-02-23 16:02:16 +00:00
2024-07-04 17:38:40 +01:00
2023-11-01 10:02:12 +00:00
2021-04-14 16:06:40 +01:00
2024-07-04 17:38:40 +01:00
2021-11-05 14:40:26 +00:00
2024-02-23 14:58:03 +00:00
2024-07-04 17:08:02 +01:00
2020-11-19 08:34:22 +00:00
2024-09-23 16:20:55 +01:00
2023-06-15 09:19:37 +01:00
2024-10-16 09:04:09 +01:00
2023-11-01 10:02:11 +00:00
2024-10-16 09:04:10 +01:00
2024-07-04 17:08:02 +01:00
2024-03-28 09:50:59 +00:00
2024-10-31 15:51:27 +00:00
2024-02-23 14:58:03 +00:00
2023-04-26 11:40:32 +01:00
2024-08-30 09:40:11 +01:00
2024-10-09 16:31:48 +01:00
2024-10-16 09:04:09 +01:00
2024-06-28 15:36:05 +01:00
2024-06-28 15:36:05 +01:00
2024-06-28 15:36:05 +01:00
2024-02-23 14:58:02 +00:00
2024-02-23 14:58:02 +00:00
2024-10-16 09:04:10 +01:00
2024-02-23 14:58:01 +00:00
2023-08-18 21:48:01 +01:00
2023-08-18 21:48:02 +01:00
2023-08-18 21:48:02 +01:00
2023-08-18 21:48:02 +01:00
2023-08-18 21:48:02 +01:00
2023-08-18 21:48:02 +01:00
2019-11-11 08:45:03 +00:00
2023-06-15 09:19:37 +01:00
2024-02-23 14:58:04 +00:00
2023-08-18 21:48:03 +01:00
2024-10-16 09:04:10 +01:00
2024-02-23 14:58:04 +00:00
2024-07-04 17:08:02 +01:00
2024-08-30 09:40:11 +01:00
2020-11-19 08:34:21 +00:00
2024-02-23 14:58:04 +00:00
2024-02-23 14:58:04 +00:00
2021-08-05 14:19:59 +01:00
2023-11-01 10:02:14 +00:00
2023-11-01 10:02:13 +00:00
2023-06-15 09:19:37 +01:00
2023-12-07 13:50:26 +00:00
2023-04-26 11:40:31 +01:00
2024-08-30 09:40:11 +01:00
2024-08-30 09:40:13 +01:00
2024-08-30 09:40:11 +01:00
2023-11-01 10:02:17 +00:00
2021-10-05 08:56:08 +01:00
2024-09-11 14:26:03 +02:00
2021-08-11 16:00:53 +03:00
2024-10-31 14:58:50 +00:00
2023-06-15 09:19:37 +01:00
2024-09-23 16:20:54 +01:00
2024-07-04 17:08:02 +01:00
2024-09-11 14:26:03 +02:00
2023-12-07 13:50:29 +00:00
2024-09-23 16:20:54 +01:00
2024-02-23 14:58:00 +00:00
2024-02-23 14:58:00 +00:00
2023-06-15 09:19:36 +01:00
2024-08-30 09:40:11 +01:00
2024-08-30 09:40:11 +01:00
2021-08-12 11:39:39 +01:00
2024-10-31 14:59:40 +00:00
2023-11-01 10:02:12 +00:00
2021-11-05 14:40:27 +00:00
2024-10-09 16:31:48 +01:00
2024-05-10 15:39:17 +01:00
2024-02-23 14:58:04 +00:00
2024-07-04 17:38:40 +01:00
2020-07-01 14:54:29 +01:00
2024-02-23 14:58:04 +00:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:08:02 +01:00
2022-09-28 16:09:50 +01:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:08:02 +01:00
2024-02-23 14:58:00 +00:00
2021-09-07 08:44:07 +01:00
2022-12-07 13:28:07 +00:00
2023-11-01 10:02:12 +00:00
2024-07-04 17:38:40 +01:00
2024-10-09 16:31:48 +01:00
2024-07-04 17:08:02 +01:00
2023-08-18 21:48:03 +01:00
2024-07-04 17:08:02 +01:00
2023-11-01 10:02:09 +00:00
2023-11-01 10:02:13 +00:00
2024-09-23 16:20:53 +01:00
2023-11-01 10:02:12 +00:00
2024-09-23 16:20:54 +01:00
2023-06-15 09:19:37 +01:00
2023-11-01 10:02:15 +00:00
2023-06-15 09:19:37 +01:00
2023-06-15 09:19:37 +01:00
2023-08-18 21:48:03 +01:00
2024-02-23 15:53:29 +00:00
2023-08-22 08:07:52 +01:00
2024-08-30 09:40:13 +01:00
2021-11-05 14:40:26 +00:00
2024-07-03 15:16:54 +02:00
2023-12-07 13:50:27 +00:00
2024-07-04 17:08:02 +01:00
2023-06-15 09:19:37 +01:00
2024-07-04 17:38:40 +01:00
2023-11-01 10:02:16 +00:00
2023-06-15 09:19:37 +01:00
2023-08-18 21:48:03 +01:00
2024-08-30 09:40:13 +01:00
2023-06-15 09:19:37 +01:00
2022-09-28 16:09:50 +01:00
2024-07-04 17:08:03 +01:00
2023-08-18 21:48:03 +01:00
2024-07-04 17:38:40 +01:00
2023-06-15 09:19:37 +01:00
2023-03-20 09:08:48 +00:00
2024-05-10 15:39:16 +01:00
2022-09-09 07:54:47 +01:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:38:41 +01:00
2023-11-01 10:02:10 +00:00
2023-12-07 13:50:27 +00:00
2023-06-15 09:19:37 +01:00
2024-07-04 17:38:40 +01:00
2022-12-07 13:28:11 +00:00
2023-11-01 10:02:17 +00:00
2023-12-07 13:50:27 +00:00
2024-07-04 17:38:40 +01:00
2024-09-23 16:20:54 +01:00
2024-03-21 12:44:10 -07:00
2023-06-15 09:19:36 +01:00
2024-02-23 14:58:05 +00:00
2020-11-19 08:34:21 +00:00
2024-08-30 09:40:12 +01:00
2024-10-16 09:04:11 +01:00
2024-09-23 16:20:53 +01:00
2024-02-23 14:58:04 +00:00
2024-02-23 14:58:04 +00:00
2024-08-30 09:40:12 +01:00
2024-08-30 09:40:11 +01:00
2024-08-30 09:40:12 +01:00
2024-10-16 09:04:11 +01:00
2024-07-04 17:08:02 +01:00
2024-05-10 15:39:18 +01:00
2024-05-10 15:39:18 +01:00
2023-04-26 11:40:34 +01:00
2024-07-04 17:38:40 +01:00
2023-08-18 21:48:03 +01:00
2023-06-15 09:19:37 +01:00
2023-08-22 08:07:52 +01:00
2023-04-26 11:40:34 +01:00
2024-10-16 09:04:10 +01:00
2023-04-26 11:40:26 +01:00
2023-04-26 11:40:26 +01:00
2023-06-15 09:19:37 +01:00
2024-02-23 14:58:05 +00:00
2023-06-15 09:19:37 +01:00
2021-08-16 13:45:34 +01:00
2023-06-15 09:19:37 +01:00
2023-12-07 13:50:28 +00:00
2023-06-15 09:19:37 +01:00
2024-08-30 09:40:13 +01:00
2024-07-04 17:38:40 +01:00
2022-03-08 09:44:05 +00:00
2023-08-18 21:48:03 +01:00
2023-12-07 13:50:28 +00:00
2024-02-23 14:58:05 +00:00
2023-08-22 08:07:51 +01:00
2023-04-26 11:40:31 +01:00
2023-06-21 18:45:37 +01:00
2021-11-05 14:40:26 +00:00
2024-02-23 14:58:05 +00:00
2024-07-04 17:08:02 +01:00
2023-08-18 21:48:03 +01:00
2021-06-02 10:51:19 +01:00
2024-10-16 09:04:09 +01:00
2024-09-23 16:20:54 +01:00
2024-07-25 06:53:47 -05:00
2023-08-18 21:48:03 +01:00
2024-07-11 16:38:23 +01:00
2024-08-30 09:40:11 +01:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:38:40 +01:00
2024-05-03 10:07:02 +01:00
2024-05-03 10:07:04 +01:00
2024-10-16 09:04:09 +01:00
2024-08-30 09:40:12 +01:00
2024-08-30 09:40:12 +01:00
2023-08-18 21:48:03 +01:00
2024-08-30 09:40:12 +01:00
2024-08-30 09:40:12 +01:00
2024-08-30 09:40:12 +01:00
2023-12-07 13:50:28 +00:00
2024-08-30 09:40:12 +01:00
2024-07-04 17:38:40 +01:00
2024-07-04 17:38:40 +01:00
2023-04-26 11:40:28 +01:00
2023-12-07 13:50:28 +00:00
2022-09-28 16:17:41 +01:00
2024-02-23 16:12:03 +00:00
2023-12-07 13:50:30 +00:00
2024-08-30 09:40:12 +01:00
2024-10-25 09:48:58 +01:00
2022-04-28 17:24:40 +01:00
2021-06-15 13:02:01 +01:00
2022-12-07 13:28:11 +00:00
2024-07-04 17:38:40 +01:00
2024-10-16 09:04:10 +01:00
2024-07-04 17:08:02 +01:00
2024-02-23 14:58:04 +00:00
2024-02-23 14:58:01 +00:00
2023-08-18 21:48:03 +01:00
2023-11-01 10:02:17 +00:00
2021-06-15 13:01:45 +01:00
2023-11-01 10:02:16 +00:00
2024-02-23 14:58:04 +00:00
2024-02-23 14:58:04 +00:00
2020-07-06 08:31:57 +01:00
2024-07-04 17:08:02 +01:00
2024-02-23 14:58:04 +00:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:38:40 +01:00
2021-08-05 12:41:06 +01:00
2023-08-18 21:48:02 +01:00
2023-08-18 21:48:03 +01:00
2023-08-18 21:48:03 +01:00