Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 38d98a822c14 ("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>

+3 -2
+3 -2
drivers/gpio/gpio-xgene-sb.c
··· 63 63 static void xgene_gpio_set_bit(struct gpio_chip *gc, 64 64 void __iomem *reg, u32 gpio, int val) 65 65 { 66 + struct gpio_generic_chip *chip = to_gpio_generic_chip(gc); 66 67 u32 data; 67 68 68 - data = gc->read_reg(reg); 69 + data = gpio_generic_read_reg(chip, reg); 69 70 if (val) 70 71 data |= GPIO_MASK(gpio); 71 72 else 72 73 data &= ~GPIO_MASK(gpio); 73 - gc->write_reg(reg, data); 74 + gpio_generic_write_reg(chip, reg, data); 74 75 } 75 76 76 77 static int xgene_gpio_sb_irq_set_type(struct irq_data *d, unsigned int type)