drivers: axp192_gpio: Fix for latest get_direction unit test
This commit resolves an internal dependecy between GET_DIRECTION and GET_CONFIG configuration. GET_CONFIG api is internally needed by GET_DIRECTION api. Signed-off-by: Martin Kiepfer <m.kiepfer@teleschirm.org>
This commit is contained in:
parent
24eb2ee80a
commit
dbf3768af9
1 changed files with 13 additions and 1 deletions
|
@ -159,7 +159,18 @@ static int gpio_axp192_port_toggle_bits(const struct device *dev, gpio_port_pins
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_GPIO_GET_CONFIG
|
||||
static int gpio_axp192_pin_interrupt_configure(const struct device *dev, gpio_pin_t pin,
|
||||
enum gpio_int_mode mode, enum gpio_int_trig trig)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
ARG_UNUSED(pin);
|
||||
ARG_UNUSED(mode);
|
||||
ARG_UNUSED(trig);
|
||||
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_GPIO_GET_CONFIG) || defined(CONFIG_GPIO_GET_DIRECTION)
|
||||
static int gpio_axp192_get_config(const struct device *dev, gpio_pin_t pin, gpio_flags_t *out_flags)
|
||||
{
|
||||
const struct gpio_axp192_config *config = dev->config;
|
||||
|
@ -265,6 +276,7 @@ static const struct gpio_driver_api gpio_axp192_api = {
|
|||
.port_set_bits_raw = gpio_axp192_port_set_bits_raw,
|
||||
.port_clear_bits_raw = gpio_axp192_port_clear_bits_raw,
|
||||
.port_toggle_bits = gpio_axp192_port_toggle_bits,
|
||||
.pin_interrupt_configure = gpio_axp192_pin_interrupt_configure,
|
||||
.manage_callback = gpio_axp192_manage_callback,
|
||||
#ifdef CONFIG_GPIO_GET_DIRECTION
|
||||
.port_get_direction = gpio_axp192_port_get_direction,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue