Re: [PATCH 2/3] PCI: brcmstb: Add regulator support
From: Gregory Fong <hidden>
Date: 2020-02-20 11:08:12
Also in:
linux-gpio, linux-pci
On Wed, Feb 12, 2020 at 7:58 PM Florian Fainelli [off-list ref] wrote:
On 2/12/2020 6:59 PM, Jaedon Shin wrote:quoted
ARM-based Broadcom STB SoCs have GPIO-based voltage regulator for PCIe turning off/on power supplies. Signed-off-by: Jaedon Shin <redacted> --- drivers/gpio/gpio-brcmstb.c | 13 ++++- drivers/pci/controller/pcie-brcmstb.c | 76 +++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 1 deletion(-)diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c index 05e3f99ae59c..0cee5fcd2782 100644 --- a/drivers/gpio/gpio-brcmstb.c +++ b/drivers/gpio/gpio-brcmstb.c@@ -777,7 +777,18 @@ static struct platform_driver brcmstb_gpio_driver = { .remove = brcmstb_gpio_remove, .shutdown = brcmstb_gpio_shutdown, }; -module_platform_driver(brcmstb_gpio_driver); + +static int __init brcmstb_gpio_init(void) +{ + return platform_driver_register(&brcmstb_gpio_driver); +} +subsys_initcall(brcmstb_gpio_init); + +static void __exit brcmstb_gpio_exit(void) +{ + platform_driver_unregister(&brcmstb_gpio_driver); +} +module_exit(brcmstb_gpio_exit);We do this in the downstream tree, but there is no reason, we should just deal with EPROBE_DEFER being returned from the regulator subsystem until the GPIO provide is available.
Agreed, also see this thread from January 2016: https://lore.kernel.org/linux-mips/568EAA99.1020603@gmail.com/ (local) Best regards, Gregory _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel