gpio: deprecate gpio pin callback enable and disable API

These have been replaced by the appropriate call to
gpio_pin_interrupt_configure().  While the disable function could be
implemented using the new functionality, the enable function cannot
because the interrupt mode is not available.  Consequently we cannot
replace these with equivalent functionality using the legacy API.

Clean up the internal implementation by removing the inaccessible
port-based enable/disable feature, leaving the pin-based capability in
place.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2020-01-30 20:00:01 -06:00 committed by Carles Cufí
commit 1947481cce
22 changed files with 90 additions and 302 deletions

View file

@ -289,29 +289,21 @@ static int gpio_mcux_manage_callback(struct device *dev,
}
static int gpio_mcux_enable_callback(struct device *dev,
int access_op, u32_t pin)
u32_t pin)
{
struct gpio_mcux_data *data = dev->driver_data;
if (access_op == GPIO_ACCESS_BY_PIN) {
data->pin_callback_enables |= BIT(pin);
} else {
data->pin_callback_enables = 0xFFFFFFFF;
}
data->pin_callback_enables |= BIT(pin);
return 0;
}
static int gpio_mcux_disable_callback(struct device *dev,
int access_op, u32_t pin)
u32_t pin)
{
struct gpio_mcux_data *data = dev->driver_data;
if (access_op == GPIO_ACCESS_BY_PIN) {
data->pin_callback_enables &= ~BIT(pin);
} else {
data->pin_callback_enables = 0U;
}
data->pin_callback_enables &= ~BIT(pin);
return 0;
}