Hello :)
+#define INTSTAT_FALL2 BIT(24)
+#define INTSTAT_FALL1 BIT(20)
+#define INTSTAT_FALL0 BIT(16)
+#define INTSTAT_RISE2 BIT(8)
+#define INTSTAT_RISE1 BIT(4)
+#define INTSTAT_RISE0 BIT(0)
+
+#define INTCLEAR_FALL2 BIT(24)
+#define INTCLEAR_FALL1 BIT(20)
+#define INTCLEAR_FALL0 BIT(16)
+#define INTCLEAR_RISE2 BIT(8)
+#define INTCLEAR_RISE1 BIT(4)
+#define INTCLEAR_RISE0 BIT(0)
+ /* Map INTSTAT bits to INTCLEAR bits */
+ if (val_irq & INTSTAT_FALL2)
+ clearirq |= INTCLEAR_FALL2;
+ else if (val_irq & INTSTAT_FALL1)
+ clearirq |= INTCLEAR_FALL1;
+ else if (val_irq & INTSTAT_FALL0)
+ clearirq |= INTCLEAR_FALL0;
+ else if (val_irq & INTSTAT_RISE2)
+ clearirq |= INTCLEAR_RISE2;
+ else if (val_irq & INTSTAT_RISE1)
+ clearirq |= INTCLEAR_RISE1;
+ else if (val_irq & INTSTAT_RISE0)
+ clearirq |= INTCLEAR_RISE0;
This implies that only these 6 bits are used. Is this true for all SoCs
supported by this driver? My understanding is that Exynos 5433 in particular
uses bits 7:0 for rise interrupts and 23:16 for fall interrupts. When I tested
this patch (both alone and the whole series) on 5433 by running some CPU load,
the interrupt seemed to not fire consistently:
/sys/class/thermal/cooling_device1/cur_state would never go above 1 (which is
consistent with the interrupt firing once, not getting cleared and never firing
again; without this patch, it consistently went up to 6) and I got a quick
reboot every time.
Thank you,
Mateusz Majewski