Skip to content

Commit 6d178f9

Browse files
pdgendtfabiobaltieri
authored andcommitted
drivers: gpio: Place API into iterable section
Add wrapper DEVICE_API macro to all gpio_driver_api instances. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent 548958d commit 6d178f9

File tree

94 files changed

+97
-97
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+97
-97
lines changed

drivers/gpio/gpio_ad559x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ static int gpio_ad559x_pin_interrupt_configure(const struct device *dev,
196196
return -ENOTSUP;
197197
}
198198

199-
static const struct gpio_driver_api gpio_ad559x_api = {
199+
static DEVICE_API(gpio, gpio_ad559x_api) = {
200200
.pin_configure = gpio_ad559x_configure,
201201
.port_get_raw = gpio_ad559x_port_get_raw,
202202
.port_set_masked_raw = gpio_ad559x_port_set_masked_raw,

drivers/gpio/gpio_adp5585.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ static int gpio_adp5585_init(const struct device *dev)
441441
return ret;
442442
}
443443

444-
static const struct gpio_driver_api api_table = {
444+
static DEVICE_API(gpio, api_table) = {
445445
.pin_configure = gpio_adp5585_config,
446446
.port_get_raw = gpio_adp5585_port_read,
447447
.port_set_masked_raw = gpio_adp5585_port_set_masked,

drivers/gpio/gpio_ads114s0x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static int gpio_ads114s0x_init(const struct device *dev)
118118
return 0;
119119
}
120120

121-
static const struct gpio_driver_api gpio_ads114s0x_api = {
121+
static DEVICE_API(gpio, gpio_ads114s0x_api) = {
122122
.pin_configure = gpio_ads114s0x_config,
123123
.port_set_masked_raw = gpio_ads114s0x_port_set_masked_raw,
124124
.port_set_bits_raw = gpio_ads114s0x_port_set_bits_raw,

drivers/gpio/gpio_altera_pio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ static void gpio_altera_irq_handler(const struct device *dev)
278278
gpio_fire_callbacks(&data->cb, dev, port_value);
279279
}
280280

281-
static const struct gpio_driver_api gpio_altera_driver_api = {
281+
static DEVICE_API(gpio, gpio_altera_driver_api) = {
282282
.pin_configure = gpio_altera_configure,
283283
.port_get_raw = gpio_altera_port_get_raw,
284284
.port_set_masked_raw = NULL,

drivers/gpio/gpio_ambiq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ static int ambiq_gpio_init(const struct device *port)
550550
return 0;
551551
}
552552

553-
static const struct gpio_driver_api ambiq_gpio_drv_api = {
553+
static DEVICE_API(gpio, ambiq_gpio_drv_api) = {
554554
.pin_configure = ambiq_gpio_pin_configure,
555555
#ifdef CONFIG_GPIO_GET_CONFIG
556556
.pin_get_config = ambiq_gpio_get_config,

drivers/gpio/gpio_andes_atcgpio100.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ static void gpio_atcgpio100_irq_handler(const struct device *port)
319319

320320
}
321321

322-
static const struct gpio_driver_api gpio_atcgpio100_api = {
322+
static DEVICE_API(gpio, gpio_atcgpio100_api) = {
323323
.pin_configure = gpio_atcgpio100_config,
324324
.port_get_raw = gpio_atcgpio100_port_get_raw,
325325
.port_set_masked_raw = gpio_atcgpio100_set_masked_raw,

drivers/gpio/gpio_axp192.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static int gpio_axp192_manage_callback(const struct device *dev, struct gpio_cal
268268
return gpio_manage_callback(&data->cb_list_gpio, callback, set);
269269
}
270270

271-
static const struct gpio_driver_api gpio_axp192_api = {
271+
static DEVICE_API(gpio, gpio_axp192_api) = {
272272
.pin_configure = gpio_axp192_configure,
273273
.port_get_raw = gpio_axp192_port_get_raw,
274274
.port_set_masked_raw = gpio_axp192_port_set_masked_raw,

drivers/gpio/gpio_b91.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ static int gpio_b91_manage_callback(const struct device *dev,
467467
}
468468

469469
/* GPIO driver APIs structure */
470-
static const struct gpio_driver_api gpio_b91_driver_api = {
470+
static DEVICE_API(gpio, gpio_b91_driver_api) = {
471471
.pin_configure = gpio_b91_pin_configure,
472472
.port_get_raw = gpio_b91_port_get_raw,
473473
.port_set_masked_raw = gpio_b91_port_set_masked_raw,

drivers/gpio/gpio_bcm2711.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ int gpio_bcm2711_init(const struct device *port)
319319
return 0;
320320
}
321321

322-
static const struct gpio_driver_api gpio_bcm2711_api = {
322+
static DEVICE_API(gpio, gpio_bcm2711_api) = {
323323
.pin_configure = gpio_bcm2711_pin_configure,
324324
.port_get_raw = gpio_bcm2711_port_get_raw,
325325
.port_set_masked_raw = gpio_bcm2711_port_set_masked_raw,

drivers/gpio/gpio_bd8lb600fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static int bd8lb600fs_gpio_port_toggle_bits(const struct device *dev, uint32_t m
154154
return result;
155155
}
156156

157-
static const struct gpio_driver_api api_table = {
157+
static DEVICE_API(gpio, api_table) = {
158158
.pin_configure = bd8lb600fs_gpio_pin_configure,
159159
.port_get_raw = bd8lb600fs_gpio_port_get_raw,
160160
.port_set_masked_raw = bd8lb600fs_gpio_port_set_masked_raw,

0 commit comments

Comments
 (0)