platform device initialization order

From: Enrico Weigelt, metux IT consult
Date: Wed Jan 16 2019 - 16:29:38 EST


Hi folks,


I'm currently writing a x86 board driver which makes use of a gpio
chip driver, gpio-leds and gpio-keyboard driver.

The init function fist initializes the gpio device, then the others,
via platform_device_register_resndata().

Here my problem starts: when the gpio driver is built as a module,
the order is mixed up - gpio driver is probed *after* the others
that need the gpio's. So, the gpio's aren't available yet, thus the
other drivers cant be initialized. If it's built-in, the order is
correct. A nasty timing problem.

Is there any way I can force the correct initialization order ?


thx
--mtx

--
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@xxxxxxxxx -- +49-151-27565287