init: Implement fine-grained initialization policy
Put initialization priorities as device driver Kconfig parameter. Initialization priority value for each platform is defined in the platform Kconfig file. Drivers and platform code use SYS_DEFINE_DEVICE to add and initialization function. Change-Id: I2f4f3c7370dac02408a1b50a0a1bade8b427a282 Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com> Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
fb6de2d486
commit
57f2741e4f
66 changed files with 447 additions and 115 deletions
|
@ -625,7 +625,8 @@ DECLARE_DEVICE_INIT_CONFIG(gpio_pcal9535a_0,
|
|||
gpio_pcal9535a_init, &gpio_pcal9535a_0_cfg);
|
||||
|
||||
/* This has to init after I2C master */
|
||||
nano_early_init(gpio_pcal9535a_0, &gpio_pcal9535a_0_drvdata);
|
||||
SYS_DEFINE_DEVICE(gpio_pcal9535a_0, &gpio_pcal9535a_0_drvdata, SECONDARY,
|
||||
CONFIG_GPIO_PCAL9535A_INIT_PRIORITY);
|
||||
|
||||
#endif /* CONFIG_GPIO_PCAL9535A_0 */
|
||||
|
||||
|
@ -653,7 +654,8 @@ DECLARE_DEVICE_INIT_CONFIG(gpio_pcal9535a_1,
|
|||
gpio_pcal9535a_init, &gpio_pcal9535a_1_cfg);
|
||||
|
||||
/* This has to init after I2C master */
|
||||
nano_early_init(gpio_pcal9535a_1, &gpio_pcal9535a_1_drvdata);
|
||||
SYS_DEFINE_DEVICE(gpio_pcal9535a_1, &gpio_pcal9535a_1_drvdata, SECONDARY,
|
||||
CONFIG_GPIO_PCAL9535A_INIT_PRIORITY);
|
||||
|
||||
#endif /* CONFIG_GPIO_PCAL9535A_1 */
|
||||
|
||||
|
@ -681,7 +683,8 @@ DECLARE_DEVICE_INIT_CONFIG(gpio_pcal9535a_2,
|
|||
gpio_pcal9535a_init, &gpio_pcal9535a_2_cfg);
|
||||
|
||||
/* This has to init after I2C master */
|
||||
nano_early_init(gpio_pcal9535a_2, &gpio_pcal9535a_2_drvdata);
|
||||
SYS_DEFINE_DEVICE(gpio_pcal9535a_2, &gpio_pcal9535a_2_drvdata, SECONDARY,
|
||||
CONFIG_GPIO_PCAL9535A_INIT_PRIORITY);
|
||||
|
||||
#endif /* CONFIG_GPIO_PCAL9535A_2 */
|
||||
|
||||
|
@ -709,6 +712,7 @@ DECLARE_DEVICE_INIT_CONFIG(gpio_pcal9535a_3,
|
|||
gpio_pcal9535a_init, &gpio_pcal9535a_3_cfg);
|
||||
|
||||
/* This has to init after I2C master */
|
||||
nano_early_init(gpio_pcal9535a_3, &gpio_pcal9535a_3_drvdata);
|
||||
SYS_DEFINE_DEVICE(gpio_pcal9535a_3, &gpio_pcal9535a_3_drvdata, SECONDARY,
|
||||
CONFIG_GPIO_PCAL9535A_INIT_PRIORITY);
|
||||
|
||||
#endif /* CONFIG_GPIO_PCAL9535A_3 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue