From patchwork Mon Jul 27 19:35:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guru Das Srinagesh X-Patchwork-Id: 11687457 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BDAAD14B7 for ; Mon, 27 Jul 2020 19:35:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AFBD120738 for ; Mon, 27 Jul 2020 19:35:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727905AbgG0TfY (ORCPT ); Mon, 27 Jul 2020 15:35:24 -0400 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]:1127 "EHLO alexa-out-sd-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgG0TfX (ORCPT ); Mon, 27 Jul 2020 15:35:23 -0400 Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-02.qualcomm.com with ESMTP; 27 Jul 2020 12:35:23 -0700 Received: from gurus-linux.qualcomm.com ([10.46.162.81]) by ironmsg-SD-alpha.qualcomm.com with ESMTP; 27 Jul 2020 12:35:23 -0700 Received: by gurus-linux.qualcomm.com (Postfix, from userid 383780) id 1EF081581; Mon, 27 Jul 2020 12:35:23 -0700 (PDT) From: Guru Das Srinagesh To: Amit Kucheria , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: Subbaraman Narayanamurthy , David Collins , linux-kernel@vger.kernel.org, Veera Vegivada , Guru Das Srinagesh Subject: [PATCH v1 2/2] thermal: qcom-spmi-temp-alarm: Don't suppress negative temp Date: Mon, 27 Jul 2020 12:35:19 -0700 Message-Id: <6bb66f529eaab58b3a75eea3386233cbca27f818.1595878198.git.gurus@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Veera Vegivada 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. Signed-off-by: Veera Vegivada Signed-off-by: Guru Das Srinagesh --- Apologies for resending - My earlier two submissions were directed to the wrong reviewer audience and list. 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 05a9601..6d8f090 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 @@ -212,7 +212,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; }