mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* da9052-regulator fails to probe in linux-next
@ 2014-12-09 20:41 Fabio Estevam
  2014-12-09 21:17 ` Fabio Estevam
  2014-12-09 21:28 ` Mark Brown
  0 siblings, 2 replies; 11+ messages in thread
From: Fabio Estevam @ 2014-12-09 20:41 UTC (permalink / raw)
  To: Mark Brown; +Cc: anthony.olech.opensource, support.opensource, linux-kernel

Hi,

In linux-next I am no longer able to get da9052 regulator driver
probed on a imx53-qsb board:

[    0.128665] da9052-regulator da9052-regulator: invalid regulator ID specified
[    0.128786] da9052-regulator: probe of da9052-regulator failed with error -22
[    0.128957] ------------[ cut here ]------------
[    0.129010] WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:31
sysfs_warn_dup+0x5c/0x7c()
[    0.129043] sysfs: cannot create duplicate filename
'/devices/platform/soc/60000000.aips/63fc8000.i2c/i2c-0/0-0048/da9052-regulator
'
.....

With kernel 3.18 it probes fine. Haven't bisected yet, but if anyone
has any ideas, please let me know.

Thanks

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

* Re: da9052-regulator fails to probe in linux-next
  2014-12-09 20:41 da9052-regulator fails to probe in linux-next Fabio Estevam
@ 2014-12-09 21:17 ` Fabio Estevam
  2014-12-09 21:27   ` Mark Brown
  2014-12-09 21:28 ` Mark Brown
  1 sibling, 1 reply; 11+ messages in thread
From: Fabio Estevam @ 2014-12-09 21:17 UTC (permalink / raw)
  To: Mark Brown
  Cc: anthony.olech.opensource, support.opensource, linux-kernel,
	Olof Johansson

On Tue, Dec 9, 2014 at 6:41 PM, Fabio Estevam <festevam@gmail.com> wrote:
> Hi,
>
> In linux-next I am no longer able to get da9052 regulator driver
> probed on a imx53-qsb board:
>
> [    0.128665] da9052-regulator da9052-regulator: invalid regulator ID specified
> [    0.128786] da9052-regulator: probe of da9052-regulator failed with error -22
> [    0.128957] ------------[ cut here ]------------
> [    0.129010] WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:31
> sysfs_warn_dup+0x5c/0x7c()
> [    0.129043] sysfs: cannot create duplicate filename
> '/devices/platform/soc/60000000.aips/63fc8000.i2c/i2c-0/0-0048/da9052-regulator
> '
> .....
>
> With kernel 3.18 it probes fine. Haven't bisected yet, but if anyone
> has any ideas, please let me know.

Seem like this issue is not specific to the da9052 regulator.

On a imx6q-wandboard we can see the internal anatop regulators being
probed on linux-next 20141031:
http://arm-soc.lixom.net/bootlogs/next/next-20141031/wandboard-arm-imx_v6_v7_defconfig.html

[    0.072014] vdd1p1: 800 <--> 1375 mV at 1100 mV
[    0.073027] vdd3p0: 2800 <--> 3150 mV at 3000 mV
[    0.073933] vdd2p5: 2000 <--> 2750 mV at 2400 mV
[    0.074888] vddarm: 725 <--> 1450 mV at 1150 mV
[    0.075935] vddpu: 725 <--> 1450 mV at 1150 mV
[    0.076897] vddsoc: 725 <--> 1450 mV at 1200 mV


,but since next-20141103 they do not probe anymore:
http://arm-soc.lixom.net/bootlogs/next/next-20141103/wandboard-arm-imx_v6_v7_defconfig.html

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

* Re: da9052-regulator fails to probe in linux-next
  2014-12-09 21:17 ` Fabio Estevam
@ 2014-12-09 21:27   ` Mark Brown
  2014-12-09 21:34     ` Fabio Estevam
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2014-12-09 21:27 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: anthony.olech.opensource, support.opensource, linux-kernel,
	Olof Johansson

[-- Attachment #1: Type: text/plain, Size: 1101 bytes --]

On Tue, Dec 09, 2014 at 07:17:14PM -0200, Fabio Estevam wrote:

> Seem like this issue is not specific to the da9052 regulator.

> On a imx6q-wandboard we can see the internal anatop regulators being
> probed on linux-next 20141031:
> http://arm-soc.lixom.net/bootlogs/next/next-20141031/wandboard-arm-imx_v6_v7_defconfig.html
> 
> [    0.072014] vdd1p1: 800 <--> 1375 mV at 1100 mV
> [    0.073027] vdd3p0: 2800 <--> 3150 mV at 3000 mV
> [    0.073933] vdd2p5: 2000 <--> 2750 mV at 2400 mV
> [    0.074888] vddarm: 725 <--> 1450 mV at 1150 mV
> [    0.075935] vddpu: 725 <--> 1450 mV at 1150 mV
> [    0.076897] vddsoc: 725 <--> 1450 mV at 1200 mV

> ,but since next-20141103 they do not probe anymore:
> http://arm-soc.lixom.net/bootlogs/next/next-20141103/wandboard-arm-imx_v6_v7_defconfig.html

That last log looks *extremely* unhappy in general, I can't actually see
any references to attempts to do regulator things and there's lots of
backtraces in there.  AFAICT those regulators are anatop regulators and
I can't find references to that driver or anything called "vdd".

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: da9052-regulator fails to probe in linux-next
  2014-12-09 20:41 da9052-regulator fails to probe in linux-next Fabio Estevam
  2014-12-09 21:17 ` Fabio Estevam
@ 2014-12-09 21:28 ` Mark Brown
  1 sibling, 0 replies; 11+ messages in thread
From: Mark Brown @ 2014-12-09 21:28 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: anthony.olech.opensource, support.opensource, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 328 bytes --]

On Tue, Dec 09, 2014 at 06:41:09PM -0200, Fabio Estevam wrote:

> With kernel 3.18 it probes fine. Haven't bisected yet, but if anyone
> has any ideas, please let me know.

If it's regulator related my guess would be the stuff around
072e78b12bf5182a3e2 (regulator: of: Add regulator desc param to
of_get_regulator_init_data())

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: da9052-regulator fails to probe in linux-next
  2014-12-09 21:27   ` Mark Brown
@ 2014-12-09 21:34     ` Fabio Estevam
  2014-12-09 21:37       ` Mark Brown
  2014-12-09 21:44       ` Fabio Estevam
  0 siblings, 2 replies; 11+ messages in thread
From: Fabio Estevam @ 2014-12-09 21:34 UTC (permalink / raw)
  To: Mark Brown
  Cc: anthony.olech.opensource, support.opensource, linux-kernel,
	Olof Johansson

Hi Mark,

On Tue, Dec 9, 2014 at 7:27 PM, Mark Brown <broonie@kernel.org> wrote:
> On Tue, Dec 09, 2014 at 07:17:14PM -0200, Fabio Estevam wrote:
>
>> Seem like this issue is not specific to the da9052 regulator.
>
>> On a imx6q-wandboard we can see the internal anatop regulators being
>> probed on linux-next 20141031:
>> http://arm-soc.lixom.net/bootlogs/next/next-20141031/wandboard-arm-imx_v6_v7_defconfig.html
>>
>> [    0.072014] vdd1p1: 800 <--> 1375 mV at 1100 mV
>> [    0.073027] vdd3p0: 2800 <--> 3150 mV at 3000 mV
>> [    0.073933] vdd2p5: 2000 <--> 2750 mV at 2400 mV
>> [    0.074888] vddarm: 725 <--> 1450 mV at 1150 mV
>> [    0.075935] vddpu: 725 <--> 1450 mV at 1150 mV
>> [    0.076897] vddsoc: 725 <--> 1450 mV at 1200 mV
>
>> ,but since next-20141103 they do not probe anymore:
>> http://arm-soc.lixom.net/bootlogs/next/next-20141103/wandboard-arm-imx_v6_v7_defconfig.html
>
> That last log looks *extremely* unhappy in general, I can't actually see
> any references to attempts to do regulator things and there's lots of
> backtraces in there.  AFAICT those regulators are anatop regulators and
> I can't find references to that driver or anything called "vdd".

Yes, so here is a cleaner one:
http://arm-soc.lixom.net/bootlogs/next/next-20141104/wandboard-arm-imx_v6_v7_defconfig.html

The anatop regulators is drivers/regulator/pfuze100-regulator.c and
the dt description is at:
arch/arm/boot/dts/imx6qdl.dtsi

On 20141104 they are not getting probed.

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

* Re: da9052-regulator fails to probe in linux-next
  2014-12-09 21:34     ` Fabio Estevam
@ 2014-12-09 21:37       ` Mark Brown
  2014-12-09 21:40         ` Fabio Estevam
  2014-12-09 21:44       ` Fabio Estevam
  1 sibling, 1 reply; 11+ messages in thread
From: Mark Brown @ 2014-12-09 21:37 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: anthony.olech.opensource, support.opensource, linux-kernel,
	Olof Johansson

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

On Tue, Dec 09, 2014 at 07:34:09PM -0200, Fabio Estevam wrote:

> Yes, so here is a cleaner one:
> http://arm-soc.lixom.net/bootlogs/next/next-20141104/wandboard-arm-imx_v6_v7_defconfig.html

> The anatop regulators is drivers/regulator/pfuze100-regulator.c and
> the dt description is at:
> arch/arm/boot/dts/imx6qdl.dtsi

Still not seeing any references to either pfuze100 or vdd (other than
the external audio CODEC)...

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: da9052-regulator fails to probe in linux-next
  2014-12-09 21:37       ` Mark Brown
@ 2014-12-09 21:40         ` Fabio Estevam
  2014-12-09 21:47           ` Mark Brown
  0 siblings, 1 reply; 11+ messages in thread
From: Fabio Estevam @ 2014-12-09 21:40 UTC (permalink / raw)
  To: Mark Brown
  Cc: anthony.olech.opensource, support.opensource, linux-kernel,
	Olof Johansson

On Tue, Dec 9, 2014 at 7:37 PM, Mark Brown <broonie@kernel.org> wrote:
> On Tue, Dec 09, 2014 at 07:34:09PM -0200, Fabio Estevam wrote:
>
>> Yes, so here is a cleaner one:
>> http://arm-soc.lixom.net/bootlogs/next/next-20141104/wandboard-arm-imx_v6_v7_defconfig.html
>
>> The anatop regulators is drivers/regulator/pfuze100-regulator.c and
>> the dt description is at:
>> arch/arm/boot/dts/imx6qdl.dtsi
>
> Still not seeing any references to either pfuze100 or vdd (other than
> the external audio CODEC)...

Exactly, that's the bug :-)

If we compare it against next-20141031:
http://arm-soc.lixom.net/bootlogs/next/next-20141031/wandboard-arm-imx_v6_v7_defconfig.html

We get:

[    0.052239] CPU identified as i.MX6Q, silicon rev 1.2
[    0.072014] vdd1p1: 800 <--> 1375 mV at 1100 mV
[    0.073027] vdd3p0: 2800 <--> 3150 mV at 3000 mV
[    0.073933] vdd2p5: 2000 <--> 2750 mV at 2400 mV
[    0.074888] vddarm: 725 <--> 1450 mV at 1150 mV
[    0.075935] vddpu: 725 <--> 1450 mV at 1150 mV
[    0.076897] vddsoc: 725 <--> 1450 mV at 1200 mV

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

* Re: da9052-regulator fails to probe in linux-next
  2014-12-09 21:34     ` Fabio Estevam
  2014-12-09 21:37       ` Mark Brown
@ 2014-12-09 21:44       ` Fabio Estevam
  1 sibling, 0 replies; 11+ messages in thread
From: Fabio Estevam @ 2014-12-09 21:44 UTC (permalink / raw)
  To: Mark Brown
  Cc: anthony.olech.opensource, support.opensource, linux-kernel,
	Olof Johansson

On Tue, Dec 9, 2014 at 7:34 PM, Fabio Estevam <festevam@gmail.com> wrote:


> The anatop regulators is drivers/regulator/pfuze100-regulator.c and

Sorry, here I meant drivers/regulator/anatop-regulator.c.

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

* Re: da9052-regulator fails to probe in linux-next
  2014-12-09 21:40         ` Fabio Estevam
@ 2014-12-09 21:47           ` Mark Brown
  2014-12-10  1:07             ` Fabio Estevam
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2014-12-09 21:47 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: anthony.olech.opensource, support.opensource, linux-kernel,
	Olof Johansson

[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]

On Tue, Dec 09, 2014 at 07:40:40PM -0200, Fabio Estevam wrote:
> On Tue, Dec 9, 2014 at 7:37 PM, Mark Brown <broonie@kernel.org> wrote:

> > Still not seeing any references to either pfuze100 or vdd (other than
> > the external audio CODEC)...

> Exactly, that's the bug :-)

My point is that I'm not seeing anything complaining about those devices
or the supplies they offer so nothing there indicates to me that there's
any kind of problem.

> If we compare it against next-20141031:
> http://arm-soc.lixom.net/bootlogs/next/next-20141031/wandboard-arm-imx_v6_v7_defconfig.html

> [    0.052239] CPU identified as i.MX6Q, silicon rev 1.2
> [    0.072014] vdd1p1: 800 <--> 1375 mV at 1100 mV
> [    0.073027] vdd3p0: 2800 <--> 3150 mV at 3000 mV
> [    0.073933] vdd2p5: 2000 <--> 2750 mV at 2400 mV
> [    0.074888] vddarm: 725 <--> 1450 mV at 1150 mV
> [    0.075935] vddpu: 725 <--> 1450 mV at 1150 mV
> [    0.076897] vddsoc: 725 <--> 1450 mV at 1200 mV

Remember that these messages are now at debug level.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: da9052-regulator fails to probe in linux-next
  2014-12-09 21:47           ` Mark Brown
@ 2014-12-10  1:07             ` Fabio Estevam
  2014-12-10  1:19               ` Fabio Estevam
  0 siblings, 1 reply; 11+ messages in thread
From: Fabio Estevam @ 2014-12-10  1:07 UTC (permalink / raw)
  To: Mark Brown
  Cc: anthony.olech.opensource, support.opensource, linux-kernel,
	Olof Johansson, Lee Jones

On Tue, Dec 9, 2014 at 7:47 PM, Mark Brown <broonie@kernel.org> wrote:

> My point is that I'm not seeing anything complaining about those devices
> or the supplies they offer so nothing there indicates to me that there's
> any kind of problem.

Yes, you are right. Sorry for the confusion here.

>> [    0.052239] CPU identified as i.MX6Q, silicon rev 1.2
>> [    0.072014] vdd1p1: 800 <--> 1375 mV at 1100 mV
>> [    0.073027] vdd3p0: 2800 <--> 3150 mV at 3000 mV
>> [    0.073933] vdd2p5: 2000 <--> 2750 mV at 2400 mV
>> [    0.074888] vddarm: 725 <--> 1450 mV at 1150 mV
>> [    0.075935] vddpu: 725 <--> 1450 mV at 1150 mV
>> [    0.076897] vddsoc: 725 <--> 1450 mV at 1200 mV
>
> Remember that these messages are now at debug level.

I was not aware of this change, thanks for letting me know.

Now I am back to the original da9052 regulator probe issue. If I do:

--- a/drivers/mfd/da9052-core.c
+++ b/drivers/mfd/da9052-core.c
@@ -554,7 +554,7 @@ 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, 0, da9052_subdev_info,
                              ARRAY_SIZE(da9052_subdev_info), NULL, 0, NULL);

,then the da9052 regulator can probe succesfully:

ls /sys/class/regulator/
regulator.0   regulator.11  regulator.14  regulator.2   regulator.5
regulator.8
regulator.1   regulator.12  regulator.15  regulator.3   regulator.6
regulator.9
regulator.10  regulator.13  regulator.16  regulator.4   regulator.7

,except for this one:

[    0.157574] da9052-regulator da9052-regulator.14: invalid regulator
ID specified
[    0.157713] da9052-regulator: probe of da9052-regulator.14 failed
with error -2

Does anyone know why should I change the index of mfd_add_devices() ?

Thanks

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

* Re: da9052-regulator fails to probe in linux-next
  2014-12-10  1:07             ` Fabio Estevam
@ 2014-12-10  1:19               ` Fabio Estevam
  0 siblings, 0 replies; 11+ messages in thread
From: Fabio Estevam @ 2014-12-10  1:19 UTC (permalink / raw)
  To: Mark Brown
  Cc: anthony.olech.opensource, support.opensource, linux-kernel,
	Olof Johansson, Lee Jones

On Tue, Dec 9, 2014 at 11:07 PM, Fabio Estevam <festevam@gmail.com> wrote:

> Now I am back to the original da9052 regulator probe issue. If I do:
>
> --- a/drivers/mfd/da9052-core.c
> +++ b/drivers/mfd/da9052-core.c
> @@ -554,7 +554,7 @@ 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, 0, da9052_subdev_info,
>                               ARRAY_SIZE(da9052_subdev_info), NULL, 0, NULL);
>
> ,then the da9052 regulator can probe succesfully:
>
> ls /sys/class/regulator/
> regulator.0   regulator.11  regulator.14  regulator.2   regulator.5
> regulator.8
> regulator.1   regulator.12  regulator.15  regulator.3   regulator.6
> regulator.9
> regulator.10  regulator.13  regulator.16  regulator.4   regulator.7
>
> ,except for this one:
>
> [    0.157574] da9052-regulator da9052-regulator.14: invalid regulator
> ID specified
> [    0.157713] da9052-regulator: probe of da9052-regulator.14 failed
> with error -2

Ok, if I do the same fix as in commit b668422872 ("mfd: viperboard:
Fix platform-device id collision)

--- a/drivers/mfd/da9052-core.c
+++ b/drivers/mfd/da9052-core.c
@@ -554,7 +554,7 @@ 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,

Then I don't get any more da9052 warnings.

Will submit a patch shortly.

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

end of thread, other threads:[~2014-12-10  1:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-09 20:41 da9052-regulator fails to probe in linux-next Fabio Estevam
2014-12-09 21:17 ` Fabio Estevam
2014-12-09 21:27   ` Mark Brown
2014-12-09 21:34     ` Fabio Estevam
2014-12-09 21:37       ` Mark Brown
2014-12-09 21:40         ` Fabio Estevam
2014-12-09 21:47           ` Mark Brown
2014-12-10  1:07             ` Fabio Estevam
2014-12-10  1:19               ` Fabio Estevam
2014-12-09 21:44       ` Fabio Estevam
2014-12-09 21:28 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®