[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d67e71e.1c69fb81.6f885.6391@mx.google.com>
Date: Thu, 29 Aug 2019 07:54:21 -0700
From: Stephen Boyd <swboyd@...omium.org>
To: Amit Kucheria <amit.kucheria@...aro.org>
Cc: Daniel Lezcano <daniel.lezcano@...aro.org>,
Mark Rutland <mark.rutland@....com>,
Rob Herring <robh+dt@...nel.org>,
Zhang Rui <rui.zhang@...el.com>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Eduardo Valentin <edubezval@...il.com>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Marc Gonzalez <marc.w.gonzalez@...e.fr>,
Brian Masney <masneyb@...tation.org>,
Linux PM list <linux-pm@...r.kernel.org>
Subject: Re: [PATCH v2 15/15] drivers: thermal: tsens: Add interrupt support
Quoting Amit Kucheria (2019-08-29 05:30:59)
> On Thu, Aug 29, 2019 at 3:12 AM Stephen Boyd <swboyd@...omium.org> 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.
Powered by blists - more mailing lists