ARM: davinci: da8xx: Add full regulator constraints for non-DT boot

The phy framework requests an optional "phy" regulator. If it does
not find one, it returns -EPROBE_DEFER. In the case of non-DT boot
for the omap138-lcdk board, this would prevent the usb11 phy to probe
correctly and ohci would not enumerate.

By calling regulator_has_full_constraints(), An error would be returned
instead of -EPROBE_DEFER for the regulator, and the probe of the phy driver
can continue normally without a regulator.

Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
[nsekhar@ti.com: minor commit message updates]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
This commit is contained in:
Axel Haslam 2016-10-26 21:41:55 +02:00 committed by Sekhar Nori
parent 0fcd54112a
commit 40a17abc8b
2 changed files with 6 additions and 0 deletions

View File

@ -28,6 +28,7 @@
#include <linux/platform_data/mtd-davinci-aemif.h> #include <linux/platform_data/mtd-davinci-aemif.h>
#include <linux/platform_data/spi-davinci.h> #include <linux/platform_data/spi-davinci.h>
#include <linux/platform_data/usb-davinci.h> #include <linux/platform_data/usb-davinci.h>
#include <linux/regulator/machine.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
@ -652,6 +653,8 @@ static __init void da830_evm_init(void)
ret = da8xx_register_spi_bus(0, ARRAY_SIZE(da830evm_spi_info)); ret = da8xx_register_spi_bus(0, ARRAY_SIZE(da830evm_spi_info));
if (ret) if (ret)
pr_warn("%s: spi 0 registration failed: %d\n", __func__, ret); pr_warn("%s: spi 0 registration failed: %d\n", __func__, ret);
regulator_has_full_constraints();
} }
#ifdef CONFIG_SERIAL_8250_CONSOLE #ifdef CONFIG_SERIAL_8250_CONSOLE

View File

@ -15,6 +15,7 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/mfd/da8xx-cfgchip.h> #include <linux/mfd/da8xx-cfgchip.h>
#include <linux/platform_data/gpio-davinci.h> #include <linux/platform_data/gpio-davinci.h>
#include <linux/regulator/machine.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
@ -322,6 +323,8 @@ static __init void omapl138_hawk_init(void)
if (ret) if (ret)
pr_warn("%s: dsp/rproc registration failed: %d\n", pr_warn("%s: dsp/rproc registration failed: %d\n",
__func__, ret); __func__, ret);
regulator_has_full_constraints();
} }
#ifdef CONFIG_SERIAL_8250_CONSOLE #ifdef CONFIG_SERIAL_8250_CONSOLE