Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2416986ybl; Thu, 29 Aug 2019 07:55:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRcVSiC5f2ertXMraymaGcdox1Qk87eokyQEE9pJ+PDtLVERTogsKNXAzXhf216qqNBKck X-Received: by 2002:a62:be04:: with SMTP id l4mr9257435pff.247.1567090538972; Thu, 29 Aug 2019 07:55:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567090538; cv=none; d=google.com; s=arc-20160816; b=zs+YE5rmzE0d4MBW/oUHnz3i3af1Yhv1QtmrVCIb/rWbnFQ2Y3870/96Ke89s7OmXz +0v753Z28rvzHWCIrTFG+FpLFJnNPrzUlkCLOk2ox6IUMUVGPWIRjKDIEUcLan9v8E3k NDHO+IHBd2ofJeWPJZ2IkVKjRIXoDnjp/TMOmtsSxSfhH3QiHSf3guOfY3O71YKjK6Sa VESDYBXB6Kdhf/+lXgZ1XSC7aeCOhy8xWq0HqQs8DWwH0YXnENIEfy1y35QHGXepp7ta /UScxO18E8TY5pcE1xmeKzd7UhdsdvBdprmEKMKJ0G/i7+5TJnbtQFVBxQMNMiFZD7V9 +1AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:user-agent:from:to:subject:cc :references:in-reply-to:content-transfer-encoding:mime-version :message-id:dkim-signature; bh=GCLBREhsH0y+iPt4sZdcYSbSFOKA3tBuxEXbqgrezQs=; b=ARN8DyjcF4O2AmqW41JkPLP17q2HT66cl4EbmhaivqiwjuFu1BYwOLQGEysNJ7pR8m uw2dHUWmbVfahB/bQIpMCErtnglL6kWOLRVuRslx3QA7BfNHCnuqjlNNoQLrzgmnWRTX kEt3QTgzK4Pyq/2v0XwKh4c7zM/cCJPxuECPNwUKYj96ZMhPLuDDdmafC2DqYbelxw4y gMC5EIEs/cT/rfb8Xv5FVhJH5FaIiQy/rPOkRh9+urNHp+5LVT7TGLifbXofvHxew9dn ZlvPA8N0OLeULwiwoqcm4UWUOvvBCumrm+RTkKqmNuVyFRWBJYbFaJ0XjhTE51WVgsjT QW0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GodzQTP7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t126si2921605pfc.126.2019.08.29.07.55.23; Thu, 29 Aug 2019 07:55:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GodzQTP7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728538AbfH2OyY (ORCPT + 99 others); Thu, 29 Aug 2019 10:54:24 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:41578 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727144AbfH2OyY (ORCPT ); Thu, 29 Aug 2019 10:54:24 -0400 Received: by mail-pl1-f194.google.com with SMTP id m9so1686655pls.8 for ; Thu, 29 Aug 2019 07:54:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=message-id:mime-version:content-transfer-encoding:in-reply-to :references:cc:subject:to:from:user-agent:date; bh=GCLBREhsH0y+iPt4sZdcYSbSFOKA3tBuxEXbqgrezQs=; b=GodzQTP7hIIoeFf5qkuQPtLv5FVme1IU5vK2YxaYFRfsd1+IIn7ODeDG9/hkE9TIzT ZVaAR2V8JaM0aV7K3VGFj+Np41A23tJulYB9IWiY9oOAy0Ug7au3VF+WOffZ5AZBPL7Z oxaXKYOIr+rFyeoJgVEWdvwhpUI6iWfCjLQk4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:mime-version :content-transfer-encoding:in-reply-to:references:cc:subject:to:from :user-agent:date; bh=GCLBREhsH0y+iPt4sZdcYSbSFOKA3tBuxEXbqgrezQs=; b=advkI5ikIJ9UsZpJRrzS8RzHmT4g8rpxZNuZ1wrldWUzmeP4m5FGh+c10h2YiqHgYo noHXnZp774drb/qA9r6gHx3exq4Nu233xIOIdmVrESVkgodWpo9tUHD4AwUq1wtoVR++ dnInawsqC6k6kX+OhC3Ra9jDTY5NHXdeSVpUbj+BkLYhNI80ZafuxTOFgSLhc2eJAo+c ulhdht6oUPts8FLyKL+yKPYkTZb11wHLHCSpm0/hH0SpuBKRQ+69RBPOqtTGNUdctDID iiHhMzZwQEva127A8hU7b+hK8ljOzAZIhH21o5rAEcmm0Yu4CWLki8fHmGw/qcE2udm2 Mung== X-Gm-Message-State: APjAAAXpjcXZHdLoeKrpI2I8gYJenKAmq4H7tRA+cIuA/UcicDwma1Ny okU5Iyte/YGsbIkXVP8ei1hPSw== X-Received: by 2002:a17:902:6a84:: with SMTP id n4mr10430031plk.109.1567090463353; Thu, 29 Aug 2019 07:54:23 -0700 (PDT) Received: from chromium.org ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id z68sm2717912pgz.88.2019.08.29.07.54.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 07:54:22 -0700 (PDT) Message-ID: <5d67e71e.1c69fb81.6f885.6391@mx.google.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <5d66f545.1c69fb81.3663f.129d@mx.google.com> Cc: Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui , Andy Gross , Bjorn Andersson , Eduardo Valentin , linux-arm-msm , Linux Kernel Mailing List , Marc Gonzalez , Brian Masney , Linux PM list Subject: Re: [PATCH v2 15/15] drivers: thermal: tsens: Add interrupt support To: Amit Kucheria From: Stephen Boyd User-Agent: alot/0.8.1 Date: Thu, 29 Aug 2019 07:54:21 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Amit Kucheria (2019-08-29 05:30:59) > On Thu, Aug 29, 2019 at 3:12 AM Stephen Boyd wrote: > > > > Quoting Amit Kucheria (2019-08-27 05:14:11) > > > + thermal_zone_device_update(priv->sensor[i].tz= d, > > > + THERMAL_EVENT_UNSP= ECIFIED); > > > + } 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? >=20 > 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. >=20 > 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.