From patchwork Tue Oct 10 18:02:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 115423 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp4038720qgn; Tue, 10 Oct 2017 11:04:52 -0700 (PDT) X-Received: by 10.84.131.66 with SMTP id 60mr12970069pld.341.1507658692400; Tue, 10 Oct 2017 11:04:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507658692; cv=none; d=google.com; s=arc-20160816; b=ESwP+Y9VE0oQKXTulek54/jfSJRzEt/nM2hjm7jnSYGKb+PWFVqR8qzFM/08RP1hPo LugPMEUtul6oHctlvR4aV3a49OSvdbPOjvtZrBE/QuhG4H38ssDzNx4atmJDXzyU+mcL rHkpzmjSoneUy5MQVugcyTsdhprO3X3zu/Vn1Run10PvfqVxwrwecfXt8oIarhNNDYOH Ioinq87hXricg+NXq/I605CUMdqVMfL3pW5JxJHHWOjMv2voz+CJ48STVCtvXdMRCSue lIH6KZUtqzLAZYSz+DsOZuQr6dpH38a108mbAaSF46E1FjH9hJp9z6sEnE0M1C4mfOMl yW7A== 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=Lf1ESCWI0y/f9OYmICDIAnRfxIGpd+1cK+h4ukqN69gDejFwxjTjweeNUBUbr2kx6J 0Hz3j2BhxNfyz5ZehVtMHUPKYMHr1VrYhJdDfsAwUdNrWHXL9KkyIj5TW4HWjHruVL/h GAsCeoMy8vhwSidA8mTkZ7UE3OmA3pDNJvOmyQvgXuc1gOtBv6bNO8SkT48lUglMO5yQ c+jvpF+jSm74uRYqv4kIT4kopod3qrvHYgqAwOL385KxUspKPlRCK4aqFjSnciFLzoV/ XLul4MDAGw+y862Gs5xHOfqeOzLQvS68C4CoDxMkFAqJow82N3xQQeJrG7nU0eXhj0G9 291Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DaGKuJLf; 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 bh5si9251169plb.432.2017.10.10.11.04.52; Tue, 10 Oct 2017 11:04:52 -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=DaGKuJLf; 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 S1756353AbdJJSEu (ORCPT + 12 others); Tue, 10 Oct 2017 14:04:50 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:57149 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756288AbdJJSEt (ORCPT ); Tue, 10 Oct 2017 14:04:49 -0400 Received: by mail-wm0-f52.google.com with SMTP id l68so7682935wmd.5 for ; Tue, 10 Oct 2017 11:04:49 -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=DaGKuJLfz6GY/KTfCUTv6skTAlmn8omtYzBLsTMtAf8TDGce9Qqbwu3jaXVjswYoaO Yjz1y7APiSFRpqyc/jDsbuNXCznORg22ay06pzrIuZL317Oj/wdOeiap5TNE0DFwhzHz gVPXbvBRjDEFfsx+nb29scVRp3IH6vylq0WPY= 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=TqznWbvV0znBg/TW7JBrVP8RXAlc/mtV/5zBoFV64ESdBtT5ocEwiPd4JKn560Fme1 4U25c2Noy1ujLndeUFfrMknEpKvhTYirK4GdBQNbARPab18Tr93gDjWkw/274Y8Rj3jp LuR2wG3FVNRgqIIdQ+7ctixT73rO6l5iKI0PuDZd+OsFF21wzzBfCpRIkZxAiE+XPpih 5UYJecnt86eR++rmHOJ8sZp2pCBFiGh9+aTHksmWW1BddwA4AoeCqr0xAK7rcgGpqPvF upb04A2ZdetkzI55A2Rs/G4BDZNVIbVCSQ1uyB1HaWk+SgVybZCgdiu709kxwucMUQwk 5sTA== X-Gm-Message-State: AMCzsaW/B6JRMcCHtfhWNU3WA9E2HImojZClJjYK4H7P5w/cW1hxTlGq mC/CKTmFjVgYNisg/wyFnrsMow== X-Google-Smtp-Source: AOwi7QBgUPb1fkfe4T23qWhR68/hyf7b11aPAlgSYvC6uH1kiLkNaNkfbzjxwF/AR+e+JQvw4I7sRA== X-Received: by 10.223.160.119 with SMTP id l52mr10639483wrl.38.1507658688622; Tue, 10 Oct 2017 11:04:48 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:4f9:3ae1:43d2:31ae]) by smtp.gmail.com with ESMTPSA id l73sm12513428wmd.47.2017.10.10.11.04.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Oct 2017 11:04:47 -0700 (PDT) From: Daniel Lezcano To: edubezval@gmail.com, rui.zhang@intel.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, kevin.wangtao@linaro.org, Leo Yan Subject: [PATCH 01/25] thermal/drivers/hisi: Fix missing interrupt enablement Date: Tue, 10 Oct 2017 20:02:26 +0200 Message-Id: <1507658570-32675-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <79a5f10c-0fb7-3e4f-caac-c1625904b137@linaro.org> References: <79a5f10c-0fb7-3e4f-caac-c1625904b137@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; }