Skip to content

Commit

Permalink
64bit
Browse files Browse the repository at this point in the history
  • Loading branch information
soburi committed Sep 14, 2024
1 parent b686e5b commit af1da91
Show file tree
Hide file tree
Showing 198 changed files with 421 additions and 398 deletions.
4 changes: 2 additions & 2 deletions boards/nordic/nrf9160dk/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static const struct switch_cfg routing_switches[] = {

#if USE_RESET_GPIO
static void chip_reset(const struct device *gpio,
struct gpio_callback *cb, uint32_t pins)
struct gpio_callback *cb, gpio_port_pins_t pins)
{
const uint32_t stamp = k_cycle_get_32();

Expand Down Expand Up @@ -136,7 +136,7 @@ static int reset_pin_configure(void)
return rc;
}

gpio_init_callback(&gpio_ctx, chip_reset, BIT(pin));
gpio_init_callback(&gpio_ctx, chip_reset, GPIO_BIT(pin));

rc = gpio_add_callback(gpio, &gpio_ctx);
if (rc) {
Expand Down
2 changes: 1 addition & 1 deletion doc/services/smf/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ Code::
return;
}

gpio_init_callback(&button_cb_data, button_pressed, BIT(button.pin));
gpio_init_callback(&button_cb_data, button_pressed, GPIO_BIT(button.pin));
gpio_add_callback(button.port, &button_cb_data);

/* Initialize the event */
Expand Down
4 changes: 2 additions & 2 deletions drivers/adc/adc_ads114s0x.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ struct ads114s0x_data {
};

static void ads114s0x_data_ready_handler(const struct device *dev, struct gpio_callback *gpio_cb,
uint32_t pins)
gpio_port_pins_t pins)
{
ARG_UNUSED(dev);
ARG_UNUSED(pins);
Expand Down Expand Up @@ -1386,7 +1386,7 @@ static int ads114s0x_init(const struct device *dev)
}

gpio_init_callback(&data->callback_data_ready, ads114s0x_data_ready_handler,
BIT(config->gpio_data_ready.pin));
GPIO_BIT(config->gpio_data_ready.pin));
result = gpio_add_callback(config->gpio_data_ready.port, &data->callback_data_ready);
if (result != 0) {
LOG_ERR("%s: failed to add data ready callback", dev->name);
Expand Down
4 changes: 2 additions & 2 deletions drivers/adc/adc_ads1x1x.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ static void ads1x1x_work_fn(struct k_work *work)

static void ads1x1x_conv_ready_cb(const struct device *gpio_dev,
struct gpio_callback *cb,
uint32_t pins)
gpio_port_pins_t pins)
{
struct ads1x1x_data *data;
const struct device *dev;
Expand Down Expand Up @@ -726,7 +726,7 @@ static int ads1x1x_init_interrupt(const struct device *dev)
return rc;
}
gpio_init_callback(&data->gpio_cb, ads1x1x_conv_ready_cb,
BIT(config->alert_rdy.pin));
GPIO_BIT(config->alert_rdy.pin));
rc = gpio_add_callback(config->alert_rdy.port, &data->gpio_cb);
if (rc) {
LOG_ERR("Could not set gpio callback.");
Expand Down
4 changes: 2 additions & 2 deletions drivers/adc/adc_lmp90xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ static void lmp90xxx_acquisition_thread(void *p1, void *p2, void *p3)
}

static void lmp90xxx_drdyb_callback(const struct device *port,
struct gpio_callback *cb, uint32_t pins)
struct gpio_callback *cb, gpio_port_pins_t pins)
{
struct lmp90xxx_data *data =
CONTAINER_OF(cb, struct lmp90xxx_data, drdyb_cb);
Expand Down Expand Up @@ -991,7 +991,7 @@ static int lmp90xxx_init(const struct device *dev)
}

gpio_init_callback(&data->drdyb_cb, lmp90xxx_drdyb_callback,
BIT(config->drdyb.pin));
GPIO_BIT(config->drdyb.pin));

err = gpio_add_callback(config->drdyb.port, &data->drdyb_cb);
if (err) {
Expand Down
4 changes: 2 additions & 2 deletions drivers/adc/adc_max1125x.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ struct max1125x_data {
};

static void max1125x_data_ready_handler(const struct device *dev, struct gpio_callback *gpio_cb,
uint32_t pins)
gpio_port_pins_t pins)
{
ARG_UNUSED(dev);
ARG_UNUSED(pins);
Expand Down Expand Up @@ -747,7 +747,7 @@ static int max1125x_init(const struct device *dev)
}

gpio_init_callback(&data->callback_data_ready, max1125x_data_ready_handler,
BIT(config->drdy_gpio.pin));
GPIO_BIT(config->drdy_gpio.pin));
err = gpio_add_callback(config->drdy_gpio.port, &data->callback_data_ready);
if (err != 0) {
LOG_ERR("failed to add data ready callback (err %d)", err);
Expand Down
2 changes: 1 addition & 1 deletion drivers/auxdisplay/auxdisplay_itron.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static int auxdisplay_itron_init(const struct device *dev)

gpio_init_callback(&data->busy_wait_callback,
auxdisplay_itron_busy_gpio_change_callback,
BIT(config->busy_gpio.pin));
GPIO_BIT(config->busy_gpio.pin));
rc = gpio_add_callback(config->busy_gpio.port, &data->busy_wait_callback);

if (rc != 0) {
Expand Down
8 changes: 4 additions & 4 deletions drivers/bluetooth/hci/apollox_blue.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static const struct device *clk32k_dev = DEVICE_DT_GET(CLK_32K_NODE);
#endif /* CONFIG_SOC_SERIES_APOLLO4X */

extern void bt_packet_irq_isr(const struct device *unused1, struct gpio_callback *unused2,
uint32_t unused3);
gpio_port_pins_t unused3);

void bt_apollo_rcv_isr_preprocess(void)
{
Expand Down Expand Up @@ -92,7 +92,7 @@ static bool clkreq_pin_state(void)
}

static void bt_clkreq_isr(const struct device *unused1, struct gpio_callback *unused2,
uint32_t unused3)
gpio_port_pins_t unused3)
{
if (clkreq_pin_state()) {
/* Enable XO32MHz */
Expand Down Expand Up @@ -271,7 +271,7 @@ int bt_hci_transport_setup(const struct device *dev)
return ret;
}

gpio_init_callback(&irq_gpio_cb, bt_packet_irq_isr, BIT(irq_gpio.pin));
gpio_init_callback(&irq_gpio_cb, bt_packet_irq_isr, GPIO_BIT(irq_gpio.pin));
ret = gpio_add_callback(irq_gpio.port, &irq_gpio_cb);
if (ret) {
return ret;
Expand All @@ -283,7 +283,7 @@ int bt_hci_transport_setup(const struct device *dev)
return ret;
}

gpio_init_callback(&clkreq_gpio_cb, bt_clkreq_isr, BIT(clkreq_gpio.pin));
gpio_init_callback(&clkreq_gpio_cb, bt_clkreq_isr, GPIO_BIT(clkreq_gpio.pin));
ret = gpio_add_callback(clkreq_gpio.port, &clkreq_gpio_cb);
if (ret) {
return ret;
Expand Down
4 changes: 2 additions & 2 deletions drivers/bluetooth/hci/hci_spi_st.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ static inline uint16_t bt_spi_get_evt(uint8_t *msg)

static void bt_spi_isr(const struct device *unused1,
struct gpio_callback *unused2,
uint32_t unused3)
gpio_port_pins_t unused3)
{
LOG_DBG("");

Expand Down Expand Up @@ -656,7 +656,7 @@ static int bt_spi_open(const struct device *dev, bt_hci_recv_t recv)
return err;
}

gpio_init_callback(&gpio_cb, bt_spi_isr, BIT(irq_gpio.pin));
gpio_init_callback(&gpio_cb, bt_spi_isr, GPIO_BIT(irq_gpio.pin));
err = gpio_add_callback(irq_gpio.port, &gpio_cb);
if (err) {
return err;
Expand Down
4 changes: 2 additions & 2 deletions drivers/bluetooth/hci/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static inline uint16_t bt_spi_get_evt(uint8_t *msg)

static void bt_spi_isr(const struct device *unused1,
struct gpio_callback *unused2,
uint32_t unused3)
gpio_port_pins_t unused3)
{
LOG_DBG("");

Expand Down Expand Up @@ -389,7 +389,7 @@ static int bt_spi_open(const struct device *dev, bt_hci_recv_t recv)
return err;
}

gpio_init_callback(&gpio_cb, bt_spi_isr, BIT(irq_gpio.pin));
gpio_init_callback(&gpio_cb, bt_spi_isr, GPIO_BIT(irq_gpio.pin));
err = gpio_add_callback(irq_gpio.port, &gpio_cb);
if (err) {
return err;
Expand Down
4 changes: 2 additions & 2 deletions drivers/can/can_mcp2515.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ static void mcp2515_int_thread(void *p1, void *p2, void *p3)
}

static void mcp2515_int_gpio_callback(const struct device *dev,
struct gpio_callback *cb, uint32_t pins)
struct gpio_callback *cb, gpio_port_pins_t pins)
{
struct mcp2515_data *dev_data =
CONTAINER_OF(cb, struct mcp2515_data, int_gpio_cb);
Expand Down Expand Up @@ -949,7 +949,7 @@ static int mcp2515_init(const struct device *dev)
}

gpio_init_callback(&(dev_data->int_gpio_cb), mcp2515_int_gpio_callback,
BIT(dev_cfg->int_gpio.pin));
GPIO_BIT(dev_cfg->int_gpio.pin));

if (gpio_add_callback(dev_cfg->int_gpio.port,
&(dev_data->int_gpio_cb))) {
Expand Down
4 changes: 2 additions & 2 deletions drivers/can/can_mcp251xfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ static void mcp251xfd_int_thread(const struct device *dev)
}

static void mcp251xfd_int_gpio_callback(const struct device *dev_gpio, struct gpio_callback *cb,
uint32_t pins)
gpio_port_pins_t pins)
{
ARG_UNUSED(dev_gpio);
struct mcp251xfd_data *dev_data = CONTAINER_OF(cb, struct mcp251xfd_data, int_gpio_cb);
Expand Down Expand Up @@ -1553,7 +1553,7 @@ static int mcp251xfd_init(const struct device *dev)
}

gpio_init_callback(&dev_data->int_gpio_cb, mcp251xfd_int_gpio_callback,
BIT(dev_cfg->int_gpio_dt.pin));
GPIO_BIT(dev_cfg->int_gpio_dt.pin));

if (gpio_add_callback_dt(&dev_cfg->int_gpio_dt, &dev_data->int_gpio_cb) < 0) {
return -EINVAL;
Expand Down
2 changes: 1 addition & 1 deletion drivers/can/can_tcan4x5x.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ static int tcan4x5x_init(const struct device *dev)
}

gpio_init_callback(&tcan_data->int_gpio_cb, tcan4x5x_int_gpio_callback_handler,
BIT(tcan_config->int_gpio.pin));
GPIO_BIT(tcan_config->int_gpio.pin));

err = gpio_add_callback_dt(&tcan_config->int_gpio, &tcan_data->int_gpio_cb);
if (err != 0) {
Expand Down
4 changes: 2 additions & 2 deletions drivers/charger/charger_max20335.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ static int max20335_enable_interrupt_pin(const struct device *dev, bool enabled)
}

static void max20335_gpio_callback(const struct device *dev, struct gpio_callback *cb,
uint32_t pins)
gpio_port_pins_t pins)
{
struct charger_max20335_data *data = CONTAINER_OF(cb, struct charger_max20335_data,
gpio_cb);
Expand Down Expand Up @@ -597,7 +597,7 @@ static int max20335_configure_interrupt_pin(const struct device *dev)
return ret;
}

gpio_init_callback(&data->gpio_cb, max20335_gpio_callback, BIT(config->int_gpio.pin));
gpio_init_callback(&data->gpio_cb, max20335_gpio_callback, GPIO_BIT(config->int_gpio.pin));
ret = gpio_add_callback_dt(&config->int_gpio, &data->gpio_cb);
if (ret < 0) {
LOG_ERR("Could not add interrupt GPIO callback");
Expand Down
4 changes: 2 additions & 2 deletions drivers/counter/maxim_ds3231.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ static void sync_worker(struct k_work *work)

static void isw_gpio_callback(const struct device *port,
struct gpio_callback *cb,
uint32_t pins)
gpio_port_pins_t pins)
{
struct ds3231_data *data = CONTAINER_OF(cb, struct ds3231_data,
isw_callback);
Expand Down Expand Up @@ -1155,7 +1155,7 @@ static int ds3231_init(const struct device *dev)
k_work_init(&data->sync_work, sync_worker);
gpio_init_callback(&data->isw_callback,
isw_gpio_callback,
BIT(cfg->isw_gpios.pin));
GPIO_BIT(cfg->isw_gpios.pin));

rc = gpio_pin_configure_dt(&cfg->isw_gpios, GPIO_INPUT);
if (rc >= 0) {
Expand Down
4 changes: 2 additions & 2 deletions drivers/counter/rtc_mcp7940n.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ static void mcp7940n_work_handler(struct k_work *work)
}

static void mcp7940n_init_cb(const struct device *dev,
struct gpio_callback *gpio_cb, uint32_t pins)
struct gpio_callback *gpio_cb, gpio_port_pins_t pins)
{
struct mcp7940n_data *data =
CONTAINER_OF(gpio_cb, struct mcp7940n_data, int_callback);
Expand Down Expand Up @@ -705,7 +705,7 @@ static int mcp7940n_init(const struct device *dev)
GPIO_INT_EDGE_TO_ACTIVE);

gpio_init_callback(&data->int_callback, mcp7940n_init_cb,
BIT(cfg->int_gpios.pin));
GPIO_BIT(cfg->int_gpios.pin));

gpio_add_callback(cfg->int_gpios.port, &data->int_callback);

Expand Down
2 changes: 1 addition & 1 deletion drivers/disk/sdmmc_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ static void stm32_sdmmc_cd_handler(struct k_work *item)

static void stm32_sdmmc_cd_callback(const struct device *gpiodev,
struct gpio_callback *cb,
uint32_t pin)
gpio_port_pins_t pin)
{
struct stm32_sdmmc_priv *priv = CONTAINER_OF(cb,
struct stm32_sdmmc_priv,
Expand Down
4 changes: 2 additions & 2 deletions drivers/display/display_rm67162.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ struct rm67162_data {
};

static void rm67162_te_isr_handler(const struct device *gpio_dev,
struct gpio_callback *cb, uint32_t pins)
struct gpio_callback *cb, gpio_port_pins_t pins)
{
struct rm67162_data *data = CONTAINER_OF(cb, struct rm67162_data, te_gpio_cb);

Expand Down Expand Up @@ -333,7 +333,7 @@ static int rm67162_init(const struct device *dev)

/* Init and install GPIO callback */
gpio_init_callback(&data->te_gpio_cb, rm67162_te_isr_handler,
BIT(config->te_gpio.pin));
GPIO_BIT(config->te_gpio.pin));
gpio_add_callback(config->te_gpio.port, &data->te_gpio_cb);

/* Setup te pin semaphore */
Expand Down
4 changes: 2 additions & 2 deletions drivers/espi/espi_it8xxx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,7 @@ static void espi_it8xxx2_trans_isr(const struct device *dev)
}

void espi_it8xxx2_espi_reset_isr(const struct device *port,
struct gpio_callback *cb, uint32_t pins)
struct gpio_callback *cb, gpio_port_pins_t pins)
{
struct espi_it8xxx2_data *const data = ESPI_IT8XXX2_SOC_DEV->data;
struct espi_event evt = {ESPI_BUS_RESET, 0, 0};
Expand Down Expand Up @@ -1838,7 +1838,7 @@ static void espi_it8xxx2_enable_reset(void)
(IT8XXX2_GPIO_GCR_ESPI_RST_D2 << IT8XXX2_GPIO_GCR_ESPI_RST_POS);
/* enable eSPI reset isr */
gpio_init_callback(&espi_reset_cb, espi_it8xxx2_espi_reset_isr,
BIT(ESPI_IT8XXX2_ESPI_RESET_PIN));
GPIO_BIT(ESPI_IT8XXX2_ESPI_RESET_PIN));
gpio_add_callback(ESPI_IT8XXX2_ESPI_RESET_PORT, &espi_reset_cb);
gpio_pin_interrupt_configure(ESPI_IT8XXX2_ESPI_RESET_PORT,
ESPI_IT8XXX2_ESPI_RESET_PIN,
Expand Down
4 changes: 2 additions & 2 deletions drivers/ethernet/eth_adin2111.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ static void adin2111_offload_thread(void *p1, void *p2, void *p3)

static void adin2111_int_callback(const struct device *dev,
struct gpio_callback *cb,
uint32_t pins)
gpio_port_pins_t pins)
{
ARG_UNUSED(dev);
ARG_UNUSED(pins);
Expand Down Expand Up @@ -1404,7 +1404,7 @@ static int adin2111_init(const struct device *dev)

gpio_init_callback(&(ctx->gpio_int_callback),
adin2111_int_callback,
BIT(cfg->interrupt.pin));
GPIO_BIT(cfg->interrupt.pin));

ret = gpio_add_callback(cfg->interrupt.port, &ctx->gpio_int_callback);
if (ret < 0) {
Expand Down
4 changes: 2 additions & 2 deletions drivers/ethernet/eth_enc28j60.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ static void eth_enc28j60_read_phy(const struct device *dev,

static void eth_enc28j60_gpio_callback(const struct device *dev,
struct gpio_callback *cb,
uint32_t pins)
gpio_port_pins_t pins)
{
struct eth_enc28j60_runtime *context =
CONTAINER_OF(cb, struct eth_enc28j60_runtime, gpio_cb);
Expand Down Expand Up @@ -785,7 +785,7 @@ static int eth_enc28j60_init(const struct device *dev)
}

gpio_init_callback(&(context->gpio_cb), eth_enc28j60_gpio_callback,
BIT(config->interrupt.pin));
GPIO_BIT(config->interrupt.pin));

if (gpio_add_callback(config->interrupt.port, &(context->gpio_cb))) {
return -EINVAL;
Expand Down
4 changes: 2 additions & 2 deletions drivers/ethernet/eth_enc424j600.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static void enc424j600_read_mem(const struct device *dev, uint8_t opcode,

static void enc424j600_gpio_callback(const struct device *dev,
struct gpio_callback *cb,
uint32_t pins)
gpio_port_pins_t pins)
{
struct enc424j600_runtime *context =
CONTAINER_OF(cb, struct enc424j600_runtime, gpio_cb);
Expand Down Expand Up @@ -678,7 +678,7 @@ static int enc424j600_init(const struct device *dev)
}

gpio_init_callback(&(context->gpio_cb), enc424j600_gpio_callback,
BIT(config->interrupt.pin));
GPIO_BIT(config->interrupt.pin));

if (gpio_add_callback(config->interrupt.port, &(context->gpio_cb))) {
return -EINVAL;
Expand Down
4 changes: 2 additions & 2 deletions drivers/ethernet/eth_lan865x.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ static int lan865x_default_config(const struct device *dev, uint8_t silicon_rev)

static void lan865x_int_callback(const struct device *dev,
struct gpio_callback *cb,
uint32_t pins)
gpio_port_pins_t pins)
{
ARG_UNUSED(dev);
ARG_UNUSED(pins);
Expand Down Expand Up @@ -513,7 +513,7 @@ static int lan865x_init(const struct device *dev)
}

gpio_init_callback(&(ctx->gpio_int_callback), lan865x_int_callback,
BIT(cfg->interrupt.pin));
GPIO_BIT(cfg->interrupt.pin));

ret = gpio_add_callback(cfg->interrupt.port, &ctx->gpio_int_callback);
if (ret < 0) {
Expand Down
Loading

0 comments on commit af1da91

Please sign in to comment.