From 86c14e562a6dfd0ebb22dffb342d8991f9e5e74c Mon Sep 17 00:00:00 2001 From: TOKITA Hiroshi Date: Mon, 16 Sep 2024 10:50:03 +0900 Subject: [PATCH] gpio --- drivers/gpio/gpio_axp192.c | 2 +- drivers/gpio/gpio_dw.c | 12 ++++++------ drivers/gpio/gpio_fxl6408.c | 4 ++-- drivers/gpio/gpio_pca953x.c | 4 ++-- drivers/gpio/gpio_pca95xx.c | 4 ++-- drivers/gpio/gpio_pcf857x.c | 2 +- drivers/gpio/gpio_sx1509b.c | 2 +- drivers/gpio/gpio_tle9104.c | 6 +++--- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/gpio/gpio_axp192.c b/drivers/gpio/gpio_axp192.c index 2eb51fc889e220..3090bedb531367 100644 --- a/drivers/gpio/gpio_axp192.c +++ b/drivers/gpio/gpio_axp192.c @@ -144,7 +144,7 @@ static int gpio_axp192_port_toggle_bits(const struct device *dev, gpio_port_pins { struct gpio_axp192_data *data = dev->data; int ret; - uint32_t value; + gpio_port_value_t value; k_mutex_lock(&data->mutex, K_FOREVER); diff --git a/drivers/gpio/gpio_dw.c b/drivers/gpio/gpio_dw.c index eeba61b925588d..fb357d58297159 100644 --- a/drivers/gpio/gpio_dw.c +++ b/drivers/gpio/gpio_dw.c @@ -26,9 +26,9 @@ #include #endif -static int gpio_dw_port_set_bits_raw(const struct device *port, gpio_port_pin_t mask); +static int gpio_dw_port_set_bits_raw(const struct device *port, gpio_port_pins_t mask); static int gpio_dw_port_clear_bits_raw(const struct device *port, - gpio_port_pin_t mask); + gpio_port_pins_t mask); /* * ARC architecture configure IP through IO auxiliary registers. @@ -314,7 +314,7 @@ static int gpio_dw_port_get_raw(const struct device *port, gpio_port_value_t *va } static int gpio_dw_port_set_masked_raw(const struct device *port, - gpio_port_pin_t mask, gpio_port_value_t value) + gpio_port_pins_t mask, gpio_port_value_t value) { struct gpio_dw_runtime *context = port->data; uint32_t base_addr = dw_base_to_block_base(context->base_addr); @@ -329,7 +329,7 @@ static int gpio_dw_port_set_masked_raw(const struct device *port, return 0; } -static int gpio_dw_port_set_bits_raw(const struct device *port, gpio_port_pin_t mask) +static int gpio_dw_port_set_bits_raw(const struct device *port, gpio_port_pins_t mask) { struct gpio_dw_runtime *context = port->data; uint32_t base_addr = dw_base_to_block_base(context->base_addr); @@ -345,7 +345,7 @@ static int gpio_dw_port_set_bits_raw(const struct device *port, gpio_port_pin_t } static int gpio_dw_port_clear_bits_raw(const struct device *port, - gpio_port_pin_t mask) + gpio_port_pins_t mask) { struct gpio_dw_runtime *context = port->data; uint32_t base_addr = dw_base_to_block_base(context->base_addr); @@ -360,7 +360,7 @@ static int gpio_dw_port_clear_bits_raw(const struct device *port, return 0; } -static int gpio_dw_port_toggle_bits(const struct device *port, gpio_port_pin_t mask) +static int gpio_dw_port_toggle_bits(const struct device *port, gpio_port_pins_t mask) { struct gpio_dw_runtime *context = port->data; uint32_t base_addr = dw_base_to_block_base(context->base_addr); diff --git a/drivers/gpio/gpio_fxl6408.c b/drivers/gpio/gpio_fxl6408.c index b1b442be1f60be..6a078c94f82c88 100644 --- a/drivers/gpio/gpio_fxl6408.c +++ b/drivers/gpio/gpio_fxl6408.c @@ -291,7 +291,7 @@ static int gpio_fxl6408_pin_config(const struct device *dev, gpio_pin_t pin, return ret; } -static int gpio_fxl6408_port_get_raw(const struct device *dev, gpio_port_pins_t *value) +static int gpio_fxl6408_port_get_raw(const struct device *dev, gpio_port_value_t *value) { struct gpio_fxl6408_drv_data *const drv_data = (struct gpio_fxl6408_drv_data *const)dev->data; @@ -317,7 +317,7 @@ static int gpio_fxl6408_port_get_raw(const struct device *dev, gpio_port_pins_t } static int gpio_fxl6408_port_set_masked_raw(const struct device *dev, - gpio_port_pins_t mask, uint32_t value) + gpio_port_pins_t mask, gpio_port_value_t value) { struct gpio_fxl6408_drv_data *const drv_data = (struct gpio_fxl6408_drv_data *const)dev->data; diff --git a/drivers/gpio/gpio_pca953x.c b/drivers/gpio/gpio_pca953x.c index 555d26b1a9b628..6ff3942aa9997d 100644 --- a/drivers/gpio/gpio_pca953x.c +++ b/drivers/gpio/gpio_pca953x.c @@ -307,8 +307,8 @@ static int gpio_pca953x_port_write(const struct device *dev, k_sem_give(&drv_data->lock); - LOG_DBG("write %x msk %08x val %08x => %x: %d", orig_out, mask, - value, out, rc); + //LOG_DBG("write %x msk %08x val %08x => %x: %d", orig_out, mask, + // value, out, rc); return rc; } diff --git a/drivers/gpio/gpio_pca95xx.c b/drivers/gpio/gpio_pca95xx.c index 35d101997586bd..7755af7874a3a2 100644 --- a/drivers/gpio/gpio_pca95xx.c +++ b/drivers/gpio/gpio_pca95xx.c @@ -490,7 +490,7 @@ static int gpio_pca95xx_config(const struct device *dev, return ret; } -static int gpio_pca95xx_port_get_raw(const struct device *dev, gpio_port_pins_t *value) +static int gpio_pca95xx_port_get_raw(const struct device *dev, gpio_port_value_t *value) { struct gpio_pca95xx_drv_data * const drv_data = (struct gpio_pca95xx_drv_data * const)dev->data; @@ -517,7 +517,7 @@ static int gpio_pca95xx_port_get_raw(const struct device *dev, gpio_port_pins_t } static int gpio_pca95xx_port_set_masked_raw(const struct device *dev, - uint32_t mask, gpio_port_pins_t value) + gpio_port_pins_t mask, gpio_port_value_t value) { struct gpio_pca95xx_drv_data * const drv_data = (struct gpio_pca95xx_drv_data * const)dev->data; diff --git a/drivers/gpio/gpio_pcf857x.c b/drivers/gpio/gpio_pcf857x.c index f1adeef0ec0b66..cbee8da7a0edb7 100644 --- a/drivers/gpio/gpio_pcf857x.c +++ b/drivers/gpio/gpio_pcf857x.c @@ -88,7 +88,7 @@ static void pcf857x_work_handler(struct k_work *work) k_sem_take(&drv_data->lock, K_FOREVER); - uint32_t changed_pins; + gpio_port_value_t changed_pins; uint16_t input_port_last_temp = drv_data->input_port_last; int rc = pcf857x_process_input(drv_data->dev, &changed_pins); diff --git a/drivers/gpio/gpio_sx1509b.c b/drivers/gpio/gpio_sx1509b.c index 632c267bc2b12f..1e5816ea111618 100644 --- a/drivers/gpio/gpio_sx1509b.c +++ b/drivers/gpio/gpio_sx1509b.c @@ -438,7 +438,7 @@ static int port_write(const struct device *dev, k_sem_give(&drv_data->lock); - LOG_DBG("write %04x msk %04x val %04x => %04x: %d", orig_out, mask, value, out, rc); + //LOG_DBG("write %04x msk %04x val %04x => %04x: %d", orig_out, mask, value, out, rc); return rc; } diff --git a/drivers/gpio/gpio_tle9104.c b/drivers/gpio/gpio_tle9104.c index 5fc3ab8d8f5fd3..9ab35fa9df55a6 100644 --- a/drivers/gpio/gpio_tle9104.c +++ b/drivers/gpio/gpio_tle9104.c @@ -95,7 +95,7 @@ static int tle9104_gpio_pin_configure(const struct device *dev, gpio_pin_t pin, return result; } -static int tle9104_gpio_port_get_raw(const struct device *dev, gpio_port_pins_t *value) +static int tle9104_gpio_port_get_raw(const struct device *dev, gpio_port_value_t *value) { ARG_UNUSED(dev); ARG_UNUSED(value); @@ -104,8 +104,8 @@ static int tle9104_gpio_port_get_raw(const struct device *dev, gpio_port_pins_t return -ENOTSUP; } -static int tle9104_gpio_port_set_masked_raw(const struct device *dev, uint32_t mask, - gpio_port_pins_t value) +static int tle9104_gpio_port_set_masked_raw(const struct device *dev, gpio_port_pins_t mask, + gpio_port_value_t value) { const struct tle9104_gpio_config *config = dev->config; struct tle9104_gpio_data *data = dev->data;