gpio: rename typedef for devicetree flags
gpio_dt_flags_t is shorter and consistent with DT_ prefix. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
f017209821
commit
37239dbcbf
19 changed files with 22 additions and 22 deletions
|
@ -112,7 +112,7 @@ struct lmp90xxx_config {
|
||||||
struct spi_config spi_cfg;
|
struct spi_config spi_cfg;
|
||||||
const char *drdyb_dev_name;
|
const char *drdyb_dev_name;
|
||||||
gpio_pin_t drdyb_pin;
|
gpio_pin_t drdyb_pin;
|
||||||
gpio_devicetree_flags_t drdyb_flags;
|
gpio_dt_flags_t drdyb_flags;
|
||||||
u8_t rtd_current;
|
u8_t rtd_current;
|
||||||
u8_t resolution;
|
u8_t resolution;
|
||||||
u8_t channels;
|
u8_t channels;
|
||||||
|
|
|
@ -41,7 +41,7 @@ struct eeprom_at2x_config {
|
||||||
const char *spi_cs_dev_name;
|
const char *spi_cs_dev_name;
|
||||||
u8_t spi_cs_pin;
|
u8_t spi_cs_pin;
|
||||||
gpio_pin_t wp_gpio_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;
|
const char *wp_gpio_name;
|
||||||
size_t size;
|
size_t size;
|
||||||
size_t pagesize;
|
size_t pagesize;
|
||||||
|
|
|
@ -216,7 +216,7 @@
|
||||||
struct eth_enc28j60_config {
|
struct eth_enc28j60_config {
|
||||||
const char *gpio_port;
|
const char *gpio_port;
|
||||||
u8_t gpio_pin;
|
u8_t gpio_pin;
|
||||||
gpio_devicetree_flags_t gpio_flags;
|
gpio_dt_flags_t gpio_flags;
|
||||||
const char *spi_port;
|
const char *spi_port;
|
||||||
u8_t spi_cs_pin;
|
u8_t spi_cs_pin;
|
||||||
const char *spi_cs_port;
|
const char *spi_cs_port;
|
||||||
|
|
|
@ -275,7 +275,7 @@
|
||||||
struct enc424j600_config {
|
struct enc424j600_config {
|
||||||
const char *gpio_port;
|
const char *gpio_port;
|
||||||
u8_t gpio_pin;
|
u8_t gpio_pin;
|
||||||
gpio_devicetree_flags_t gpio_flags;
|
gpio_dt_flags_t gpio_flags;
|
||||||
const char *spi_port;
|
const char *spi_port;
|
||||||
u8_t spi_cs_pin;
|
u8_t spi_cs_pin;
|
||||||
const char *spi_cs_port;
|
const char *spi_cs_port;
|
||||||
|
|
|
@ -29,7 +29,7 @@ extern DioIrqHandler *DioIrq[];
|
||||||
struct sx1276_dio {
|
struct sx1276_dio {
|
||||||
const char *port;
|
const char *port;
|
||||||
gpio_pin_t pin;
|
gpio_pin_t pin;
|
||||||
gpio_devicetree_flags_t flags;
|
gpio_dt_flags_t flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct sx1276_dio sx1276_dios[] =
|
static struct sx1276_dio sx1276_dios[] =
|
||||||
|
|
|
@ -181,7 +181,7 @@ struct adxl362_config {
|
||||||
#if defined(CONFIG_ADXL362_TRIGGER)
|
#if defined(CONFIG_ADXL362_TRIGGER)
|
||||||
const char *gpio_port;
|
const char *gpio_port;
|
||||||
gpio_pin_t int_gpio;
|
gpio_pin_t int_gpio;
|
||||||
gpio_devicetree_flags_t int_flags;
|
gpio_dt_flags_t int_flags;
|
||||||
u8_t int1_config;
|
u8_t int1_config;
|
||||||
u8_t int2_config;
|
u8_t int2_config;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -326,7 +326,7 @@ struct adxl372_dev_config {
|
||||||
#ifdef CONFIG_ADXL372_TRIGGER
|
#ifdef CONFIG_ADXL372_TRIGGER
|
||||||
const char *gpio_port;
|
const char *gpio_port;
|
||||||
gpio_pin_t int_gpio;
|
gpio_pin_t int_gpio;
|
||||||
gpio_devicetree_flags_t int_flags;
|
gpio_dt_flags_t int_flags;
|
||||||
#endif
|
#endif
|
||||||
bool max_peak_detect_mode;
|
bool max_peak_detect_mode;
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ struct amg88xx_config {
|
||||||
#ifdef CONFIG_AMG88XX_TRIGGER
|
#ifdef CONFIG_AMG88XX_TRIGGER
|
||||||
char *gpio_name;
|
char *gpio_name;
|
||||||
u8_t gpio_pin;
|
u8_t gpio_pin;
|
||||||
gpio_devicetree_flags_t gpio_flags;
|
gpio_dt_flags_t gpio_flags;
|
||||||
#endif
|
#endif
|
||||||
u8_t i2c_address;
|
u8_t i2c_address;
|
||||||
};
|
};
|
||||||
|
|
|
@ -89,7 +89,7 @@ struct bmc150_magn_config {
|
||||||
#if defined(CONFIG_BMC150_MAGN_TRIGGER_DRDY)
|
#if defined(CONFIG_BMC150_MAGN_TRIGGER_DRDY)
|
||||||
char *gpio_drdy_dev_name;
|
char *gpio_drdy_dev_name;
|
||||||
gpio_pin_t gpio_drdy_int_pin;
|
gpio_pin_t gpio_drdy_int_pin;
|
||||||
gpio_devicetree_flags_t gpio_drdy_int_flags;
|
gpio_dt_flags_t gpio_drdy_int_flags;
|
||||||
#endif
|
#endif
|
||||||
u16_t i2c_slave_addr;
|
u16_t i2c_slave_addr;
|
||||||
char *i2c_master_dev_name;
|
char *i2c_master_dev_name;
|
||||||
|
|
|
@ -183,7 +183,7 @@ struct bmg160_device_config {
|
||||||
u8_t i2c_speed;
|
u8_t i2c_speed;
|
||||||
#ifdef CONFIG_BMG160_TRIGGER
|
#ifdef CONFIG_BMG160_TRIGGER
|
||||||
gpio_pin_t int_pin;
|
gpio_pin_t int_pin;
|
||||||
gpio_devicetree_flags_t int_flags;
|
gpio_dt_flags_t int_flags;
|
||||||
const char *gpio_port;
|
const char *gpio_port;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -387,7 +387,7 @@ struct bmi160_device_config {
|
||||||
#if defined(CONFIG_BMI160_TRIGGER)
|
#if defined(CONFIG_BMI160_TRIGGER)
|
||||||
const char *gpio_port;
|
const char *gpio_port;
|
||||||
gpio_pin_t int_pin;
|
gpio_pin_t int_pin;
|
||||||
gpio_devicetree_flags_t int_flags;
|
gpio_dt_flags_t int_flags;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ struct dht_data {
|
||||||
|
|
||||||
struct dht_config {
|
struct dht_config {
|
||||||
const char *ctrl;
|
const char *ctrl;
|
||||||
gpio_devicetree_flags_t flags;
|
gpio_dt_flags_t flags;
|
||||||
gpio_pin_t pin;
|
gpio_pin_t pin;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ struct fxas21002_config {
|
||||||
#ifdef CONFIG_FXAS21002_TRIGGER
|
#ifdef CONFIG_FXAS21002_TRIGGER
|
||||||
char *gpio_name;
|
char *gpio_name;
|
||||||
u8_t gpio_pin;
|
u8_t gpio_pin;
|
||||||
gpio_devicetree_flags_t gpio_flags;
|
gpio_dt_flags_t gpio_flags;
|
||||||
#endif
|
#endif
|
||||||
u8_t i2c_address;
|
u8_t i2c_address;
|
||||||
u8_t whoami;
|
u8_t whoami;
|
||||||
|
|
|
@ -124,12 +124,12 @@ struct fxos8700_config {
|
||||||
#ifdef CONFIG_FXOS8700_TRIGGER
|
#ifdef CONFIG_FXOS8700_TRIGGER
|
||||||
char *gpio_name;
|
char *gpio_name;
|
||||||
u8_t gpio_pin;
|
u8_t gpio_pin;
|
||||||
gpio_devicetree_flags_t gpio_flags;
|
gpio_dt_flags_t gpio_flags;
|
||||||
#endif
|
#endif
|
||||||
u8_t i2c_address;
|
u8_t i2c_address;
|
||||||
char *reset_name;
|
char *reset_name;
|
||||||
u8_t reset_pin;
|
u8_t reset_pin;
|
||||||
gpio_devicetree_flags_t reset_flags;
|
gpio_dt_flags_t reset_flags;
|
||||||
enum fxos8700_mode mode;
|
enum fxos8700_mode mode;
|
||||||
enum fxos8700_power_mode power_mode;
|
enum fxos8700_power_mode power_mode;
|
||||||
enum fxos8700_range range;
|
enum fxos8700_range range;
|
||||||
|
|
|
@ -87,7 +87,7 @@ struct lis2ds12_config {
|
||||||
#ifdef CONFIG_LIS2DS12_TRIGGER
|
#ifdef CONFIG_LIS2DS12_TRIGGER
|
||||||
const char *irq_port;
|
const char *irq_port;
|
||||||
gpio_pin_t irq_pin;
|
gpio_pin_t irq_pin;
|
||||||
gpio_devicetree_flags_t irq_flags;
|
gpio_dt_flags_t irq_flags;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -216,7 +216,7 @@ struct lsm9ds0_gyro_config {
|
||||||
#if CONFIG_LSM9DS0_GYRO_TRIGGER_DRDY
|
#if CONFIG_LSM9DS0_GYRO_TRIGGER_DRDY
|
||||||
char *gpio_drdy_dev_name;
|
char *gpio_drdy_dev_name;
|
||||||
gpio_pin_t gpio_drdy_int_pin;
|
gpio_pin_t gpio_drdy_int_pin;
|
||||||
gpio_devicetree_flags_t gpio_drdy_int_flags;
|
gpio_dt_flags_t gpio_drdy_int_flags;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -428,7 +428,7 @@ typedef u8_t gpio_pin_t;
|
||||||
* bits of the full flags field, so use a reduced-size type to record
|
* bits of the full flags field, so use a reduced-size type to record
|
||||||
* that part of a GPIOS property.
|
* 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.
|
* @brief Provides a type to hold GPIO configuration flags.
|
||||||
|
|
|
@ -28,7 +28,7 @@ struct sdhc_spi_data {
|
||||||
struct spi_config cfg;
|
struct spi_config cfg;
|
||||||
struct device *cs;
|
struct device *cs;
|
||||||
u32_t pin;
|
u32_t pin;
|
||||||
gpio_devicetree_flags_t flags;
|
gpio_dt_flags_t flags;
|
||||||
|
|
||||||
bool high_capacity;
|
bool high_capacity;
|
||||||
u32_t sector_count;
|
u32_t sector_count;
|
||||||
|
|
|
@ -439,11 +439,11 @@ struct usdhc_client_info {
|
||||||
struct usdhc_board_config {
|
struct usdhc_board_config {
|
||||||
struct device *pwr_gpio;
|
struct device *pwr_gpio;
|
||||||
u32_t pwr_pin;
|
u32_t pwr_pin;
|
||||||
gpio_devicetree_flags_t pwr_flags;
|
gpio_dt_flags_t pwr_flags;
|
||||||
|
|
||||||
struct device *detect_gpio;
|
struct device *detect_gpio;
|
||||||
u32_t detect_pin;
|
u32_t detect_pin;
|
||||||
gpio_devicetree_flags_t detect_flags;
|
gpio_dt_flags_t detect_flags;
|
||||||
struct gpio_callback detect_cb;
|
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,
|
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)
|
struct gpio_callback *callback)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue