From patchwork Mon Sep 4 19:56:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 111603 Delivered-To: patch@linaro.org Received: by 10.140.94.166 with SMTP id g35csp1935072qge; Mon, 4 Sep 2017 12:57:37 -0700 (PDT) X-Received: by 10.84.133.111 with SMTP id 102mr1819759plf.346.1504555057388; Mon, 04 Sep 2017 12:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504555057; cv=none; d=google.com; s=arc-20160816; b=jsVR3KMaXAUJ6mp6xfG6BI9SlBl/ATbnbeEQK4grT5J4P7jzDuh6VIYXEuBfqSyl44 THfUlUxODr6qzRXgGq70bFFKxcNbolSAT+YrCl7tvIhr8fQzHlIDLz3lpFx13g8oz/jZ nDStYdTfso3ATF/7JJIeO//Dtek/aOWCSZUo/8JfLW3sO1J+VUaINyhZrrutAx6REX8v K1dfs1akDjVxiQAZnyHREPSIIMIPmn0KIHCLBWhK4uPsOuJnV8gow1VAtAz0WYcyGden veTgc0GkhPyMCcIu/rhxodEtzDn1JW5UWW8NmBBzuEU8ak5Jp89IWsZEAOjFAbfcxuMe TwVA== 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=9mRtfZLSLgWOn6G7+Ddy+JCYVSrWjeU3WoTVo6SXWdw=; b=TWDLMXXVDB9DGI3qUedjKOn5We9eICw1zFPPQizwm40NUzCTjPWij+caYGjyouz4/W 9irrhmxA3yrWnmJ3QaBQJG8TpeSgQHRvnDQIZi8uUwPTDV5awlWNqZNz/EBy0D/HrPOL P7onbHO/K8PMebOTMKciHpAbKnB0un8XedwXIbpNKadskylWR0Wn+6E2dl+rOkrd3ElW tOav4rs2atScv4bdd+qbV8n2KeniyInjzssVAlxWy+u0ki6p+PHCSWc8nY+d9URNmnhi 8VT2CKvx94cu7BKw24tC5duyOupfC8kBkRFmUSaMuIILgQkAwknUmbpEdXaS2D2IrO01 aZ9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EqahFVVL; 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 b71si4260418pli.163.2017.09.04.12.57.36; Mon, 04 Sep 2017 12:57:37 -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=EqahFVVL; 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 S1753973AbdIDT5e (ORCPT + 12 others); Mon, 4 Sep 2017 15:57:34 -0400 Received: from mail-wr0-f178.google.com ([209.85.128.178]:35500 "EHLO mail-wr0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753953AbdIDT5e (ORCPT ); Mon, 4 Sep 2017 15:57:34 -0400 Received: by mail-wr0-f178.google.com with SMTP id y15so4042639wrc.2 for ; Mon, 04 Sep 2017 12:57:33 -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=9mRtfZLSLgWOn6G7+Ddy+JCYVSrWjeU3WoTVo6SXWdw=; b=EqahFVVL0sg9sgjoKF2Kv+ULtobcqEyu8J7NEsswUL5pVU6GA45dLNkhqfXKhxu+Dk UXgLcqHSHZvBJX2H/7JBqLK+s9F1vZ0AwihHiHb4EJ2s5mnY+HNO6MJSD5ZMrZt6RTKU os/uweg+dC3MHh3SA00n7dQjGVsZ9uk9lSm4Y= 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=9mRtfZLSLgWOn6G7+Ddy+JCYVSrWjeU3WoTVo6SXWdw=; b=tYDgh7ZceA2SiBCDwb0JgvmZsFVb0N+A0Ku2/GP9HJstmSdAq+6zZQzb4Ic+gXGBzw YK3hCSjbol5V0VNQiVar6Wj8Tr4lC7bYEyHN2XXOzI/0meZdhXIRb7SNbb3qg3jIXZPb LZOQ+mhW3FYODrbflkG150hkDnmIGBeA6qTLaTZ+Zyzkq2GPcSmqONbwKU2H1oqu6p6a 8zBLS2Q5edEZsOZvQ3g+iDf832jeDTrb/16Ij2P1jND6ua5Jl8pwQkQoxRczLBI8SMdI fTaZbN0DgiroO8neZmnz1zrfE/2sq6T5P6D48RUvQQs7bQOKoF5mv+XwqcoV4clBCNIO DijA== X-Gm-Message-State: AHPjjUhSuMqJboeXbHHKjgM334C+ChPjNHbHuy73UmARp0lY4vtbY/7C szbn98+hwRePYaEA X-Google-Smtp-Source: ADKCNb4/UT4uSTMMuMQRFONQ1NeAIUfgGUq8C/xmmNrJ5zv3Tm+8NsXShscUrpaCmj6g4cQOHrSjsw== X-Received: by 10.223.184.246 with SMTP id c51mr1007414wrg.310.1504555052913; Mon, 04 Sep 2017 12:57:32 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:f567:7c41:be9d:9286]) by smtp.gmail.com with ESMTPSA id 23sm10798976wrt.44.2017.09.04.12.57.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Sep 2017 12:57:32 -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 Subject: [PATCH V2 01/13] thermal/drivers/hisi: Fix missing interrupt enablement Date: Mon, 4 Sep 2017 21:56:00 +0200 Message-Id: <1504554972-2624-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 Reviewed-by: Leo Yan Tested-by: Leo Yan --- drivers/thermal/hisi_thermal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.7.4 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; }