summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-09-02 16:14:41 +0200
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-09-03 16:08:42 +0200
commit52c62a3da80bcd17f535db00f5ea84ab16669438 (patch)
tree9f00e25c02ce3814815149622e57069201f1fa27 /drivers/pinctrl
parentpinctrl: intel: Introduce for_each_intel_gpio_group() helper et al. (diff)
downloadlinux-52c62a3da80bcd17f535db00f5ea84ab16669438.tar.xz
linux-52c62a3da80bcd17f535db00f5ea84ab16669438.zip
pinctrl: intel: Inline intel_gpio_community_irq_handler()
Since we have for_each_intel_pad_group() helper, there is no advantage of having intel_gpio_community_irq_handler(). Inline it into intel_gpio_irq(). Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/intel/pinctrl-intel.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index e7e4b0b0a4d2..75324ecdaf8d 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -1256,14 +1256,16 @@ static const struct irq_chip intel_gpio_irq_chip = {
GPIOCHIP_IRQ_RESOURCE_HELPERS,
};
-static int intel_gpio_community_irq_handler(struct intel_pinctrl *pctrl,
- const struct intel_community *community)
+static irqreturn_t intel_gpio_irq(int irq, void *data)
{
+ const struct intel_community *community;
const struct intel_padgroup *padgrp;
- struct gpio_chip *gc = &pctrl->chip;
+ struct intel_pinctrl *pctrl = data;
int ret = 0;
- for_each_intel_community_pad_group(community, padgrp) {
+ /* Need to check all communities for pending interrupts */
+ for_each_intel_pad_group(pctrl, community, padgrp) {
+ struct gpio_chip *gc = &pctrl->chip;
unsigned long pending, enabled;
unsigned int gpp, gpp_offset;
void __iomem *reg, *is;
@@ -1287,19 +1289,6 @@ static int intel_gpio_community_irq_handler(struct intel_pinctrl *pctrl,
ret += pending ? 1 : 0;
}
- return ret;
-}
-
-static irqreturn_t intel_gpio_irq(int irq, void *data)
-{
- const struct intel_community *community;
- struct intel_pinctrl *pctrl = data;
- int ret = 0;
-
- /* Need to check all communities for pending interrupts */
- for_each_intel_pin_community(pctrl, community)
- ret += intel_gpio_community_irq_handler(pctrl, community);
-
return IRQ_RETVAL(ret);
}