diff --git a/include/drivers/gpio/gpio_mmio32.h b/include/drivers/gpio/gpio_mmio32.h index 2a5a6d8f62c..9135c27a093 100644 --- a/include/drivers/gpio/gpio_mmio32.h +++ b/include/drivers/gpio/gpio_mmio32.h @@ -12,6 +12,8 @@ #include struct gpio_mmio32_config { + /* gpio_driver_config needs to be first */ + struct gpio_driver_config common; volatile u32_t *reg; u32_t mask; }; @@ -44,7 +46,10 @@ int gpio_mmio32_init(struct device *dev); static struct gpio_mmio32_context _dev_name##_dev_data; \ \ static const struct gpio_mmio32_config _dev_name##_dev_cfg = { \ - .reg = (volatile u32_t *)_address, \ + .common = { \ + .port_pin_mask = _mask, \ + }, \ + .reg = (volatile u32_t *)_address, \ .mask = _mask, \ }; \ \