lkml.org 
[lkml]   [2016]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRegulator probe
From
Date
Hi!

I have found an issue which I have no idea how to solve properly.
Let's look at the details.

The platform I'm working on (Intel Edison) has the following devices:

Pin control (registered in platform code)
GPIO (PCI device)
SDHCI (PCI device)
WiFi card (SDIO connected to SDHCI)
Regulator for WiFi card (registered in platform code, enumerated via SFI
notifier)

In the kernel configuration
CONFIG_PINCTRL_MERRIFIELD=y
CONFIG_GPIO_MERRIFIELD=y
CONFIG_SDHCI_PCI=y
CONFIG_REGULATOR=y

(All intermediate dependencies also built-in)

Platform has setting
regulator_has_full_constraints();

During the boot I got the following:

#1

[    0.286099] calling  intel_mid_platform_init+0x0/0x36 @ 1
[    0.290348] Using generic wifi platform data
[    0.291055] initcall intel_mid_platform_init+0x0/0x36 returned 0
after 3906 usecs
[    0.291411] calling  mrfld_pinctrl_init+0x0/0x21 @ 1
[    0.292556] initcall mrfld_pinctrl_init+0x0/0x21 returned 0 after 976
usecs

Regulator for WiFi and pin control are registered.


#2

[    0.555321] calling  mrfld_pinctrl_init+0x0/0x14 @ 1
[    0.563920] initcall mrfld_pinctrl_init+0x0/0x14 returned 0 after
7812 usecs

Pin control is initialized.


#3

[    0.572562] calling  regulator_fixed_voltage_init+0x0/0x14 @ 1
[    0.
573366] bcm43xx-vmmc-regulator: Failed to request enable GPIO96: -517
[  
  0.573708] reg-fixed-voltage reg-fixed-voltage.0.auto: Failed to
register regulator: -517
[    0.574376] initcall
regulator_fixed_voltage_init+0x0/0x14 returned 0 after 1953 usecs

Obviously GPIO device isn't probed yet.


#4

[   12.322718] calling  mrfld_gpio_driver_init+0x0/0x1b @ 1
[   12.349569] initcall mrfld_gpio_driver_init+0x0/0x1b returned 0 after
11716 usecs

GPIO driver is initialized.


# 5

[   20.843973] calling  sdhci_drv_init+0x0/0x20 @ 1
[   20.843976] sdhci: Secure Digital Host Controller Interface driver
[   20.843978] sdhci: Copyright(c) Pierre Ossman
[   20.843989] initcall sdhci_drv_init+0x0/0x20 returned 0 after 5 usecs
[   20.843999] calling  sdhci_driver_init+0x0/0x1b @ 1

[   20.881460] sdhci-pci 0000:00:01.3: SDHCI controller found
[8086:1190] (rev 1)
[   20.881471] sdhci-pci 0000:00:01.3: found 1 slot(s)
[   20.888242] sdhci-pci 0000:00:01.3: No vmmc regulator found

^^^^^ PROBLEM!

Regulator is present, though it's in a waiting list.

[   20.888272] sdhci-pci 0000:00:01.3: No vqmmc regulator found


#6

[   21.520126] calling  deferred_probe_initcall+0x0/0x70 @ 1
[   21.521460] bcm43xx-vmmc-regulator: at 2000 mV
[   21.524831] reg-fixed-voltage reg-fixed-voltage.0.auto: bcm43xx-vmmc-
regulator supplying 2000000uV
[   21.524902] initcall deferred_probe_initcall+0x0/0x70 returned 0
after 4646 usecs

^^^^^ Too late

[   27.479039] calling  regulator_init_complete+0x0/0x30 @ 1
[   27.479048] bcm43xx-vmmc-regulator: disabling


So, my understanding that in _regulator_get() we have to try probe
deferred regulators once again. But I have no idea how to fix this
properly.

P.S. Of course everything works in case of CONFIG_SDHCI=m, but it's
looks like not a (proper?) solution.

--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.072 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site