Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions drivers/gpio/gpio-usbio.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,13 @@ static int usbio_gpio_get_value(struct gpio_chip *chip, unsigned int offset)
return usbio_gpio_read(usbio_gpio, offset);
}

static void usbio_gpio_set_value(struct gpio_chip *chip, unsigned int offset,
int val)
static
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 17, 0)
void
#else
int
#endif
usbio_gpio_set_value(struct gpio_chip *chip, unsigned int offset, int val)
{
struct usbio_gpio_dev *usbio_gpio = gpiochip_get_data(chip);
int ret;
Expand All @@ -186,6 +191,10 @@ static void usbio_gpio_set_value(struct gpio_chip *chip, unsigned int offset,
dev_err(chip->parent,
"%s offset:%d val:%d set value failed %d\n", __func__,
offset, val, ret);

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)
return ret;
#endif
}

static int usbio_gpio_direction_input(struct gpio_chip *chip,
Expand Down