Skip to content

Commit 52ccf19

Browse files
Bartosz Golaszewskichleroy
authored andcommitted
soc: fsl: qe: use new GPIO line value setter callbacks
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20250610-gpiochip-set-rv-soc-v1-1-1a0c36c9deed@linaro.org Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
1 parent 19272b3 commit 52ccf19

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/soc/fsl/qe/gpio.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static int qe_gpio_get(struct gpio_chip *gc, unsigned int gpio)
5757
return !!(ioread32be(&regs->cpdata) & pin_mask);
5858
}
5959

60-
static void qe_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
60+
static int qe_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
6161
{
6262
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
6363
struct qe_gpio_chip *qe_gc = gpiochip_get_data(gc);
@@ -75,6 +75,8 @@ static void qe_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
7575
iowrite32be(qe_gc->cpdata, &regs->cpdata);
7676

7777
spin_unlock_irqrestore(&qe_gc->lock, flags);
78+
79+
return 0;
7880
}
7981

8082
static void qe_gpio_set_multiple(struct gpio_chip *gc,
@@ -317,7 +319,7 @@ static int __init qe_add_gpiochips(void)
317319
gc->direction_input = qe_gpio_dir_in;
318320
gc->direction_output = qe_gpio_dir_out;
319321
gc->get = qe_gpio_get;
320-
gc->set = qe_gpio_set;
322+
gc->set_rv = qe_gpio_set;
321323
gc->set_multiple = qe_gpio_set_multiple;
322324

323325
ret = of_mm_gpiochip_add_data(np, mm_gc, qe_gc);

0 commit comments

Comments
 (0)