Skip to content

Commit 36f30f7

Browse files
author
Bartosz Golaszewski
committed
gpio: xgene-sb: use generic GPIO chip register read and write APIs
The conversion to using the modernized generic GPIO chip API was incomplete without also converting the direct calls to write/read_reg() callbacks. Use the provided wrappers from linux/gpio/generic.h. Fixes: 38d98a8 ("gpio: xgene-sb: use new generic GPIO chip API") Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-6-f3d1a4c57124@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
1 parent e7a3a1b commit 36f30f7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

drivers/gpio/gpio-xgene-sb.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,15 @@ struct xgene_gpio_sb {
6363
static void xgene_gpio_set_bit(struct gpio_chip *gc,
6464
void __iomem *reg, u32 gpio, int val)
6565
{
66+
struct gpio_generic_chip *chip = to_gpio_generic_chip(gc);
6667
u32 data;
6768

68-
data = gc->read_reg(reg);
69+
data = gpio_generic_read_reg(chip, reg);
6970
if (val)
7071
data |= GPIO_MASK(gpio);
7172
else
7273
data &= ~GPIO_MASK(gpio);
73-
gc->write_reg(reg, data);
74+
gpio_generic_write_reg(chip, reg, data);
7475
}
7576

7677
static int xgene_gpio_sb_irq_set_type(struct irq_data *d, unsigned int type)

0 commit comments

Comments
 (0)