gpio: clean up internal API function prototypes

Use gpio_pin_t uniformly when passing pin indexes to the driver.  Use
gpio_flags_t uniformly when passing flags to the driver.  Change name
of pin configuration function in API function table to be consistent
with other API functions.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2020-01-30 12:12:39 -06:00 committed by Carles Cufí
commit 7c95d503b0
27 changed files with 145 additions and 137 deletions

View file

@ -305,7 +305,7 @@ static int setup_pin_pullupdown(struct device *dev, u32_t pin, int flags)
* @return 0 if successful, failed otherwise
*/
static int gpio_pca95xx_config(struct device *dev,
u32_t pin, int flags)
gpio_pin_t pin, gpio_flags_t flags)
{
int ret;
struct gpio_pca95xx_drv_data * const drv_data =
@ -441,7 +441,7 @@ static int gpio_pca95xx_port_toggle_bits(struct device *dev, u32_t mask)
}
static int gpio_pca95xx_pin_interrupt_configure(struct device *dev,
unsigned int pin,
gpio_pin_t pin,
enum gpio_int_mode mode,
enum gpio_int_trig trig)
{
@ -449,7 +449,7 @@ static int gpio_pca95xx_pin_interrupt_configure(struct device *dev,
}
static const struct gpio_driver_api gpio_pca95xx_drv_api_funcs = {
.config = gpio_pca95xx_config,
.pin_configure = gpio_pca95xx_config,
.port_get_raw = gpio_pca95xx_port_get_raw,
.port_set_masked_raw = gpio_pca95xx_port_set_masked_raw,
.port_set_bits_raw = gpio_pca95xx_port_set_bits_raw,