[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230406145850.357296-2-bryan.odonoghue@linaro.org>
Date: Thu, 6 Apr 2023 15:58:48 +0100
From: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To: amitk@...nel.org, thara.gopinath@...il.com, agross@...nel.org,
andersson@...nel.org, konrad.dybcio@...aro.org, rafael@...nel.org,
daniel.lezcano@...aro.org, rui.zhang@...el.com,
dmitry.baryshkov@...aro.org
Cc: linux-pm@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Bryan O'Donoghue <bryan.odonoghue@...aro.org>
Subject: [PATCH 1/3] thermal/drivers/tsens: Add error/debug prints to calibration read
Add in some dev_dbg() to aid in viewing of raw calibration data extracted.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
---
drivers/thermal/qcom/tsens.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index d3218127e617d..7165b0bfe8b9f 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -115,8 +115,12 @@ int tsens_read_calibration(struct tsens_priv *priv, int shift, u32 *p1, u32 *p2,
return ret;
ret = nvmem_cell_read_variable_le_u32(priv->dev, name, &p1[i]);
- if (ret)
+ if (ret) {
+ dev_err(priv->dev, "Failed to read %s\n", name);
return ret;
+ }
+
+ dev_dbg(priv->dev, "%s 0x%x\n", name, p1[i]);
ret = snprintf(name, sizeof(name), "s%d_p2%s", priv->sensor[i].hw_id,
backup ? "_backup" : "");
@@ -124,8 +128,12 @@ int tsens_read_calibration(struct tsens_priv *priv, int shift, u32 *p1, u32 *p2,
return ret;
ret = nvmem_cell_read_variable_le_u32(priv->dev, name, &p2[i]);
- if (ret)
+ if (ret) {
+ dev_err(priv->dev, "Failed to read %s\n", name);
return ret;
+ }
+
+ dev_dbg(priv->dev, "%s 0x%x\n", name, p2[i]);
}
switch (mode) {
--
2.39.2
Powered by blists - more mailing lists