All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] mfd: Fix platform device ids to avoid probe failure
@ 2015-03-20 19:23 Bartlomiej Zolnierkiewicz
  2015-03-20 19:23 ` [PATCH v2 1/5] mfd: max8997: " Bartlomiej Zolnierkiewicz
                   ` (5 more replies)
  0 siblings, 6 replies; 40+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2015-03-20 19:23 UTC (permalink / raw)
  To: Lee Jones, Samuel Ortiz
  Cc: Johan Hovold, Support Opensource, Milo Kim, patches,
	Fabio Estevam, Marek Szyprowski, linux-kernel, b.zolnierkie

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.

Changes since v1:
- corrected 'stable' mailing list address, no other changes

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


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

end of thread, other threads:[~2015-05-19 12:02 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-20 19:23 [PATCH v2 0/5] mfd: Fix platform device ids to avoid probe failure Bartlomiej Zolnierkiewicz
2015-03-20 19:23 ` [PATCH v2 1/5] mfd: max8997: " Bartlomiej Zolnierkiewicz
2015-03-20 19:23 ` [PATCH v2 2/5] mfd: da9055: " Bartlomiej Zolnierkiewicz
2015-03-20 19:23 ` [PATCH v2 3/5] mfd: lp8788: " Bartlomiej Zolnierkiewicz
2015-03-20 19:23 ` [PATCH v2 4/5] mfd: wm831x: " Bartlomiej Zolnierkiewicz
2015-03-20 19:23 ` [PATCH v2 5/5] mfd: da9052: Fix platform device names Bartlomiej Zolnierkiewicz
2015-03-23 10:07 ` [PATCH v2 0/5] mfd: Fix platform device ids to avoid probe failure Johan Hovold
2015-03-23 13:11   ` Bartlomiej Zolnierkiewicz
2015-03-25 11:02     ` Johan Hovold
2015-03-25 11:07       ` [PATCH 1/2] mfd: da9052: fix broken regulator probe Johan Hovold
2015-03-25 11:07         ` [PATCH 2/2] mfd: core: fix platform-device name collisions Johan Hovold
2015-03-25 12:02           ` Bartlomiej Zolnierkiewicz
2015-03-26  8:34           ` Lee Jones
2015-03-25 12:01         ` [PATCH 1/2] mfd: da9052: fix broken regulator probe Bartlomiej Zolnierkiewicz
2015-03-26  8:32         ` Lee Jones
2015-04-14 13:04           ` Johan Hovold
2015-04-29  7:44             ` Johan Hovold
2015-04-29  8:41               ` Lee Jones
2015-05-13 15:43                 ` Lee Jones
2015-05-13 16:08                   ` Mark Brown
2015-05-13 16:54                     ` Lee Jones
2015-05-13 17:29                       ` Mark Brown
2015-05-14  7:19                         ` Lee Jones
2015-05-15 14:47                           ` Johan Hovold
2015-05-18  9:10                             ` Lee Jones
2015-05-18  9:51                               ` Johan Hovold
2015-05-18 10:13                                 ` Lee Jones
2015-05-18 16:28                                   ` Mark Brown
2015-05-18 16:24                                 ` Mark Brown
2015-05-18 16:46                                   ` Johan Hovold
2015-05-18 18:46                                     ` Mark Brown
2015-05-19 10:01                                       ` Johan Hovold
2015-05-19 10:38                                         ` Mark Brown
2015-05-19 11:01                                           ` Johan Hovold
2015-05-19 12:01                                             ` Mark Brown
2015-05-15 14:27                   ` [PATCH RESEND] " Johan Hovold
2015-05-18 18:47                     ` Mark Brown
2015-05-18 18:57                     ` Lee Jones
2015-03-30  7:18         ` [PATCH 1/2] " Lee Jones
2015-03-25 12:04       ` [PATCH v2 0/5] mfd: Fix platform device ids to avoid probe failure Bartlomiej Zolnierkiewicz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.