From patchwork Tue Sep 8 15:25:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 264328 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B207C43461 for ; Tue, 8 Sep 2020 17:15:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 585A32087D for ; Tue, 8 Sep 2020 17:15:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599585358; bh=JIERlWPZq59t8PAI+bTxWU/oU1gNX/FDw8yrp5HCbYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=l6zQDs81WWdSpTuFuV+9thwE2Ci+26AXwdqjLkIq9UsusUGhdI7Y2HxZOCKfFENfk tLFKgTUM3JH6u8NcljvnYsnrm90Z+kI4nD8iIBNetsfUpIFjuAypPtB/P1pCpTpr3a 1m7G61s/SshK7FP2Zv6XE1IBq4iL8iKnsxzeXZbI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729860AbgIHRPk (ORCPT ); Tue, 8 Sep 2020 13:15:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:58436 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731635AbgIHQSx (ORCPT ); Tue, 8 Sep 2020 12:18:53 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4E95224837; Tue, 8 Sep 2020 15:44:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599579877; bh=JIERlWPZq59t8PAI+bTxWU/oU1gNX/FDw8yrp5HCbYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oMfbUo+rzkUxbmxGy7Yv6fhDuOqE8zSY9oUPhinpShrX74/3l0MmUb5shR0KCw/yP nwIlkL0RisR1EwssAmhTtMP7NFsCvu7FOX34c8pFv5h2aX31WqrzkQhsmnFtgYI3pO 1nr8XnhoaCBvVzdzj/gnpyVEiKGNVca4wQbEzYVc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Veera Vegivada , Guru Das Srinagesh , Stephen Boyd , Daniel Lezcano , Sasha Levin Subject: [PATCH 5.4 069/129] thermal: qcom-spmi-temp-alarm: Dont suppress negative temp Date: Tue, 8 Sep 2020 17:25:10 +0200 Message-Id: <20200908152233.148843870@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152229.689878733@linuxfoundation.org> References: <20200908152229.689878733@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Veera Vegivada [ Upstream commit 0ffdab6f2dea9e23ec33230de24e492ff0b186d9 ] Currently driver is suppressing the negative temperature readings from the vadc. Consumers of the thermal zones need to read the negative temperature too. Don't suppress the readings. Fixes: c610afaa21d3c6e ("thermal: Add QPNP PMIC temperature alarm driver") Signed-off-by: Veera Vegivada Signed-off-by: Guru Das Srinagesh Reviewed-by: Stephen Boyd Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/944856eb819081268fab783236a916257de120e4.1596040416.git.gurus@codeaurora.org Signed-off-by: Sasha Levin --- drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c index bf7bae42c141c..6dc879fea9c8a 100644 --- a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c +++ b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2011-2015, 2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2015, 2017, 2020, The Linux Foundation. All rights reserved. */ #include @@ -191,7 +191,7 @@ static int qpnp_tm_get_temp(void *data, int *temp) chip->temp = mili_celsius; } - *temp = chip->temp < 0 ? 0 : chip->temp; + *temp = chip->temp; return 0; }