Skip to content

Commit

Permalink
gpio
Browse files Browse the repository at this point in the history
  • Loading branch information
soburi committed Sep 21, 2024
1 parent fd707c5 commit 86c14e5
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_axp192.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
12 changes: 6 additions & 6 deletions drivers/gpio/gpio_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
#include <zephyr/drivers/interrupt_controller/ioapic.h>
#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.
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpio/gpio_fxl6408.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpio/gpio_pca953x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Check failure on line 310 in drivers/gpio/gpio_pca953x.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

C99_COMMENTS

drivers/gpio/gpio_pca953x.c:310 do not use C99 // comments
// value, out, rc);

Check failure on line 311 in drivers/gpio/gpio_pca953x.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

C99_COMMENTS

drivers/gpio/gpio_pca953x.c:311 do not use C99 // comments

return rc;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpio/gpio_pca95xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_pcf857x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_sx1509b.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check failure on line 441 in drivers/gpio/gpio_sx1509b.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

C99_COMMENTS

drivers/gpio/gpio_sx1509b.c:441 do not use C99 // comments

return rc;
}
Expand Down
6 changes: 3 additions & 3 deletions drivers/gpio/gpio_tle9104.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit 86c14e5

Please sign in to comment.