diff options
| author | Bartosz Golaszewski <[email protected]> | 2025-06-19 08:33:19 +0000 |
|---|---|---|
| committer | Bartosz Golaszewski <[email protected]> | 2025-06-23 07:25:46 +0000 |
| commit | f1ff31c8ef80f4720ebf7854e6af6204dddd9ce3 (patch) | |
| tree | bce328e1fe8f2106037b223d9f8e88e088bca5b8 /drivers/gpio/gpio-pxa.c | |
| parent | gpio: pmic-eic-sprd: drop unneeded .set() callback (diff) | |
| download | kernel-f1ff31c8ef80f4720ebf7854e6af6204dddd9ce3.tar.gz kernel-f1ff31c8ef80f4720ebf7854e6af6204dddd9ce3.zip | |
gpio: pxa: 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.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'drivers/gpio/gpio-pxa.c')
| -rw-r--r-- | drivers/gpio/gpio-pxa.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index 131ab79ebce7..13f7da2a9486 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -315,12 +315,14 @@ static int pxa_gpio_get(struct gpio_chip *chip, unsigned offset) return !!(gplr & GPIO_bit(offset)); } -static void pxa_gpio_set(struct gpio_chip *chip, unsigned offset, int value) +static int pxa_gpio_set(struct gpio_chip *chip, unsigned int offset, int value) { void __iomem *base = gpio_bank_base(chip, offset); writel_relaxed(GPIO_bit(offset), base + (value ? GPSR_OFFSET : GPCR_OFFSET)); + + return 0; } #ifdef CONFIG_OF_GPIO @@ -353,7 +355,7 @@ static int pxa_init_gpio_chip(struct pxa_gpio_chip *pchip, int ngpio, void __iom pchip->chip.direction_input = pxa_gpio_direction_input; pchip->chip.direction_output = pxa_gpio_direction_output; pchip->chip.get = pxa_gpio_get; - pchip->chip.set = pxa_gpio_set; + pchip->chip.set_rv = pxa_gpio_set; pchip->chip.to_irq = pxa_gpio_to_irq; pchip->chip.ngpio = ngpio; pchip->chip.request = gpiochip_generic_request; |
