* [PATCH] mfd: da9052-core: Fix platform-device id collision
@ 2014-12-10 1:39 Fabio Estevam
2014-12-10 9:46 ` Lee Jones
0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2014-12-10 1:39 UTC (permalink / raw)
To: lee.jones
Cc: sameo, broonie, anthony.olech.opensource, support.opensource,
johan, linux-kernel, Fabio Estevam
From: Fabio Estevam <fabio.estevam@freescale.com>
Allow multiple DA9052 regulators be registered by registering with
PLATFORM_DEVID_AUTO instead of PLATFORM_DEVID_NONE.
The subdevices are currently registered with PLATFORM_DEVID_NONE, which
will cause a name collision on the platform bus when multiple regulators
are registered:
[ 0.128855] da9052-regulator da9052-regulator: invalid regulator ID specified
[ 0.128973] da9052-regulator: probe of da9052-regulator failed with error -22
[ 0.129148] ------------[ cut here ]------------
[ 0.129200] WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x5c/0x7c()
[ 0.129233] sysfs: cannot create duplicate filename '/devices/platform/soc/60000000.aips/63fc8000.i2c/i2c-0/0-0048/da9052-regulator
...
[ 0.132891] ------------[ cut here ]------------
[ 0.132924] WARNING: CPU: 0 PID: 1 at lib/kobject.c:240 kobject_add_internal+0x24c/0x2cc()
[ 0.132957] kobject_add_internal failed for da9052-regulator with -EEXIST, don't try to register things with the same name in the same directory.
...
[ 0.137000] da9052 0-0048: mfd_add_devices failed: -17
[ 0.138486] da9052: probe of 0-0048 failed with error -17
Based on the fix done by Johan Hovold at commit b6684228726cc255 ("mfd:
viperboard: Fix platform-device id collision").
Tested on a imx53-qsb board, where multiple DA9053 regulators can be
successfully probed.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/mfd/da9052-core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c
index 52a0c2f..ae498b5 100644
--- a/drivers/mfd/da9052-core.c
+++ b/drivers/mfd/da9052-core.c
@@ -554,7 +554,8 @@ int da9052_device_init(struct da9052 *da9052, u8 chip_id)
return ret;
}
- ret = mfd_add_devices(da9052->dev, -1, da9052_subdev_info,
+ ret = mfd_add_devices(da9052->dev, PLATFORM_DEVID_AUTO,
+ da9052_subdev_info,
ARRAY_SIZE(da9052_subdev_info), NULL, 0, NULL);
if (ret) {
dev_err(da9052->dev, "mfd_add_devices failed: %d\n", ret);
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] mfd: da9052-core: Fix platform-device id collision
2014-12-10 1:39 [PATCH] mfd: da9052-core: Fix platform-device id collision Fabio Estevam
@ 2014-12-10 9:46 ` Lee Jones
2014-12-10 11:19 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Lee Jones @ 2014-12-10 9:46 UTC (permalink / raw)
To: Fabio Estevam
Cc: sameo, broonie, anthony.olech.opensource, support.opensource,
johan, linux-kernel, Fabio Estevam
On Tue, 09 Dec 2014, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Allow multiple DA9052 regulators be registered by registering with
> PLATFORM_DEVID_AUTO instead of PLATFORM_DEVID_NONE.
>
> The subdevices are currently registered with PLATFORM_DEVID_NONE, which
> will cause a name collision on the platform bus when multiple regulators
> are registered:
>
> [ 0.128855] da9052-regulator da9052-regulator: invalid regulator ID specified
> [ 0.128973] da9052-regulator: probe of da9052-regulator failed with error -22
> [ 0.129148] ------------[ cut here ]------------
> [ 0.129200] WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x5c/0x7c()
> [ 0.129233] sysfs: cannot create duplicate filename '/devices/platform/soc/60000000.aips/63fc8000.i2c/i2c-0/0-0048/da9052-regulator
> ...
> [ 0.132891] ------------[ cut here ]------------
> [ 0.132924] WARNING: CPU: 0 PID: 1 at lib/kobject.c:240 kobject_add_internal+0x24c/0x2cc()
> [ 0.132957] kobject_add_internal failed for da9052-regulator with -EEXIST, don't try to register things with the same name in the same directory.
> ...
> [ 0.137000] da9052 0-0048: mfd_add_devices failed: -17
> [ 0.138486] da9052: probe of 0-0048 failed with error -17
>
> Based on the fix done by Johan Hovold at commit b6684228726cc255 ("mfd:
> viperboard: Fix platform-device id collision").
>
> Tested on a imx53-qsb board, where multiple DA9053 regulators can be
> successfully probed.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> drivers/mfd/da9052-core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied for v3.20, thanks.
> diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c
> index 52a0c2f..ae498b5 100644
> --- a/drivers/mfd/da9052-core.c
> +++ b/drivers/mfd/da9052-core.c
> @@ -554,7 +554,8 @@ int da9052_device_init(struct da9052 *da9052, u8 chip_id)
> return ret;
> }
>
> - ret = mfd_add_devices(da9052->dev, -1, da9052_subdev_info,
> + ret = mfd_add_devices(da9052->dev, PLATFORM_DEVID_AUTO,
> + da9052_subdev_info,
> ARRAY_SIZE(da9052_subdev_info), NULL, 0, NULL);
> if (ret) {
> dev_err(da9052->dev, "mfd_add_devices failed: %d\n", ret);
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] mfd: da9052-core: Fix platform-device id collision
2014-12-10 9:46 ` Lee Jones
@ 2014-12-10 11:19 ` Mark Brown
2014-12-10 12:11 ` Lee Jones
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2014-12-10 11:19 UTC (permalink / raw)
To: Lee Jones
Cc: Fabio Estevam, sameo, anthony.olech.opensource,
support.opensource, johan, linux-kernel, Fabio Estevam
[-- Attachment #1: Type: text/plain, Size: 363 bytes --]
On Wed, Dec 10, 2014 at 09:46:50AM +0000, Lee Jones wrote:
> On Tue, 09 Dec 2014, Fabio Estevam wrote:
> > Tested on a imx53-qsb board, where multiple DA9053 regulators can be
> > successfully probed.
> Applied for v3.20, thanks.
Fabio was saying that -next is broken which presumably means that v3.19
will be broken unless this gets sent as a fix.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mfd: da9052-core: Fix platform-device id collision
2014-12-10 11:19 ` Mark Brown
@ 2014-12-10 12:11 ` Lee Jones
2014-12-23 16:45 ` Fabio Estevam
0 siblings, 1 reply; 6+ messages in thread
From: Lee Jones @ 2014-12-10 12:11 UTC (permalink / raw)
To: Mark Brown
Cc: Fabio Estevam, sameo, anthony.olech.opensource,
support.opensource, johan, linux-kernel, Fabio Estevam
On Wed, 10 Dec 2014, Mark Brown wrote:
> On Wed, Dec 10, 2014 at 09:46:50AM +0000, Lee Jones wrote:
> > On Tue, 09 Dec 2014, Fabio Estevam wrote:
>
> > > Tested on a imx53-qsb board, where multiple DA9053 regulators can be
> > > successfully probed.
>
> > Applied for v3.20, thanks.
>
> Fabio was saying that -next is broken which presumably means that v3.19
> will be broken unless this gets sent as a fix.
My train of thought was that the original configuration has not
changed since 2011. I guess other regulators have been recently
introduced. Very well, applied to -fixes.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mfd: da9052-core: Fix platform-device id collision
2014-12-10 12:11 ` Lee Jones
@ 2014-12-23 16:45 ` Fabio Estevam
2015-01-20 14:44 ` Lee Jones
0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2014-12-23 16:45 UTC (permalink / raw)
To: Lee Jones
Cc: Mark Brown, Samuel Ortiz, anthony.olech.opensource,
support.opensource, johan, linux-kernel, Fabio Estevam
Hi Lee,
On Wed, Dec 10, 2014 at 10:11 AM, Lee Jones <lee.jones@linaro.org> wrote:
> My train of thought was that the original configuration has not
> changed since 2011. I guess other regulators have been recently
> introduced. Very well, applied to -fixes.
Still don't see this patch in linux-next.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mfd: da9052-core: Fix platform-device id collision
2014-12-23 16:45 ` Fabio Estevam
@ 2015-01-20 14:44 ` Lee Jones
0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2015-01-20 14:44 UTC (permalink / raw)
To: Fabio Estevam
Cc: Mark Brown, Samuel Ortiz, anthony.olech.opensource,
support.opensource, johan, linux-kernel, Fabio Estevam
On Tue, 23 Dec 2014, Fabio Estevam wrote:
> On Wed, Dec 10, 2014 at 10:11 AM, Lee Jones <lee.jones@linaro.org> wrote:
>
> > My train of thought was that the original configuration has not
> > changed since 2011. I guess other regulators have been recently
> > introduced. Very well, applied to -fixes.
>
> Still don't see this patch in linux-next.
Sorry for the delay, I have been on vacation.
I sent out my -fixes branch to Linus this morning.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-01-20 14:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-10 1:39 [PATCH] mfd: da9052-core: Fix platform-device id collision Fabio Estevam
2014-12-10 9:46 ` Lee Jones
2014-12-10 11:19 ` Mark Brown
2014-12-10 12:11 ` Lee Jones
2014-12-23 16:45 ` Fabio Estevam
2015-01-20 14:44 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox