* [PATCH] pinctrl: iproc: Fix iProc and NSP GPIO support
@ 2016-10-18 1:41 Ray Jui
2016-10-21 12:26 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Ray Jui @ 2016-10-18 1:41 UTC (permalink / raw)
To: Linus Walleij, Alexandre Courbot
Cc: linux-gpio, bcm-kernel-feedback-list, Ray Jui
Since commit 44a7185c2ae6 ("of/platform: Add common method to populate
default bus"), ARM64 platform devices are populated at the
arch_initcall_sync level; as a result, the platform_driver_probe calls
in both the iProc and NSP GPIO drivers fail with -ENODEV since by that
time the platform device was not yet registered.
Replace platform_driver_probe with platform_driver_register, that allow
the device to be register later
Signed-off-by: Ray Jui <ray.jui@broadcom.com>
---
drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 2 +-
drivers/pinctrl/bcm/pinctrl-nsp-gpio.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
index 7f77007..5d1e505c3 100644
--- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
+++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
@@ -844,6 +844,6 @@ static struct platform_driver iproc_gpio_driver = {
static int __init iproc_gpio_init(void)
{
- return platform_driver_probe(&iproc_gpio_driver, iproc_gpio_probe);
+ return platform_driver_register(&iproc_gpio_driver);
}
arch_initcall_sync(iproc_gpio_init);
diff --git a/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c b/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c
index 35783db..c8deb8b 100644
--- a/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c
+++ b/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c
@@ -741,6 +741,6 @@ static struct platform_driver nsp_gpio_driver = {
static int __init nsp_gpio_init(void)
{
- return platform_driver_probe(&nsp_gpio_driver, nsp_gpio_probe);
+ return platform_driver_register(&nsp_gpio_driver);
}
arch_initcall_sync(nsp_gpio_init);
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pinctrl: iproc: Fix iProc and NSP GPIO support
2016-10-18 1:41 [PATCH] pinctrl: iproc: Fix iProc and NSP GPIO support Ray Jui
@ 2016-10-21 12:26 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2016-10-21 12:26 UTC (permalink / raw)
To: Ray Jui
Cc: Alexandre Courbot, linux-gpio@vger.kernel.org,
bcm-kernel-feedback-list
On Tue, Oct 18, 2016 at 3:41 AM, Ray Jui <ray.jui@broadcom.com> wrote:
> Since commit 44a7185c2ae6 ("of/platform: Add common method to populate
> default bus"), ARM64 platform devices are populated at the
> arch_initcall_sync level; as a result, the platform_driver_probe calls
> in both the iProc and NSP GPIO drivers fail with -ENODEV since by that
> time the platform device was not yet registered.
>
> Replace platform_driver_probe with platform_driver_register, that allow
> the device to be register later
>
> Signed-off-by: Ray Jui <ray.jui@broadcom.com>
Patch applied for fixes.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-21 12:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18 1:41 [PATCH] pinctrl: iproc: Fix iProc and NSP GPIO support Ray Jui
2016-10-21 12:26 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).