mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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>
This commit is contained in:
parent
c3b0c06b73
commit
47a9050e67
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user