提交 0ffdab6f 编写于 作者: V Veera Vegivada 提交者: Daniel Lezcano

thermal: qcom-spmi-temp-alarm: Don't suppress negative temp

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: c610afaa ("thermal: Add QPNP PMIC temperature alarm driver")
Signed-off-by: NVeera Vegivada <vvegivad@codeaurora.org>
Signed-off-by: NGuru Das Srinagesh <gurus@codeaurora.org>
Reviewed-by: NStephen Boyd <sboyd@kernel.org>
Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/944856eb819081268fab783236a916257de120e4.1596040416.git.gurus@codeaurora.org
上级 30d24fab
// SPDX-License-Identifier: GPL-2.0-only // 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 <linux/bitops.h> #include <linux/bitops.h>
...@@ -191,7 +191,7 @@ static int qpnp_tm_get_temp(void *data, int *temp) ...@@ -191,7 +191,7 @@ static int qpnp_tm_get_temp(void *data, int *temp)
chip->temp = mili_celsius; chip->temp = mili_celsius;
} }
*temp = chip->temp < 0 ? 0 : chip->temp; *temp = chip->temp;
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册