From: Johan Hovold <johan@kernel.org>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Lee Jones <lee.jones@linaro.org>,
Samuel Ortiz <sameo@linux.intel.com>,
Johan Hovold <johan@kernel.org>,
Support Opensource <support.opensource@diasemi.com>,
Milo Kim <milo.kim@ti.com>,
patches@opensource.wolfsonmicro.com,
Fabio Estevam <fabio.estevam@freescale.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/5] mfd: Fix platform device ids to avoid probe failure
Date: Mon, 23 Mar 2015 11:07:18 +0100 [thread overview]
Message-ID: <20150323100718.GD3557@localhost> (raw)
In-Reply-To: <1426879403-19265-1-git-send-email-b.zolnierkie@samsung.com>
On Fri, Mar 20, 2015 at 08:23:18PM +0100, Bartlomiej Zolnierkiewicz wrote:
> 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.
First of all, thanks for finding these. I obviously overlooked this
class of drivers when fixing the device-id generation.
> 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.
This is however not the right fix. Instead you should be using
PLATFORM_DEVID_AUTO and keep the non-zero cell-ids as is, as this will
allow more than one mfd-device to be registered without resorting to
hacks.
Have a look at wm831x, for example, which offsets the device id base if
a wm831x_num parameter is passed in platform data (non-dt) to allow more
than one device to be registered. Your patch would break this, and still
not provide any other way to have multiple devices in a system.
Your changes would also break da9052, which would no longer allow more
than one device to be registered, something which was already fixed once
by commit b3f6c73db732 ("mfd: da9052-core: Fix platform-device id
collision").
Thanks,
Johan
next prev parent reply other threads:[~2015-03-23 10:07 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Johan Hovold [this message]
2015-03-23 13:11 ` [PATCH v2 0/5] mfd: Fix platform device ids to avoid probe failure 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150323100718.GD3557@localhost \
--to=johan@kernel.org \
--cc=b.zolnierkie@samsung.com \
--cc=fabio.estevam@freescale.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=milo.kim@ti.com \
--cc=patches@opensource.wolfsonmicro.com \
--cc=sameo@linux.intel.com \
--cc=support.opensource@diasemi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).