[PATCH 0/5] mfd: Fix platform device ids to avoid probe failure
From: Bartlomiej Zolnierkiewicz
Date: Fri Mar 20 2015 - 15:02:32 EST
Hi,
Commit 6e3f62f0793e ("mfd: core: Fix platform-device id generation")
changed the way platform device ids are generated from mfd id base and
cell ids in mfd_add_device(). Unfortunately the change in question
breaks mfd drivers which are using mfd_add_devices() with mfd id base
equal to -1 and non-zero cell ids (used to distinguish cells with
the same name field). The result is that mfd core tries to register
platform devices with the same name which obviously fails and leads
to mfd device probe failure.
Relevant error messages (in this case for MAX8997 PMIC driver):
[ 0.911674] ------------[ cut here ]------------
[ 0.911706] WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x54/0x70()
[ 0.911718] sysfs: cannot create duplicate filename '/devices/13860000.i2c/i2c-0/0-0066/max8997-led'
...
[ 0.912382] ------------[ cut here ]------------
[ 0.912402] WARNING: CPU: 0 PID: 1 at lib/kobject.c:240 kobject_add_internal+0x238/0x2c0()
[ 0.912411] kobject_add_internal failed for max8997-led with -EEXIST, don't try to register things with the same name in th
...
[ 0.920721] max8997 0-0066: failed to add MFD devices -17
[ 0.921553] max8997: probe of 0-0066 failed with error -17
Changing mfd_add_devices() mfd id base from -1 to 0 and at the same
time setting proper cell ids for all cells fixes the issue.
MAX8997 PMIC fix was tested on Exynos4210 Origen board, the rest of
patches is compile tested only.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Bartlomiej Zolnierkiewicz (5):
mfd: max8997: Fix platform device ids to avoid probe failure
mfd: da9055: Fix platform device ids to avoid probe failure
mfd: lp8788: Fix platform device ids to avoid probe failure
mfd: wm831x: Fix platform device ids to avoid probe failure
mfd: da9052: Fix platform device names
drivers/mfd/da9052-core.c | 21 ++++--
drivers/mfd/da9055-core.c | 21 ++++--
drivers/mfd/lp8788.c | 10 ++-
drivers/mfd/max8997.c | 16 ++--
drivers/mfd/wm831x-core.c | 184 +++++++++++++++++++++++++++-------------------
5 files changed, 150 insertions(+), 102 deletions(-)
--
1.8.2.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/