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:
Piotr Mienkowski 2017-10-17 15:27:29 +02:00 committed by Anas Nashif
commit 4487c935fe
4 changed files with 6 additions and 37 deletions

View file

@ -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;
}
/**