Srinivas Kandagatla
3f07c65833
nvmem: qfprom: use NVMEM_DEVID_AUTO for multiple instances
There could be multiple qfprom devices on some SoCs. For example, on
MSM8939, qfprom@58000 holds efuse bits for Core Power Reduction (CPR),
and qfprom@5c000 holds bits for TSENS. Registering multiple nvmem
devices with the same id results in the following failure on the second
device.
[ 1.682731] sysfs: cannot create duplicate filename /bus/nvmem/devices/qfprom0
[ 1.685889] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.107-00567-g11c887ce2838-dirty #334
[ 1.693191] Hardware name: Square, Inc. T2 Devkit (DT)
[ 1.701610] Call trace:
[ 1.706673] dump_backtrace+0x0/0x158
[ 1.708987] show_stack+0x14/0x20
[ 1.712810] dump_stack+0x98/0xbc
[ 1.716114] sysfs_warn_dup+0x60/0x78
[ 1.719401] sysfs_do_create_link_sd.isra.0+0xdc/0xe8
[ 1.723047] sysfs_create_link+0x20/0x40
[ 1.728088] bus_add_device+0x68/0x130
[ 1.732083] device_add+0x3f8/0x628
[ 1.735639] nvmem_register.part.4+0x150/0x348
[ 1.739018] devm_nvmem_register+0x4c/0xa8
[ 1.743532] qfprom_probe+0x94/0xb8
[ 1.747615] platform_drv_probe+0x50/0xa0
[ 1.750998] really_probe+0x1b8/0x298
[ 1.755164] driver_probe_device+0x58/0x100
[ 1.758810] __driver_attach+0xe0/0xe8
[ 1.762802] bus_for_each_dev+0x74/0xc8
[ 1.766622] driver_attach+0x20/0x28
[ 1.770354] bus_add_driver+0x1ac/0x218
[ 1.774175] driver_register+0x60/0x110
[ 1.777734] __platform_driver_register+0x40/0x48
[ 1.781570] qfprom_driver_init+0x18/0x20
[ 1.786416] do_one_initcall+0x5c/0x178
[ 1.790418] kernel_init_freeable+0x198/0x244
[ 1.794062] kernel_init+0x10/0x108
[ 1.798567] ret_from_fork+0x10/0x18
[ 1.802084] qcom,qfprom: probe of 5c000.qfprom failed with error -17
Fix this issue by using NVMEM_DEVID_AUTO.
Reported-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Link: https://lore.kernel.org/r/20200722100705.7772-9-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-29 17:12:08 +02:00
..
2020-06-14 01:57:21 +09:00
2020-07-03 16:15:31 +02:00
2020-06-15 23:08:28 -05:00
2020-07-29 17:05:44 +02:00
2020-06-19 13:09:40 -07:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2020-07-23 17:04:28 +02:00
2020-07-16 11:26:40 -07:00
2020-06-03 16:27:18 -07:00
2020-07-27 11:49:37 +02:00
2020-06-10 16:05:54 -07:00
2020-07-27 11:49:37 +02:00
2020-07-15 19:00:12 -07:00
2020-07-25 13:27:12 -07:00
2020-06-14 01:57:21 +09:00
2020-06-14 14:46:52 +01:00
2020-07-13 17:55:57 +02:00
2020-06-25 13:52:53 +02:00
2020-07-20 18:28:04 -07:00
2020-06-04 19:06:23 -07:00
2020-05-28 18:02:40 +09:00
2020-06-17 10:57:41 -07:00
2020-07-15 15:58:11 -07:00
2020-07-10 15:39:29 +05:30
2020-06-18 20:25:25 +02:00
2020-06-14 01:57:21 +09:00
2020-05-29 17:36:02 +09:00
2020-06-15 23:08:31 -05:00
2020-07-27 11:49:37 +02:00
2020-07-27 11:49:37 +02:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2020-06-26 23:53:25 +02:00
2020-07-23 14:06:16 +10:00
2020-07-29 16:58:08 +02:00
2020-07-17 09:43:13 -07:00
2020-06-14 01:57:21 +09:00
2020-06-29 10:30:35 +00:00
2020-07-18 08:11:44 -07:00
2020-07-21 15:48:40 +02:00
2020-07-23 22:26:44 +02:00
2020-06-14 01:57:21 +09:00
2020-07-08 09:20:50 +02:00
2020-07-21 13:51:35 -03:00
2020-07-13 18:31:15 -07:00
2020-07-27 11:49:37 +02:00
2020-07-22 17:29:28 +02:00
2020-06-14 01:57:21 +09:00
2020-07-06 12:48:04 -07:00
2020-06-14 01:57:21 +09:00
2020-06-04 11:03:45 -07:00
2020-06-02 15:29:19 -07:00
2020-06-14 01:57:21 +09:00
2020-06-10 22:43:57 -05:00
2020-07-23 14:39:37 -04:00
2020-06-26 00:27:37 -07:00
2020-05-28 14:18:11 +02:00
2020-06-26 22:51:53 -04:00
2020-07-14 17:44:42 +02:00
2020-07-29 16:21:13 +02:00
2020-07-27 11:49:37 +02:00
2020-07-07 21:04:38 +02:00
2020-06-29 18:39:44 +02:00
2020-07-24 20:17:42 -07:00
2020-07-20 18:31:33 -07:00
2020-06-05 20:02:09 -04:00
2020-07-08 17:08:01 -07:00
2020-07-16 16:40:27 +02:00
2020-07-29 17:12:08 +02:00
2020-06-19 13:39:00 -07:00
2020-07-16 08:50:54 +05:30
2020-06-15 23:08:32 -05:00
2020-06-14 01:57:21 +09:00
2020-07-24 18:30:24 -07:00
2020-06-14 01:57:21 +09:00
2020-07-17 10:51:44 +01:00
2020-07-23 09:52:10 +02:00
2020-06-28 01:08:21 +02:00
2020-07-15 12:47:04 +03:00
2020-06-14 01:57:21 +09:00
2020-06-10 11:28:35 -07:00
2020-06-13 13:29:16 -07:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2020-06-04 19:09:28 +02:00
2020-06-15 23:08:32 -05:00
2020-06-25 15:29:21 +01:00
2020-06-08 13:01:08 -07:00
2020-06-07 10:59:32 -07:00
2020-06-08 13:01:08 -07:00
2020-06-07 16:11:23 -07:00
2020-07-03 11:41:31 +02:00
2020-06-14 01:57:21 +09:00
2020-07-20 21:38:20 -04:00
2020-06-14 01:57:21 +09:00
2020-07-16 22:08:07 +02:00
2020-07-23 09:12:15 +02:00
2020-07-17 10:24:09 -07:00
2020-07-26 09:14:59 -07:00
2020-06-13 13:29:16 -07:00
2020-06-09 09:39:14 -07:00
2020-07-16 11:08:54 -07:00
2020-06-25 15:45:30 +03:00
2020-07-24 10:58:14 +02:00
2020-07-10 13:42:33 +02:00
2020-07-23 13:21:01 +02:00
2020-06-22 12:34:21 -04:00
2020-07-17 08:28:40 -06:00
2020-06-22 12:34:21 -04:00
2020-07-23 16:22:25 +02:00
2020-07-10 13:45:32 +02:00
2020-07-24 18:30:24 -07:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2020-06-15 23:08:32 -05:00
2020-06-14 01:57:21 +09:00
2020-07-11 11:16:46 -07:00
2020-06-14 01:57:21 +09:00