Message ID | 20230308131041.124482-3-stephan.gerhold@kernkonzept.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | thermal: qcom: tsens: Fix MDM9607, add MSM8909 | expand |
Hi Stephan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on rafael-pm/thermal]
[also build test WARNING on linus/master v6.3-rc1 next-20230309]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Stephan-Gerhold/thermal-qcom-tsens-Drop-unused-legacy-structs/20230308-214702
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git thermal
patch link: https://lore.kernel.org/r/20230308131041.124482-3-stephan.gerhold%40kernkonzept.com
patch subject: [PATCH v2 2/6] thermal: qcom: tsens-v0_1: Fix mdm9607 slope values
config: arm-defconfig (https://download.01.org/0day-ci/archive/20230309/202303091900.XYo6NJrL-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/intel-lab-lkp/linux/commit/3794cf582a2a9b64fabba0c34ec4a1f87571247a
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Stephan-Gerhold/thermal-qcom-tsens-Drop-unused-legacy-structs/20230308-214702
git checkout 3794cf582a2a9b64fabba0c34ec4a1f87571247a
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/thermal/qcom/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303091900.XYo6NJrL-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/thermal/qcom/tsens-v0_1.c:284:31: warning: unused variable 'ops_v0_1' [-Wunused-const-variable]
static const struct tsens_ops ops_v0_1 = {
^
1 warning generated.
vim +/ops_v0_1 +284 drivers/thermal/qcom/tsens-v0_1.c
c19970548edc35 Amit Kucheria 2019-03-20 283
51d78b8b1beba2 Dmitry Baryshkov 2023-01-01 @284 static const struct tsens_ops ops_v0_1 = {
51d78b8b1beba2 Dmitry Baryshkov 2023-01-01 285 .init = init_common,
51d78b8b1beba2 Dmitry Baryshkov 2023-01-01 286 .calibrate = tsens_calibrate_common,
51d78b8b1beba2 Dmitry Baryshkov 2023-01-01 287 .get_temp = get_temp_common,
51d78b8b1beba2 Dmitry Baryshkov 2023-01-01 288 };
51d78b8b1beba2 Dmitry Baryshkov 2023-01-01 289
diff --git a/drivers/thermal/qcom/tsens-v0_1.c b/drivers/thermal/qcom/tsens-v0_1.c index 106d26076e3f..72d08e2337aa 100644 --- a/drivers/thermal/qcom/tsens-v0_1.c +++ b/drivers/thermal/qcom/tsens-v0_1.c @@ -222,6 +222,16 @@ static int __init init_8939(struct tsens_priv *priv) { return init_common(priv); } +static int __init init_9607(struct tsens_priv *priv) +{ + int i; + + for (i = 0; i < priv->num_sensors; ++i) + priv->sensor[i].slope = 3000; + + return init_common(priv); +} + /* v0.1: 8916, 8939, 8974, 9607 */ static struct tsens_features tsens_v0_1_feat = { @@ -320,9 +330,15 @@ struct tsens_plat_data data_8974 = { .fields = tsens_v0_1_regfields, }; +static const struct tsens_ops ops_9607 = { + .init = init_9607, + .calibrate = tsens_calibrate_common, + .get_temp = get_temp_common, +}; + struct tsens_plat_data data_9607 = { .num_sensors = 5, - .ops = &ops_v0_1, + .ops = &ops_9607, .feat = &tsens_v0_1_feat, .fields = tsens_v0_1_regfields, };
According to the msm-3.18 vendor kernel from Qualcomm [1], mdm9607 uses a non-standard slope value of 3000 (instead of 3200) for all sensors. Fill it properly similar to the 8939 code added recently. [1]: https://git.codelinaro.org/clo/la/kernel/msm-3.18/-/blob/LE.UM.4.3.2.r1-04200-9x07/arch/arm/boot/dts/qcom/mdm9607.dtsi#L875 Cc: Konrad Dybcio <konrad.dybcio@linaro.org> Fixes: a2149ab815fc ("thermal/drivers/qcom/tsens-v0_1: Add support for MDM9607") Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com> --- Changes in v2: New patch --- drivers/thermal/qcom/tsens-v0_1.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)