@@ -261,6 +261,8 @@ struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config
chip->names = config->names;
chip->label = config->label ?: dev_name(config->parent);
chip->can_sleep = regmap_might_sleep(config->regmap);
+ chip->request = config->request;
+ chip->free = config->free;
chip->get = gpio_regmap_get;
if (gpio->reg_set_base && gpio->reg_clr_base)
@@ -5,6 +5,7 @@
struct device;
struct fwnode_handle;
+struct gpio_chip;
struct gpio_regmap;
struct irq_domain;
struct regmap;
@@ -82,6 +83,9 @@ struct gpio_regmap_config {
unsigned int offset, unsigned int *reg,
unsigned int *mask);
+ int (*request)(struct gpio_chip *chip, unsigned int offset);
+ void (*free)(struct gpio_chip *chip, unsigned int offset);
+
void *drvdata;
};
Allow configuring gpio_chip request/free functions when creating a gpio-regmap. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> --- drivers/gpio/gpio-regmap.c | 2 ++ include/linux/gpio/regmap.h | 4 ++++ 2 files changed, 6 insertions(+)