From 9cdc56a4ee55e1cbd8bac8c743f80ce60fb569a0 Mon Sep 17 00:00:00 2001 From: Priyansh Jain Date: Fri, 13 Aug 2021 10:33:56 +0530 Subject: [PATCH] drivers: thermal: tsens: updating tsens WD bark threshold to 100 Updating tsens WatchDog Bark count threshold to 100. Change-Id: Ic3a7945e56057ba0a8e1d809dcd1f703035fce90 Signed-off-by: Priyansh Jain --- drivers/thermal/tsens2xxx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/tsens2xxx.c b/drivers/thermal/tsens2xxx.c index 10dbabfc5c64..fdca661048cf 100644 --- a/drivers/thermal/tsens2xxx.c +++ b/drivers/thermal/tsens2xxx.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. */ #include @@ -51,7 +51,7 @@ #define TSENS_TM_0C_THR_OFFSET 12 #define TSENS_TM_CODE_SIGN_BIT 0x800 #define TSENS_TM_SCALE_DECI_MILLIDEG 100 -#define TSENS_DEBUG_WDOG_TRIGGER_COUNT 5 +#define TSENS_DEBUG_WDOG_TRIGGER_COUNT 100 #define TSENS_TM_WATCHDOG_LOG(n) ((n) + 0x13c) #define TSENS_TM_WATCHDOG_LOG_v23(n) ((n) + 0x170) #define TSENS_EN BIT(0) @@ -515,7 +515,7 @@ fail: static irqreturn_t tsens_tm_critical_irq_thread(int irq, void *data) { struct tsens_device *tm = data; - unsigned int i, status, wd_log, wd_mask; + unsigned int i, status, wd_log, wd_mask, wd_status; unsigned long flags; void __iomem *sensor_status_addr, *sensor_int_mask_addr; void __iomem *sensor_critical_addr; @@ -532,6 +532,8 @@ static irqreturn_t tsens_tm_critical_irq_thread(int irq, void *data) wd_log_addr = TSENS_TM_WATCHDOG_LOG_v23(tm->tsens_tm_addr); else wd_log_addr = TSENS_TM_WATCHDOG_LOG(tm->tsens_tm_addr); + wd_status = readl_relaxed(wd_critical_addr); + TSENS_DBG(tm, "Critical irq status:%d\n", wd_status); if (tm->ctrl_data->wd_bark) { wd_mask = readl_relaxed(wd_critical_addr);