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

From: Stefan Wahren
Date: Sat May 30 2020 - 19:34:03 EST


Hi Florian,

Am 30.05.20 um 23:19 schrieb Florian Fainelli:
>
> On 5/30/2020 12:49 AM, Stefan Wahren wrote:
>> Hi Florian,
>>
>> Am 29.05.20 um 21:15 schrieb Florian Fainelli:
>>> }
>>>
>>> +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