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: 10017811 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D8E9B602C8 for ; Thu, 19 Oct 2017 17:08:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C460128B9C for ; Thu, 19 Oct 2017 17:08:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B907D28DD4; Thu, 19 Oct 2017 17:08:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4212328B9C for ; Thu, 19 Oct 2017 17:08:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753473AbdJSRIc (ORCPT ); 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 X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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; }