irqchip/loongson-liointc: Fix IRQ trigger polarity
authorJianmin Lv <lvjianmin@loongson.cn>
Wed, 14 Jun 2023 11:59:34 +0000 (19:59 +0800)
committerMarc Zyngier <maz@kernel.org>
Fri, 16 Jun 2023 11:59:28 +0000 (12:59 +0100)
commit1d7471b4e0ebba5a4bf9db4ade43619e8f2d333d
treef7be040106c71e447566e5565c73b2130883917c
parent783422e704ca0fa41cb2fe9ed79e46b6fe7eae29
irqchip/loongson-liointc: Fix IRQ trigger polarity

For the INT_POLARITY register of Loongson-2K series IRQ
controller, '0' indicates high level or rising edge triggered,
'1' indicates low level or falling edge triggered, and we
can find out the information from the Loongson 2K1000LA User
Manual v1.0, Table 9-2, Section 9.3 (中断寄存器描述 / Description
of the Interrupt Registers).

For Loongson-3 CPU series, setting INT_POLARITY register is not
supported and writting it has no effect.

So trigger polarity setting shouled be fixed for Loongson-2K CPU
series.

Fixes: 17343d0b4039 ("irqchip/loongson-liointc: Support to set IRQ type for ACPI path")
Cc: stable@vger.kernel.org
Reviewed-by: Huacai Chen <chenhuacai@kernel.org>
Co-developed-by: Chong Qiao <qiaochong@loongson.cn>
Signed-off-by: Chong Qiao <qiaochong@loongson.cn>
Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230614115936.5950-4-lvjianmin@loongson.cn
drivers/irqchip/irq-loongson-liointc.c