drivers: gpio: set all on-chip gpios to PRE_KERNEL_1/2 init

PRE_KERNEL_1 is to be used for devices that have no dependencies
and do not use kernel features, such as those that rely solely on
hardware present in the processor/SOC. This commit updates these
gpios to initialize during the PRE_KERNEL_1 rather than the
POST_KERNEL. Some SoC drivers are moved to PRE_KERNEL_2 due
to dependencies.

A lot of 'other' drivers can depend on GPIOs though phandles
(such as reset lines, data or command gpios, etc...). Most of these
drivers that would need this would come up on the POST_KERNEL,
and it's likely the driver may not be up yet as it should be defined.

Signed-off-by: Ryan McClelland <ryanmcclelland@fb.com>
This commit is contained in:
Ryan McClelland 2021-12-04 13:00:59 -08:00 committed by Christopher Friedt
commit ecf99abc17
22 changed files with 35 additions and 35 deletions

View file

@ -324,7 +324,7 @@ int gpio_sam_init(const struct device *dev)
\
DEVICE_DT_INST_DEFINE(n, gpio_sam_init, NULL, \
&port_##n##_sam_runtime, \
&port_##n##_sam_config, POST_KERNEL, \
&port_##n##_sam_config, PRE_KERNEL_1, \
CONFIG_GPIO_INIT_PRIORITY, \
&gpio_sam_api); \
\