diff options
| author | saturneric <[email protected]> | 2025-10-16 21:50:56 +0000 |
|---|---|---|
| committer | saturneric <[email protected]> | 2025-10-16 21:50:56 +0000 |
| commit | 5293dcd7ffda472dbf326c81877bb63d2bfcbd10 (patch) | |
| tree | da3be05c4aa1646e5f26a84cd75d83fe866c5358 /drivers/gpio/gpio-reg.c | |
| parent | Merge tag 'v6.16' (diff) | |
| parent | Linux 6.17 (diff) | |
| download | kernel-5293dcd7ffda472dbf326c81877bb63d2bfcbd10.tar.gz kernel-5293dcd7ffda472dbf326c81877bb63d2bfcbd10.zip | |
Merge tag 'v6.17'
Linux 6.17
Diffstat (limited to 'drivers/gpio/gpio-reg.c')
| -rw-r--r-- | drivers/gpio/gpio-reg.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-reg.c b/drivers/gpio/gpio-reg.c index 73c7260d89c0..f2238196faf1 100644 --- a/drivers/gpio/gpio-reg.c +++ b/drivers/gpio/gpio-reg.c @@ -57,7 +57,7 @@ static int gpio_reg_direction_input(struct gpio_chip *gc, unsigned offset) return r->direction & BIT(offset) ? 0 : -ENOTSUPP; } -static void gpio_reg_set(struct gpio_chip *gc, unsigned offset, int value) +static int gpio_reg_set(struct gpio_chip *gc, unsigned int offset, int value) { struct gpio_reg *r = to_gpio_reg(gc); unsigned long flags; @@ -72,6 +72,8 @@ static void gpio_reg_set(struct gpio_chip *gc, unsigned offset, int value) r->out = val; writel_relaxed(val, r->reg); spin_unlock_irqrestore(&r->lock, flags); + + return 0; } static int gpio_reg_get(struct gpio_chip *gc, unsigned offset) @@ -92,8 +94,8 @@ static int gpio_reg_get(struct gpio_chip *gc, unsigned offset) return !!(val & mask); } -static void gpio_reg_set_multiple(struct gpio_chip *gc, unsigned long *mask, - unsigned long *bits) +static int gpio_reg_set_multiple(struct gpio_chip *gc, unsigned long *mask, + unsigned long *bits) { struct gpio_reg *r = to_gpio_reg(gc); unsigned long flags; @@ -102,6 +104,8 @@ static void gpio_reg_set_multiple(struct gpio_chip *gc, unsigned long *mask, r->out = (r->out & ~*mask) | (*bits & *mask); writel_relaxed(r->out, r->reg); spin_unlock_irqrestore(&r->lock, flags); + + return 0; } static int gpio_reg_to_irq(struct gpio_chip *gc, unsigned offset) |
