Quoting Amit Kucheria (2019-08-29 05:30:59) > On Thu, Aug 29, 2019 at 3:12 AM Stephen Boyd <swboyd@xxxxxxxxxxxx> wrote: > > > > Quoting Amit Kucheria (2019-08-27 05:14:11) > > > + thermal_zone_device_update(priv->sensor[i].tzd, > > > + THERMAL_EVENT_UNSPECIFIED); > > > + } else { > > > + dev_dbg(priv->dev, "[%u] %s: no violation: %d\n", > > > + hw_id, __func__, temp); > > > + } > > > + } > > > + > > > + return IRQ_HANDLED; > > > > Should we return IRQ_NONE in the case that the above for loop didn't > > find anything in those if/else-ifs? > > The upper/lower interrupts are non-sticky, level-triggered. So if the > temp returns to within the thresholds in the time that a IRQ was > triggered and the handler scheduled, we might not see any threshold > violations/interrupt bits set. > > It feels to me that this is a case of the IRQ being handled > (automagically) instead of IRQ_NONE. The definition of IRQ_NONE[1] > also seems to suggest that it should be used when the IRQ wasn't > handled. But it was handled in this case (although, automatically), > wasn't it? Ok I see. Sounds fine then to always return IRQ_HANDLED. Maybe you can add a comment to this effect right above the return statement.