mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
gpio: regmap: Add IRQ enable/disable helpers
Add gpio_regmap_enable_irq() and gpio_regmap_disable_irq(). Since struct gpio_regmap is opaque, drivers cannot access the embedded gpio_chip directly. Reviewed-by: Michael Walle <mwalle@kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> Link: https://patch.msgid.link/20260726125209.140307-9-eleanor.lin@realtek.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
This commit is contained in:
committed by
Bartosz Golaszewski
parent
ab91ecbc32
commit
de36d18cfc
@@ -346,6 +346,18 @@ void *gpio_regmap_get_drvdata(struct gpio_regmap *gpio)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gpio_regmap_get_drvdata);
|
||||
|
||||
void gpio_regmap_enable_irq(struct gpio_regmap *gpio, irq_hw_number_t hwirq)
|
||||
{
|
||||
gpiochip_enable_irq(&gpio->gpio_chip, hwirq);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gpio_regmap_enable_irq);
|
||||
|
||||
void gpio_regmap_disable_irq(struct gpio_regmap *gpio, irq_hw_number_t hwirq)
|
||||
{
|
||||
gpiochip_disable_irq(&gpio->gpio_chip, hwirq);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gpio_regmap_disable_irq);
|
||||
|
||||
/**
|
||||
* gpio_regmap_register() - Register a generic regmap GPIO controller
|
||||
* @config: configuration for gpio_regmap
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#ifndef _LINUX_GPIO_REGMAP_H
|
||||
#define _LINUX_GPIO_REGMAP_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct device;
|
||||
struct fwnode_handle;
|
||||
struct gpio_regmap;
|
||||
@@ -165,4 +167,7 @@ void *gpio_regmap_get_drvdata(struct gpio_regmap *gpio);
|
||||
int gpio_regmap_reqres_irq(struct gpio_regmap *gpio, unsigned int offset);
|
||||
void gpio_regmap_relres_irq(struct gpio_regmap *gpio, unsigned int offset);
|
||||
|
||||
void gpio_regmap_enable_irq(struct gpio_regmap *gpio, irq_hw_number_t hwirq);
|
||||
void gpio_regmap_disable_irq(struct gpio_regmap *gpio, irq_hw_number_t hwirq);
|
||||
|
||||
#endif /* _LINUX_GPIO_REGMAP_H */
|
||||
|
||||
Reference in New Issue
Block a user