Skip to content

Commit 4e5bd20

Browse files
XenuIsWatchingMaureenHelm
authored andcommitted
drivers: gpio: revert kconfig init priority for off-chip gpios
In #40140, all on-chip gpios where made to use `CONFIG_GPIO_INIT_PRIORITY`. The lmp90xxx and sx1509b are off-chip gpios. This commit reverts those changes for these two devices. Signed-off-by: Ryan McClelland <[email protected]>
1 parent 18647f5 commit 4e5bd20

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

drivers/gpio/Kconfig.lmp90xxx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright (c) 2019 Vestas Wind Systems A/S
44
# SPDX-License-Identifier: Apache-2.0
55

6-
config GPIO_LMP90XXX
6+
menuconfig GPIO_LMP90XXX
77
bool "LMP90xxx GPIO driver"
88
depends on ADC_LMP90XXX_GPIO
99
help
@@ -14,3 +14,11 @@ config GPIO_LMP90XXX
1414

1515
The GPIO port of the LMP90xxx (D6 to D0) is exposed as a
1616
GPIO controller driver with read/write support.
17+
18+
config GPIO_LMP90XXX_INIT_PRIORITY
19+
int "Driver init priority"
20+
default 99
21+
depends on GPIO_LMP90XXX
22+
help
23+
Device driver initialization priority. This driver must be
24+
initialized after the LMP90xxx ADC driver.

drivers/gpio/Kconfig.sx1509b

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ menuconfig GPIO_SX1509B
1515

1616
if GPIO_SX1509B
1717

18+
config GPIO_SX1509B_INIT_PRIORITY
19+
int "Init priority"
20+
default 70
21+
help
22+
Device driver initialization priority.
23+
1824
config GPIO_SX1509B_INTERRUPT
1925
bool "Interrupt enable"
2026
default n

drivers/gpio/gpio_lmp90xxx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static const struct gpio_driver_api gpio_lmp90xxx_api = {
158158
.port_get_raw = gpio_lmp90xxx_port_get_raw,
159159
};
160160

161-
BUILD_ASSERT(CONFIG_GPIO_INIT_PRIORITY >
161+
BUILD_ASSERT(CONFIG_GPIO_LMP90XXX_INIT_PRIORITY >
162162
CONFIG_ADC_INIT_PRIORITY,
163163
"LMP90xxx GPIO driver must be initialized after LMP90xxx ADC "
164164
"driver");
@@ -179,7 +179,7 @@ BUILD_ASSERT(CONFIG_GPIO_INIT_PRIORITY >
179179
NULL, \
180180
&gpio_lmp90xxx_##id##_data, \
181181
&gpio_lmp90xxx_##id##_cfg, POST_KERNEL, \
182-
CONFIG_GPIO_INIT_PRIORITY, \
182+
CONFIG_GPIO_LMP90XXX_INIT_PRIORITY, \
183183
&gpio_lmp90xxx_api);
184184

185185
DT_INST_FOREACH_STATUS_OKAY(GPIO_LMP90XXX_DEVICE)

drivers/gpio/gpio_sx1509b.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,5 +786,5 @@ static struct sx1509b_drv_data sx1509b_drvdata = {
786786

787787
DEVICE_DT_INST_DEFINE(0, sx1509b_init, NULL,
788788
&sx1509b_drvdata, &sx1509b_cfg,
789-
POST_KERNEL, CONFIG_GPIO_INIT_PRIORITY,
789+
POST_KERNEL, CONFIG_GPIO_SX1509B_INIT_PRIORITY,
790790
&api_table);

0 commit comments

Comments
 (0)