diff options
| author | Yu-Chun Lin <eleanor.lin@realtek.com> | 2026-07-26 20:51:58 +0800 |
|---|---|---|
| committer | Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> | 2026-07-30 11:05:07 +0200 |
| commit | ab91ecbc322424916efea4c4e6220e2046a80e8a (patch) | |
| tree | c775aa0c5f4ccdd354d08e7aca326e0febe65ce1 /include/linux | |
| parent | 5f28e3dbd23199c778f5339c0d4488820435f6d5 (diff) | |
gpio: regmap: Add set_config callback
Add a new set_config callback to allow drivers to implement
hardware-specific configuration such as debounce settings, or other
platform-specific GPIO properties.
Reviewed-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com>
Link: https://patch.msgid.link/20260726125209.140307-8-eleanor.lin@realtek.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/gpio/regmap.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/gpio/regmap.h b/include/linux/gpio/regmap.h index 77dbb353bc1f..dd9de9958409 100644 --- a/include/linux/gpio/regmap.h +++ b/include/linux/gpio/regmap.h @@ -86,6 +86,9 @@ enum gpio_regmap_operation { * to append additional bits (like write-enable masks) * dynamically based on the current operation * (GPIO_REGMAP_SET_OP and GPIO_REGMAP_SET_DIR_OP). + * @set_config: (Optional) Callback for setting GPIO configuration such + * as debounce, drive strength, or other hardware specific + * settings. * @drvdata: (Optional) Pointer to driver specific data which is * not used by gpio-remap but is provided "as is" to the * driver callback(s). @@ -147,6 +150,9 @@ struct gpio_regmap_config { unsigned int base, unsigned int offset, unsigned int reg, unsigned int *mask, unsigned int *val); + int (*set_config)(struct gpio_regmap *gpio, struct gpio_chip *chip, + unsigned int offset, unsigned long config); + void *drvdata; }; |
