Thread (10 messages) 10 messages, 3 authors, 2020-05-30

Re: [PATCH v2 4/4] pinctrl: bcm2835: Add support for wake-up interrupts

From: Stefan Wahren <hidden>
Date: 2020-05-30 23:30:41
Also in: linux-arm-kernel, linux-gpio, lkml

Hi Florian,

Am 30.05.20 um 23:19 schrieb Florian Fainelli:
On 5/30/2020 12:49 AM, Stefan Wahren wrote:
quoted
Hi Florian,

Am 29.05.20 um 21:15 schrieb Florian Fainelli:
quoted
 }
 
+static int bcm2835_gpio_irq_set_wake(struct irq_data *data, unsigned int on)
+{
+	struct gpio_chip *chip = irq_data_get_irq_chip_data(data);
+	struct bcm2835_pinctrl *pc = gpiochip_get_data(chip);
+	unsigned gpio = irqd_to_hwirq(data);
+	unsigned int irqgroup;
+	int ret = -EINVAL;
+
+	if (!pc->wake_irq)
+		return ret;
+
+	if (gpio <= 27)
+		irqgroup = 0;
+	else if (gpio >= 28 && gpio <= 45)
+		irqgroup = 1;
+	else if (gpio >= 46 && gpio <= 53)
+		irqgroup = 2;
in case the BCM7211 has 58 GPIOs, but the wake up interrupts are only
available for the first 54 this should deserve a comment.
irqgroup 2 covers GPIOs 46 through 57, thanks for noticing. Do you have
more comments before I spin a v3? Thank you for reviewing.
no, i don't.

Regards
Stefan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help