[V1,4/4] irqchip/loongson-liointc: Add IRQCHIP_SKIP_SET_WAKE flag

Message ID 20230520063818.27208-5-lvjianmin@loongson.cn
State New
Headers
Series irqchip/loongson: Fix some loongson irqchip drivers |

Commit Message

吕建民 May 20, 2023, 6:38 a.m. UTC
  From: Yinbo Zhu <zhuyinbo@loongson.cn>

Liointc doesn't require specific logic to work with wakeup IRQs,
and no irq_set_wake callback is needed. To allow registered IRQs
from liointc to be used as a wakeup-source, and ensure irq_set_irq_wake()
works well, the flag IRQCHIP_SKIP_SET_WAKE should be added.

Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn>
Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn>
---
 drivers/irqchip/irq-loongson-liointc.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Huacai Chen May 20, 2023, 8:43 a.m. UTC | #1
Hi, Jianmin,

On Sat, May 20, 2023 at 2:38 PM Jianmin Lv <lvjianmin@loongson.cn> wrote:
>
> From: Yinbo Zhu <zhuyinbo@loongson.cn>
>
> Liointc doesn't require specific logic to work with wakeup IRQs,
> and no irq_set_wake callback is needed. To allow registered IRQs
> from liointc to be used as a wakeup-source, and ensure irq_set_irq_wake()
> works well, the flag IRQCHIP_SKIP_SET_WAKE should be added.
Maybe using LIOINTC instead of Liointc/liointc is better in commit
message. Except this small issue, for the whole series,
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>

>
> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn>
> Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn>
> ---
>  drivers/irqchip/irq-loongson-liointc.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c
> index 9a9c2bf048a3..dbd1ccce0fb2 100644
> --- a/drivers/irqchip/irq-loongson-liointc.c
> +++ b/drivers/irqchip/irq-loongson-liointc.c
> @@ -291,6 +291,7 @@ static int liointc_init(phys_addr_t addr, unsigned long size, int revision,
>         ct->chip.irq_mask = irq_gc_mask_disable_reg;
>         ct->chip.irq_mask_ack = irq_gc_mask_disable_reg;
>         ct->chip.irq_set_type = liointc_set_type;
> +       ct->chip.flags = IRQCHIP_SKIP_SET_WAKE;
>
>         gc->mask_cache = 0;
>         priv->gc = gc;
> --
> 2.31.1
>
>
  
吕建民 May 22, 2023, 9 a.m. UTC | #2
On 2023/5/20 下午4:43, Huacai Chen wrote:
> Hi, Jianmin,
> 
> On Sat, May 20, 2023 at 2:38 PM Jianmin Lv <lvjianmin@loongson.cn> wrote:
>>
>> From: Yinbo Zhu <zhuyinbo@loongson.cn>
>>
>> Liointc doesn't require specific logic to work with wakeup IRQs,
>> and no irq_set_wake callback is needed. To allow registered IRQs
>> from liointc to be used as a wakeup-source, and ensure irq_set_irq_wake()
>> works well, the flag IRQCHIP_SKIP_SET_WAKE should be added.
> Maybe using LIOINTC instead of Liointc/liointc is better in commit
> message. Except this small issue, for the whole series,
> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
> 
Ok, I'll change it, thanks.

>>
>> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn>
>> Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn>
>> ---
>>   drivers/irqchip/irq-loongson-liointc.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c
>> index 9a9c2bf048a3..dbd1ccce0fb2 100644
>> --- a/drivers/irqchip/irq-loongson-liointc.c
>> +++ b/drivers/irqchip/irq-loongson-liointc.c
>> @@ -291,6 +291,7 @@ static int liointc_init(phys_addr_t addr, unsigned long size, int revision,
>>          ct->chip.irq_mask = irq_gc_mask_disable_reg;
>>          ct->chip.irq_mask_ack = irq_gc_mask_disable_reg;
>>          ct->chip.irq_set_type = liointc_set_type;
>> +       ct->chip.flags = IRQCHIP_SKIP_SET_WAKE;
>>
>>          gc->mask_cache = 0;
>>          priv->gc = gc;
>> --
>> 2.31.1
>>
>>
> _______________________________________________
> Loongson-kernel mailing list -- loongson-kernel@lists.loongnix.cn
> To unsubscribe send an email to loongson-kernel-leave@lists.loongnix.cn
>
  

Patch

diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c
index 9a9c2bf048a3..dbd1ccce0fb2 100644
--- a/drivers/irqchip/irq-loongson-liointc.c
+++ b/drivers/irqchip/irq-loongson-liointc.c
@@ -291,6 +291,7 @@  static int liointc_init(phys_addr_t addr, unsigned long size, int revision,
 	ct->chip.irq_mask = irq_gc_mask_disable_reg;
 	ct->chip.irq_mask_ack = irq_gc_mask_disable_reg;
 	ct->chip.irq_set_type = liointc_set_type;
+	ct->chip.flags = IRQCHIP_SKIP_SET_WAKE;
 
 	gc->mask_cache = 0;
 	priv->gc = gc;