Message ID | 20161024164634.4330-9-ahaslam@baylibre.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Monday 24 October 2016 10:16 PM, ahaslam@baylibre.com wrote: > From: Axel Haslam <ahaslam@baylibre.com> > > The phy framework requests an optional "phy" regulator. If it does > not find one, it returns -EPROBE_DEFER. In the case of non-DT based 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 nit: prefer regulator_has_full_constraints() > instead of DEFER for the "optional" regulator, and the probe of > the phy driver can continue normally without a regulator. > > Signed-off-by: Axel Haslam <ahaslam@baylibre.com> Looks good to me. Just drop the "hawk: from subject line since you also touch da830 evm. I am not sure what "ohci plat boot" means. How about the following: "ARM: davinci: da8xx: fix OHCI PHY probe for non-DT boot" Thanks, Sekhar
On Tue, Oct 25, 2016 at 12:28 PM, Sekhar Nori <nsekhar@ti.com> wrote: > On Monday 24 October 2016 10:16 PM, ahaslam@baylibre.com wrote: >> From: Axel Haslam <ahaslam@baylibre.com> >> >> The phy framework requests an optional "phy" regulator. If it does >> not find one, it returns -EPROBE_DEFER. In the case of non-DT based 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 > > nit: prefer regulator_has_full_constraints() > >> instead of DEFER for the "optional" regulator, and the probe of >> the phy driver can continue normally without a regulator. >> >> Signed-off-by: Axel Haslam <ahaslam@baylibre.com> > > Looks good to me. Just drop the "hawk: from subject line since you also > touch da830 evm. I am not sure what "ohci plat boot" means. How about > the following: > > "ARM: davinci: da8xx: fix OHCI PHY probe for non-DT boot" > Will do. Thanks Axel. > Thanks, > Sekhar
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index c62766e..b33fc6b 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c @@ -26,6 +26,7 @@ #include <linux/platform_data/mtd-davinci.h> #include <linux/platform_data/mtd-davinci-aemif.h> #include <linux/platform_data/spi-davinci.h> +#include <linux/regulator/machine.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -631,6 +632,8 @@ static __init void da830_evm_init(void) ret = da8xx_register_spi_bus(0, ARRAY_SIZE(da830evm_spi_info)); if (ret) pr_warn("%s: spi 0 registration failed: %d\n", __func__, ret); + + regulator_has_full_constraints(); } #ifdef CONFIG_SERIAL_8250_CONSOLE diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c index c5cb8d9..c3ab7ea 100644 --- a/arch/arm/mach-davinci/board-omapl138-hawk.c +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c @@ -14,6 +14,7 @@ #include <linux/console.h> #include <linux/gpio.h> #include <linux/platform_data/gpio-davinci.h> +#include <linux/regulator/machine.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -328,6 +329,8 @@ static __init void omapl138_hawk_init(void) if (ret) pr_warn("%s: dsp/rproc registration failed: %d\n", __func__, ret); + + regulator_has_full_constraints(); } #ifdef CONFIG_SERIAL_8250_CONSOLE