From 37239dbcbf1fcb1c9671ed57f52d54142b0c0281 Mon Sep 17 00:00:00 2001 From: Peter Bigot Date: Mon, 3 Feb 2020 17:20:19 -0600 Subject: [PATCH] gpio: rename typedef for devicetree flags gpio_dt_flags_t is shorter and consistent with DT_ prefix. Signed-off-by: Peter Bigot --- drivers/adc/adc_lmp90xxx.c | 2 +- drivers/eeprom/eeprom_at2x.c | 2 +- drivers/ethernet/eth_enc28j60_priv.h | 2 +- drivers/ethernet/eth_enc424j600_priv.h | 2 +- drivers/lora/sx1276.c | 2 +- drivers/sensor/adxl362/adxl362.h | 2 +- drivers/sensor/adxl372/adxl372.h | 2 +- drivers/sensor/amg88xx/amg88xx.h | 2 +- drivers/sensor/bmc150_magn/bmc150_magn.h | 2 +- drivers/sensor/bmg160/bmg160.h | 2 +- drivers/sensor/bmi160/bmi160.h | 2 +- drivers/sensor/dht/dht.h | 2 +- drivers/sensor/fxas21002/fxas21002.h | 2 +- drivers/sensor/fxos8700/fxos8700.h | 4 ++-- drivers/sensor/lis2ds12/lis2ds12.h | 2 +- drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro.h | 2 +- include/drivers/gpio.h | 2 +- subsys/disk/disk_access_spi_sdhc.c | 2 +- subsys/disk/disk_access_usdhc.c | 6 +++--- 19 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/adc/adc_lmp90xxx.c b/drivers/adc/adc_lmp90xxx.c index 7e8770e919f..aba88c6a02f 100644 --- a/drivers/adc/adc_lmp90xxx.c +++ b/drivers/adc/adc_lmp90xxx.c @@ -112,7 +112,7 @@ struct lmp90xxx_config { struct spi_config spi_cfg; const char *drdyb_dev_name; gpio_pin_t drdyb_pin; - gpio_devicetree_flags_t drdyb_flags; + gpio_dt_flags_t drdyb_flags; u8_t rtd_current; u8_t resolution; u8_t channels; diff --git a/drivers/eeprom/eeprom_at2x.c b/drivers/eeprom/eeprom_at2x.c index 53b3fd20ab3..d2cb38f074a 100644 --- a/drivers/eeprom/eeprom_at2x.c +++ b/drivers/eeprom/eeprom_at2x.c @@ -41,7 +41,7 @@ struct eeprom_at2x_config { const char *spi_cs_dev_name; u8_t spi_cs_pin; gpio_pin_t wp_gpio_pin; - gpio_devicetree_flags_t wp_gpio_flags; + gpio_dt_flags_t wp_gpio_flags; const char *wp_gpio_name; size_t size; size_t pagesize; diff --git a/drivers/ethernet/eth_enc28j60_priv.h b/drivers/ethernet/eth_enc28j60_priv.h index a0fff3b7003..b90d03b7e40 100644 --- a/drivers/ethernet/eth_enc28j60_priv.h +++ b/drivers/ethernet/eth_enc28j60_priv.h @@ -216,7 +216,7 @@ struct eth_enc28j60_config { const char *gpio_port; u8_t gpio_pin; - gpio_devicetree_flags_t gpio_flags; + gpio_dt_flags_t gpio_flags; const char *spi_port; u8_t spi_cs_pin; const char *spi_cs_port; diff --git a/drivers/ethernet/eth_enc424j600_priv.h b/drivers/ethernet/eth_enc424j600_priv.h index 30400034116..ee8b48f6f41 100644 --- a/drivers/ethernet/eth_enc424j600_priv.h +++ b/drivers/ethernet/eth_enc424j600_priv.h @@ -275,7 +275,7 @@ struct enc424j600_config { const char *gpio_port; u8_t gpio_pin; - gpio_devicetree_flags_t gpio_flags; + gpio_dt_flags_t gpio_flags; const char *spi_port; u8_t spi_cs_pin; const char *spi_cs_port; diff --git a/drivers/lora/sx1276.c b/drivers/lora/sx1276.c index 8875bd92c66..36efb8393eb 100644 --- a/drivers/lora/sx1276.c +++ b/drivers/lora/sx1276.c @@ -29,7 +29,7 @@ extern DioIrqHandler *DioIrq[]; struct sx1276_dio { const char *port; gpio_pin_t pin; - gpio_devicetree_flags_t flags; + gpio_dt_flags_t flags; }; static struct sx1276_dio sx1276_dios[] = diff --git a/drivers/sensor/adxl362/adxl362.h b/drivers/sensor/adxl362/adxl362.h index 81811232582..cd6732eee3f 100644 --- a/drivers/sensor/adxl362/adxl362.h +++ b/drivers/sensor/adxl362/adxl362.h @@ -181,7 +181,7 @@ struct adxl362_config { #if defined(CONFIG_ADXL362_TRIGGER) const char *gpio_port; gpio_pin_t int_gpio; - gpio_devicetree_flags_t int_flags; + gpio_dt_flags_t int_flags; u8_t int1_config; u8_t int2_config; #endif diff --git a/drivers/sensor/adxl372/adxl372.h b/drivers/sensor/adxl372/adxl372.h index cd15e816cb0..4fd84943d5a 100644 --- a/drivers/sensor/adxl372/adxl372.h +++ b/drivers/sensor/adxl372/adxl372.h @@ -326,7 +326,7 @@ struct adxl372_dev_config { #ifdef CONFIG_ADXL372_TRIGGER const char *gpio_port; gpio_pin_t int_gpio; - gpio_devicetree_flags_t int_flags; + gpio_dt_flags_t int_flags; #endif bool max_peak_detect_mode; diff --git a/drivers/sensor/amg88xx/amg88xx.h b/drivers/sensor/amg88xx/amg88xx.h index a746d889541..6c5bf4a360f 100644 --- a/drivers/sensor/amg88xx/amg88xx.h +++ b/drivers/sensor/amg88xx/amg88xx.h @@ -71,7 +71,7 @@ struct amg88xx_config { #ifdef CONFIG_AMG88XX_TRIGGER char *gpio_name; u8_t gpio_pin; - gpio_devicetree_flags_t gpio_flags; + gpio_dt_flags_t gpio_flags; #endif u8_t i2c_address; }; diff --git a/drivers/sensor/bmc150_magn/bmc150_magn.h b/drivers/sensor/bmc150_magn/bmc150_magn.h index f8fe016460e..2eef151d14a 100644 --- a/drivers/sensor/bmc150_magn/bmc150_magn.h +++ b/drivers/sensor/bmc150_magn/bmc150_magn.h @@ -89,7 +89,7 @@ struct bmc150_magn_config { #if defined(CONFIG_BMC150_MAGN_TRIGGER_DRDY) char *gpio_drdy_dev_name; gpio_pin_t gpio_drdy_int_pin; - gpio_devicetree_flags_t gpio_drdy_int_flags; + gpio_dt_flags_t gpio_drdy_int_flags; #endif u16_t i2c_slave_addr; char *i2c_master_dev_name; diff --git a/drivers/sensor/bmg160/bmg160.h b/drivers/sensor/bmg160/bmg160.h index ff317b75d68..916c2464685 100644 --- a/drivers/sensor/bmg160/bmg160.h +++ b/drivers/sensor/bmg160/bmg160.h @@ -183,7 +183,7 @@ struct bmg160_device_config { u8_t i2c_speed; #ifdef CONFIG_BMG160_TRIGGER gpio_pin_t int_pin; - gpio_devicetree_flags_t int_flags; + gpio_dt_flags_t int_flags; const char *gpio_port; #endif }; diff --git a/drivers/sensor/bmi160/bmi160.h b/drivers/sensor/bmi160/bmi160.h index b09ca993744..ac11e7bcff8 100644 --- a/drivers/sensor/bmi160/bmi160.h +++ b/drivers/sensor/bmi160/bmi160.h @@ -387,7 +387,7 @@ struct bmi160_device_config { #if defined(CONFIG_BMI160_TRIGGER) const char *gpio_port; gpio_pin_t int_pin; - gpio_devicetree_flags_t int_flags; + gpio_dt_flags_t int_flags; #endif }; diff --git a/drivers/sensor/dht/dht.h b/drivers/sensor/dht/dht.h index 0b6705fb32e..4d14dccfe49 100644 --- a/drivers/sensor/dht/dht.h +++ b/drivers/sensor/dht/dht.h @@ -20,7 +20,7 @@ struct dht_data { struct dht_config { const char *ctrl; - gpio_devicetree_flags_t flags; + gpio_dt_flags_t flags; gpio_pin_t pin; }; diff --git a/drivers/sensor/fxas21002/fxas21002.h b/drivers/sensor/fxas21002/fxas21002.h index 261dc44bb09..d0a3477d104 100644 --- a/drivers/sensor/fxas21002/fxas21002.h +++ b/drivers/sensor/fxas21002/fxas21002.h @@ -61,7 +61,7 @@ struct fxas21002_config { #ifdef CONFIG_FXAS21002_TRIGGER char *gpio_name; u8_t gpio_pin; - gpio_devicetree_flags_t gpio_flags; + gpio_dt_flags_t gpio_flags; #endif u8_t i2c_address; u8_t whoami; diff --git a/drivers/sensor/fxos8700/fxos8700.h b/drivers/sensor/fxos8700/fxos8700.h index 02959539915..45a3734fc36 100644 --- a/drivers/sensor/fxos8700/fxos8700.h +++ b/drivers/sensor/fxos8700/fxos8700.h @@ -124,12 +124,12 @@ struct fxos8700_config { #ifdef CONFIG_FXOS8700_TRIGGER char *gpio_name; u8_t gpio_pin; - gpio_devicetree_flags_t gpio_flags; + gpio_dt_flags_t gpio_flags; #endif u8_t i2c_address; char *reset_name; u8_t reset_pin; - gpio_devicetree_flags_t reset_flags; + gpio_dt_flags_t reset_flags; enum fxos8700_mode mode; enum fxos8700_power_mode power_mode; enum fxos8700_range range; diff --git a/drivers/sensor/lis2ds12/lis2ds12.h b/drivers/sensor/lis2ds12/lis2ds12.h index 0bb65006288..8b5de66e2e5 100644 --- a/drivers/sensor/lis2ds12/lis2ds12.h +++ b/drivers/sensor/lis2ds12/lis2ds12.h @@ -87,7 +87,7 @@ struct lis2ds12_config { #ifdef CONFIG_LIS2DS12_TRIGGER const char *irq_port; gpio_pin_t irq_pin; - gpio_devicetree_flags_t irq_flags; + gpio_dt_flags_t irq_flags; #endif }; diff --git a/drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro.h b/drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro.h index 07103ce4c52..0f6452cdd54 100644 --- a/drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro.h +++ b/drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro.h @@ -216,7 +216,7 @@ struct lsm9ds0_gyro_config { #if CONFIG_LSM9DS0_GYRO_TRIGGER_DRDY char *gpio_drdy_dev_name; gpio_pin_t gpio_drdy_int_pin; - gpio_devicetree_flags_t gpio_drdy_int_flags; + gpio_dt_flags_t gpio_drdy_int_flags; #endif }; diff --git a/include/drivers/gpio.h b/include/drivers/gpio.h index 2ed4514fc32..df7e2a55a61 100644 --- a/include/drivers/gpio.h +++ b/include/drivers/gpio.h @@ -428,7 +428,7 @@ typedef u8_t gpio_pin_t; * bits of the full flags field, so use a reduced-size type to record * that part of a GPIOS property. */ -typedef u8_t gpio_devicetree_flags_t; +typedef u8_t gpio_dt_flags_t; /** * @brief Provides a type to hold GPIO configuration flags. diff --git a/subsys/disk/disk_access_spi_sdhc.c b/subsys/disk/disk_access_spi_sdhc.c index 03ef1bec38d..a9cb55151e1 100644 --- a/subsys/disk/disk_access_spi_sdhc.c +++ b/subsys/disk/disk_access_spi_sdhc.c @@ -28,7 +28,7 @@ struct sdhc_spi_data { struct spi_config cfg; struct device *cs; u32_t pin; - gpio_devicetree_flags_t flags; + gpio_dt_flags_t flags; bool high_capacity; u32_t sector_count; diff --git a/subsys/disk/disk_access_usdhc.c b/subsys/disk/disk_access_usdhc.c index 360a288a769..7c6fffa56a7 100644 --- a/subsys/disk/disk_access_usdhc.c +++ b/subsys/disk/disk_access_usdhc.c @@ -439,11 +439,11 @@ struct usdhc_client_info { struct usdhc_board_config { struct device *pwr_gpio; u32_t pwr_pin; - gpio_devicetree_flags_t pwr_flags; + gpio_dt_flags_t pwr_flags; struct device *detect_gpio; u32_t detect_pin; - gpio_devicetree_flags_t detect_flags; + gpio_dt_flags_t detect_flags; struct gpio_callback detect_cb; }; @@ -2230,7 +2230,7 @@ static void usdhc_cd_gpio_cb(struct device *dev, } static int usdhc_cd_gpio_init(struct device *detect_gpio, - u32_t pin, gpio_devicetree_flags_t flags, + u32_t pin, gpio_dt_flags_t flags, struct gpio_callback *callback) { int ret;