staging: hikey9xx: hi6421-spmi-pmic: fix IRQ handler code
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 29 Jan 2021 19:51:52 +0000 (20:51 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 Jan 2021 12:44:35 +0000 (13:44 +0100)
The conversion to regmap introduced a regression at the code
which reads from the IRQ register. Address that.

Fixes: fb02e3ebfb2d ("staging: hikey9xx: spmi driver: convert to regmap")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/2eae710c333a8ee6f9e0a086c84115bc90a782ca.1611949675.git.mchehab+huawei@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/hikey9xx/hi6421-spmi-pmic.c

index 909f7b1..48e4f92 100644 (file)
@@ -66,7 +66,7 @@ static irqreturn_t hi6421_spmi_irq_handler(int irq, void *priv)
        int i, offset;
 
        for (i = 0; i < HISI_IRQ_ARRAY; i++) {
-               regmap_read(ddata->regmap, offset, &data);
+               regmap_read(ddata->regmap, SOC_PMIC_IRQ0_ADDR + i, &data);
                data &= HISI_MASK_FIELD;
                if (data != 0)
                        pr_debug("data[%d]=0x%d\n\r", i, data);