]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gpio: spear-spics: remove unneeded callbacks
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 25 Jun 2025 10:33:28 +0000 (12:33 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 2 Jul 2025 09:05:37 +0000 (11:05 +0200)
GPIO core can handle output-only chips that don't implement the get()
and direction_input() callbacks. There's no need to provide dummy
implementations in the driver so drop them.

Link: https://lore.kernel.org/r/20250625-gpiochip-set-rv-gpio-round2-v1-5-bc110a3b52ff@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-spear-spics.c

index 51539185400d329c5a065d7a51c27b2ae24f672c..964b7dcb30b7a5bccda964a637f7fec97fe02aa4 100644 (file)
@@ -51,12 +51,6 @@ struct spear_spics {
        struct gpio_chip        chip;
 };
 
-/* gpio framework specific routines */
-static int spics_get_value(struct gpio_chip *chip, unsigned offset)
-{
-       return -ENXIO;
-}
-
 static void spics_set_value(struct gpio_chip *chip, unsigned offset, int value)
 {
        struct spear_spics *spics = gpiochip_get_data(chip);
@@ -76,11 +70,6 @@ static void spics_set_value(struct gpio_chip *chip, unsigned offset, int value)
        writel_relaxed(tmp, spics->base + spics->perip_cfg);
 }
 
-static int spics_direction_input(struct gpio_chip *chip, unsigned offset)
-{
-       return -ENXIO;
-}
-
 static int spics_direction_output(struct gpio_chip *chip, unsigned offset,
                int value)
 {
@@ -148,9 +137,7 @@ static int spics_gpio_probe(struct platform_device *pdev)
        spics->chip.base = -1;
        spics->chip.request = spics_request;
        spics->chip.free = spics_free;
-       spics->chip.direction_input = spics_direction_input;
        spics->chip.direction_output = spics_direction_output;
-       spics->chip.get = spics_get_value;
        spics->chip.set = spics_set_value;
        spics->chip.label = dev_name(&pdev->dev);
        spics->chip.parent = &pdev->dev;