summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJunhui Liu <junhui.liu@pigmoral.tech>2026-03-12 16:42:43 +0800
committerLinus Walleij <linusw@kernel.org>2026-03-19 13:52:56 +0100
commit47a9050e678c7929ada33c3f1f28ac4403423181 (patch)
treefb047ec367a843dac61df3eea4fde3b668518397 /drivers
parentc3b0c06b73974d75c640a4ebc8678f8538654e5a (diff)
downloadlinux-next-47a9050e678c7929ada33c3f1f28ac4403423181.tar.gz
linux-next-47a9050e678c7929ada33c3f1f28ac4403423181.zip
gpio: spacemit-k1: Add set_config callback support
Assign gpiochip_generic_config() to the set_config() callback to support pin configuration through the GPIO subsystem. This allows users to configure GPIO pin attributes like pull-up/down when specifying a GPIO line in the Device Tree. Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech> Reviewed-by: Anand Moon <linux.amoon@gmail.com> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Reviewed-by: Yixun Lan <dlan@kernel.org> Signed-off-by: Linus Walleij <linusw@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/gpio-spacemit-k1.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-spacemit-k1.c b/drivers/gpio/gpio-spacemit-k1.c
index dbd2e81094b9..5fe813b7f9bb 100644
--- a/drivers/gpio/gpio-spacemit-k1.c
+++ b/drivers/gpio/gpio-spacemit-k1.c
@@ -228,6 +228,7 @@ static int spacemit_gpio_add_bank(struct spacemit_gpio *sg,
gc->label = dev_name(dev);
gc->request = gpiochip_generic_request;
gc->free = gpiochip_generic_free;
+ gc->set_config = gpiochip_generic_config;
gc->ngpio = SPACEMIT_NR_GPIOS_PER_BANK;
gc->base = -1;
gc->of_gpio_n_cells = 3;