From patchwork Thu Oct 19 17:05:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 116414 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp721529qgn; Thu, 19 Oct 2017 10:08:33 -0700 (PDT) X-Received: by 10.98.209.88 with SMTP id t24mr2136465pfl.269.1508432913344; Thu, 19 Oct 2017 10:08:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508432913; cv=none; d=google.com; s=arc-20160816; b=Vh4NB2g1Tc691o273o0qjveoHtovwXuaudH79cjur/l9EbwtjJzzQ+gYArf6L0Y7oH /z1sP+xZToS/YNhrcNOobthV011q06Ha55esIXfPI0IP8BoDpNXR37b789ZuHIhgTJXJ cHV4oCHNiz4u8uWDlnOL7/i+cziEx88oAACOzM2ina2Ut1j9LjBvNkyOM/MyxX4YrhdB sOUJFsnwZpSf8jdJpeb8V2VUMiQwX6JJejIgNWR7MK6KwNRz69W6PHJZaincirC6Ib4N 5sg464xrtsz+lZ9oDCdUQGqqZmjYonI4pSWdUZe9lAIozZcaI3DzDJflSfDHyN1hq5y7 /+Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=/+R8+WARc0bg2kwO5tllsXPzLLUBegXV48E2koztXnQ=; b=gpStGOG7/s5WKtL2nm6e7NnoAq8mluPuSoAukhf2NnErmvRqTEo/merq7QzWRbXAyI A+1Opj2/HBo9mfIbH2x0dl1aXiZTUCAQhByRefFkJUX8UhsaHTozOsqTc8cWvY5zRLww 9snEO73SEAQFYW/mYCxtCyES/7HSq6ggRHJI3M+KYKyZOvsfSMhTZxgtZNKH4Qy5iz78 yKdq0TLk5X/xDGK05OaibRd9R/7Uc+pU+lHkBoFz6eBOlN1YqVZYjRm4tHYtrR7kaBIz cqK7q/kn4U7Jg9Qk8Q430vr5AO8XXHd+J8S0I33/UAT14a/BrkukpF9ugGlvhrIWJF7o iTLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Fhaf68ae; 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 v1si3120569pgq.533.2017.10.19.10.08.33; Thu, 19 Oct 2017 10:08:33 -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=Fhaf68ae; 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 S1753473AbdJSRIc (ORCPT + 12 others); Thu, 19 Oct 2017 13:08:32 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:47680 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753422AbdJSRIb (ORCPT ); Thu, 19 Oct 2017 13:08:31 -0400 Received: by mail-wm0-f65.google.com with SMTP id t69so17362160wmt.2 for ; Thu, 19 Oct 2017 10:08:30 -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:in-reply-to:references; bh=/+R8+WARc0bg2kwO5tllsXPzLLUBegXV48E2koztXnQ=; b=Fhaf68aeYlwHhAyKU/cfGuJcXIn+431b7SldR/G/pVwZAPdNjU8QhZG7tvIH/ri0rj bNgmelMhSu8xHnJGVC3KFNyF+iARz/sHQ3YV5R/PpCczWiMpRQl4RDGJIJ6+2p7Y3ShZ nYyHojWjGbpas4X5ozOPyNpZGOkhGzkbCr80o= 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:in-reply-to :references; bh=/+R8+WARc0bg2kwO5tllsXPzLLUBegXV48E2koztXnQ=; b=B6h5R5wzv0/BE/yXJBOzkh9cFfq2cfA08w1CrBhnOjvW01z4GuS0IazC3ASbAfexfj zImiCY0IixWQINdiEiCF0XeV9GEPuGxcpIlGVw2DsRhGZB8vW3ie3ATWgAgpEeUSWuxK q0lXpyvd5NCqvbk0whO3S3OnY2kUEZo9TZSQ0xFs/tTR3H29i1lrypgifPjrnhSmBGH7 oyu1iteOi+OJgv6c/XRuQBnxm/CtrdDfhlQ2sQSEHEErplNX4HiFEQfVFP39Cqbq7ORZ IRQSIykg3xp0JI0D2FpD256R5OI0SDRH8srshb/5bm58gz9snNaCL5hKXYw+iFo+bt/P kQzg== X-Gm-Message-State: AMCzsaWSXCBqXstF35lrXZqobbrQYeJiTF78TlX9rh0469CsjaRBqJVg PBzh8LR6fo4lhwg9vrTeZntsNg== X-Google-Smtp-Source: ABhQp+QBQWd81/5cbxg3afpT+bNHT3Po8tiMyUTaUBTZHjnhJAdX7+kodMfi0adoXZPAB2wPN3Bh0Q== X-Received: by 10.28.134.18 with SMTP id i18mr2513696wmd.27.1508432909785; Thu, 19 Oct 2017 10:08:29 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:51c7:d9b7:e14b:6840]) by smtp.gmail.com with ESMTPSA id g16sm14277394wrd.72.2017.10.19.10.08.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Oct 2017 10:08:29 -0700 (PDT) From: Daniel Lezcano To: edubezval@gmail.com, rui.zhang@intel.com Cc: linux-pm@vger.kernel.org, leo.yan@linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/18] thermal/drivers/hisi: Fix missing interrupt enablement Date: Thu, 19 Oct 2017 19:05:43 +0200 Message-Id: <1508432760-17847-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <6ac48f08-7fe6-92e9-0801-6ed3bcd05ff1@linaro.org> References: <6ac48f08-7fe6-92e9-0801-6ed3bcd05ff1@linaro.org> 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 9c3ce34..f3b50b0 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; }