From patchwork Wed Aug 30 08:47:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 111280 Delivered-To: patch@linaro.org Received: by 10.140.95.112 with SMTP id h103csp594923qge; Wed, 30 Aug 2017 01:48:47 -0700 (PDT) X-Google-Smtp-Source: ADKCNb5IWBQ2LckJT2RUkFQe3lFpHDAaVbDHcYiUhEpckCgFZRov/1bSZrXwWo2XwR6dKe8MdlFT X-Received: by 10.99.5.80 with SMTP id 77mr808243pgf.123.1504082927025; Wed, 30 Aug 2017 01:48:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504082927; cv=none; d=google.com; s=arc-20160816; b=IN0PrS4UBHrtequeTnYnfuc5exscoAZTCzhPBDc9kbRBZZ+qX5iVj1279P3JMBpnlz gyLeUU8sCmuqGcpXOtYbd/3SzJZ8kjyySDP1spkavQOs5dcJLRrIALdTGwYgqs6Q9Ike 4a32QZzjHOU0KqevxC0EtZkzFn4XBL67mrWr3EYSgw7K70w3EPKSnOLgKF8wnmt2xczw geyDXVCeeeC9x67L/MKtWeKpdv5ZznfFmZaF6Ail3mD9IW0cG/dOTLj7aj32dz+qK8N8 TsuEt47c1wjmsCJkEoSmdoSI7k0eqtwV6h1OE1g6qKIkwO8pQxPq3NKJ0YKdyaahY7cK eB7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=YiiH7NYEAO/UOamWR9f2Rz1Vgy7Bb3LIy2EJe955KuU=; b=Gmrg3LOtTppzrRBSL9iDP5VHj504A+DSDfvyL2oUn0//iNMO4uGqL06xyXV7u1pU83 cIazmOGFL7TU0ERoByl2X53xWMwz2PvoWeHeTzzUAOrNe2RfgnbQgvI1kERYfNnzVbNQ BNBZ0M2R7/DnFqhvMrdirknCqwQunZ0vP+GP+YjAT15Q90932jl+7U3tx23NdJwXn3NJ XiTS8PWDRIxRddU849PYqrXtZusOh3T+0+EStvX4lx8IzWYlVlEz8DXjF1OgctlVTo1Z cYMLSxJXcPS2AXaqXaNq/60uE3rG5DPmBPTyS6l8UnvCpdd89cLmTPho7rrmLRj17nRU JdgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LezZq4O0; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v12si4013779pfl.553.2017.08.30.01.48.46; Wed, 30 Aug 2017 01:48:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=@linaro.org header.s=google header.b=LezZq4O0; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751318AbdH3Isp (ORCPT + 12 others); Wed, 30 Aug 2017 04:48:45 -0400 Received: from mail-wr0-f173.google.com ([209.85.128.173]:37651 "EHLO mail-wr0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751271AbdH3Isp (ORCPT ); Wed, 30 Aug 2017 04:48:45 -0400 Received: by mail-wr0-f173.google.com with SMTP id k9so4227329wre.4 for ; Wed, 30 Aug 2017 01:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=YiiH7NYEAO/UOamWR9f2Rz1Vgy7Bb3LIy2EJe955KuU=; b=LezZq4O0rQOpKmS9W9kIjIj5yqwbownn13J4kPz5fuAdsdR2D74r7Csv4MvxhoGYzk Gon/8JHtXkWFCOEmif2QJFm6x2ba+YNzD+QDE5uRHEMFeMyyhyifn9IxfBrid6kIruZQ pCfU7V5ZSUrL5aGd+R6winHCwCO2ho63Nk/O4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YiiH7NYEAO/UOamWR9f2Rz1Vgy7Bb3LIy2EJe955KuU=; b=ZMvxI9KCY9TzW05JwtnnLKUi4QB5DJLWOYO1QkJjUKqJPBQ2ILnbvDUBLYMEHsvB5b AnAQMjDahDw3m6PnZnlfDoZc93TiX+xuMZJ9his7qTz/UxH1y2p20r8YJOsbFkLXzI6r M5uKD2W4MXm9CnFS090n7+ddoztn8iYAwh3xwchI1P5vpvrPEgSzM2K94Zjy3zhGwE4I 1xm8nM4SkY26NT7NAzPKmb/hf5I6oir/Eo2c9KCHOUZGLfEnTfOHupJnwj78cPZFFPBN 9nYh4c6tr5G8wwrlqedpj+ztMTpB7XMsQvyCvEfMZyfthtjMweWHmze025bnkYhDQpms 3o9w== X-Gm-Message-State: AHYfb5hhBHFkm3iJrppVuQPP7+XS6ctkQuCWFAdLdqTMgtUbEGICaolK YWaRgcYdcAkdSnlLbhFPrQ== X-Received: by 10.223.133.245 with SMTP id 50mr598022wru.22.1504082923943; Wed, 30 Aug 2017 01:48:43 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:b0b0:ba2b:b9fd:8a33]) by smtp.gmail.com with ESMTPSA id q24sm4032811wrc.26.2017.08.30.01.48.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 30 Aug 2017 01:48:43 -0700 (PDT) From: Daniel Lezcano To: rui.zhang@intel.com, edubezval@gmail.com Cc: daniel.lezcano@linaro.org, linux-pm@vger.kernel.org, kevin.wangtao@linaro.org, leo.yan@linaro.org, linux-kernel@vger.kernel.org (open list) Subject: [PATCH 01/13] thermal/drivers/hisi: Fix missing interrupt enablement Date: Wed, 30 Aug 2017 10:47:25 +0200 Message-Id: <1504082857-21702-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The interrupt for the temperature threshold is not enabled at the end of the probe function, enable it after the setup is complete. On the other side, the irq_enabled is not correctly set as we are checking if the interrupt is masked where 'yes' means irq_enabled=false. irq_get_irqchip_state(data->irq, IRQCHIP_STATE_MASKED, &data->irq_enabled); As we are always enabling the interrupt, it is pointless to check if the interrupt is masked or not, just set irq_enabled to 'true'. Signed-off-by: Daniel Lezcano --- drivers/thermal/hisi_thermal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.7.4 Reviewed-by: Leo Yan Tested-by: Leo Yan Reviewed-by: Leo Yan Reviewed-by: Leo Yan Reviewed-by: Leo Yan Tested-by: Leo Yan Reviewed-by: Leo Yan Tested-by: Leo Yan diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index bd3572c..8381696 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -345,8 +345,7 @@ static int hisi_thermal_probe(struct platform_device *pdev) } hisi_thermal_enable_bind_irq_sensor(data); - irq_get_irqchip_state(data->irq, IRQCHIP_STATE_MASKED, - &data->irq_enabled); + data->irq_enabled = true; for (i = 0; i < HISI_MAX_SENSORS; ++i) { ret = hisi_thermal_register_sensor(pdev, data, @@ -358,6 +357,8 @@ static int hisi_thermal_probe(struct platform_device *pdev) hisi_thermal_toggle_sensor(&data->sensors[i], true); } + enable_irq(data->irq); + return 0; }