drivers: gpio: deprecate GPIO_PIN_ENABLE, GPIO_PIN_DISABLE
GPIO_PIN_ENABLE, GPIO_PIN_DISABLE configuration constants overlap functionality provided by pinmux driver. They usage makes the API inconsistent. They are almost uniformly ignored by the existing device drivers. Only few of them take these constants into account. This commit deprecates usage of the two configuration constants. Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
This commit is contained in:
parent
c2f60ebe56
commit
4487c935fe
4 changed files with 6 additions and 37 deletions
|
@ -42,12 +42,6 @@ static void cmsdk_ahb_gpio_config(struct device *dev, u32_t mask, int flags)
|
|||
{
|
||||
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config->config_info;
|
||||
|
||||
/* Disable the pin and return as setup is meaningless now */
|
||||
if (flags & GPIO_PIN_DISABLE) {
|
||||
cfg->port->altfuncset = mask;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Setup the pin direction
|
||||
* Output Enable:
|
||||
|
@ -88,10 +82,7 @@ static void cmsdk_ahb_gpio_config(struct device *dev, u32_t mask, int flags)
|
|||
}
|
||||
}
|
||||
|
||||
/* Enable the pin last after pin setup */
|
||||
if (flags & GPIO_PIN_ENABLE) {
|
||||
cfg->port->altfuncclr = mask;
|
||||
}
|
||||
cfg->port->altfuncclr = mask;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue