linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* wdt, gpio: move arch_initcall into subsys_initcall ?
@ 2016-11-15 10:20 Heiko Schocher
  2016-11-15 11:10 ` Vladimir Zapolskiy
  0 siblings, 1 reply; 6+ messages in thread
From: Heiko Schocher @ 2016-11-15 10:20 UTC (permalink / raw)
  To: linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Vladimir Zapolskiy, Shawn Guo, Linus Walleij, Guenter Roeck,
	Wim Van Sebroeck, Jonas Mark (ST-FIR/ENG1)

Hello,

commit e188cbf7564f: "gpio: mxc: shift gpio_mxc_init() to subsys_initcall level"
moves the gpio initialization of the mxc gpio driver
from the arch_initcall level into subsys_initcall level.

This leads now on mxc boards, which use a gpio wdt driver
and the CONFIG_GPIO_WATCHDOG_ARCH_INITCALL option enabled,
to unwanted driver probe deferrals during kernel boot.

I see this currently on an imx6 based board (which has unfortunately
3 WDT: imx6 internal (disabled), gpio wdt and da9063 WDT ...).

Also a side effect from above commit is, that the da9063 WDT driver
is now probed before the gpio WDT driver ... so /dev/watchdog now
does not point to the gpio_wdt, instead it points to the da9063 WDT.

So there are 2 solutions possible:

- add a CONFIG_GPIO_MCX_ARCH_INITCALL option
   in drivers/gpio/gpio-mxc.c like for the gpio_wdt.c driver?

   But how can we guarantee, that first the gpio driver and then
   the gpio_wdt driver gets probed?

- move the arch_initcall in gpio_wdt.c into a subsys_initcall
   (Tested this, and the probe dereferral messages are gone ...)

   But this may results in problems on boards, which needs an early
   trigger on an gpio wdt ...

Other ideas?

Thanks for all suggestions!

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-11-17  9:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-15 10:20 wdt, gpio: move arch_initcall into subsys_initcall ? Heiko Schocher
2016-11-15 11:10 ` Vladimir Zapolskiy
2016-11-15 11:32   ` Vladimir Zapolskiy
     [not found]     ` <e4472c2d-effa-9583-aded-8dcdfdd57ee6-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2016-11-15 13:46       ` Guenter Roeck
2016-11-17  7:08         ` Heiko Schocher
2016-11-17  9:31           ` Vladimir Zapolskiy

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).