diff mbox series

[v2,01/13] thermal/drivers/mediatek/lvts_thermal: retrieve all calibration bytes

Message ID 20240318212428.3843952-2-nico@fluxnic.net (mailing list archive)
State New
Delegated to: Daniel Lezcano
Headers show
Series Mediatek thermal sensor driver support for MT8186 and MT8188 | expand

Commit Message

Nicolas Pitre March 18, 2024, 9:22 p.m. UTC
From: Nicolas Pitre <npitre@baylibre.com>

Calibration values are 24-bit wide. Those values so far appear to span
only 16 bits but let's not push our luck.

Found while looking at the original Mediatek driver code.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
---
 drivers/thermal/mediatek/lvts_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

AngeloGioacchino Del Regno March 19, 2024, 11:40 a.m. UTC | #1
Il 18/03/24 22:22, Nicolas Pitre ha scritto:
> From: Nicolas Pitre <npitre@baylibre.com>
> 
> Calibration values are 24-bit wide. Those values so far appear to span
> only 16 bits but let's not push our luck.
> 

I wonder how much feedback you got on v1 - I didn't even look and will not lose
time with that - but regardless, if you don't add the right people to the Cc field,
I really don't think that you'll ever get your patches reviewed (and probably also
not accepted).

That -- especially if you don't even Cc all the relevant maintainers...!

Please read:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html

P.S.:
scripts/get_maintainer.pl lvts-8186-8188-patches.patch

"Rafael J. Wysocki" <rafael@kernel.org> (supporter:THERMAL)
Daniel Lezcano <daniel.lezcano@linaro.org> (supporter:THERMAL,commit_signer:21/22=95%)
Zhang Rui <rui.zhang@intel.com> (reviewer:THERMAL)
Lukasz Luba <lukasz.luba@arm.com> (reviewer:THERMAL)
Rob Herring <robh@kernel.org> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE 
BINDINGS)
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> (maintainer:OPEN FIRMWARE 
AND FLATTENED DEVICE TREE BINDINGS)
Conor Dooley <conor+dt@kernel.org> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Matthias Brugger <matthias.bgg@gmail.com> (maintainer:ARM/Mediatek SoC 
support,commit_signer:4/22=18%)
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> 
(maintainer:ARM/Mediatek SoC support,commit_signer:13/22=59%)
Alexandre Mergnat <amergnat@baylibre.com> (commit_signer:11/22=50%)
"NĂ­colas F. R. A. Prado" <nfraprado@collabora.com> 
(commit_signer:10/22=45%,authored:7/22=32%,added_lines:128/453=28%,removed_lines:45/98=46%)
Balsam CHIHI <bchihi@baylibre.com> 
(authored:4/22=18%,added_lines:235/453=52%,removed_lines:22/98=22%,in file)
Chen-Yu Tsai <wenst@chromium.org> (authored:2/22=9%)
Minjie Du <duminjie@vivo.com> (authored:2/22=9%)
Frank Wunderlich <frank-w@public-files.de> 
(authored:2/22=9%,added_lines:72/453=16%,removed_lines:17/98=17%)
linux-pm@vger.kernel.org (open list:THERMAL)
devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
linux-kernel@vger.kernel.org (open list)
linux-arm-kernel@lists.infradead.org (moderated list:ARM/Mediatek SoC support)
linux-mediatek@lists.infradead.org (moderated list:ARM/Mediatek SoC support)


> Found while looking at the original Mediatek driver code.
> 
> Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
> ---
>   drivers/thermal/mediatek/lvts_thermal.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
> index 98d9c80bd4..8aa6a8675b 100644
> --- a/drivers/thermal/mediatek/lvts_thermal.c
> +++ b/drivers/thermal/mediatek/lvts_thermal.c
> @@ -679,7 +679,7 @@ static int lvts_calibration_init(struct device *dev, struct lvts_ctrl *lvts_ctrl
>   
>   	for (i = 0; i < lvts_ctrl_data->num_lvts_sensor; i++)
>   		memcpy(&lvts_ctrl->calibration[i],
> -		       efuse_calibration + lvts_ctrl_data->cal_offset[i], 2);
> +		       efuse_calibration + lvts_ctrl_data->cal_offset[i], 3);
>   
>   	return 0;
>   }
Rob Herring (Arm) March 20, 2024, 3:32 p.m. UTC | #2
On Tue, Mar 19, 2024 at 12:40:20PM +0100, AngeloGioacchino Del Regno wrote:
> Il 18/03/24 22:22, Nicolas Pitre ha scritto:
> > From: Nicolas Pitre <npitre@baylibre.com>
> > 
> > Calibration values are 24-bit wide. Those values so far appear to span
> > only 16 bits but let's not push our luck.
> > 
> 
> I wonder how much feedback you got on v1 - I didn't even look and will not lose
> time with that - but regardless, if you don't add the right people to the Cc field,
> I really don't think that you'll ever get your patches reviewed (and probably also
> not accepted).
> 
> That -- especially if you don't even Cc all the relevant maintainers...!
> 
> Please read:
> https://www.kernel.org/doc/html/latest/process/submitting-patches.html
> 
> P.S.:
> scripts/get_maintainer.pl lvts-8186-8188-patches.patch
> 
> "Rafael J. Wysocki" <rafael@kernel.org> (supporter:THERMAL)
> Daniel Lezcano <daniel.lezcano@linaro.org> (supporter:THERMAL,commit_signer:21/22=95%)
> Zhang Rui <rui.zhang@intel.com> (reviewer:THERMAL)
> Lukasz Luba <lukasz.luba@arm.com> (reviewer:THERMAL)
> Rob Herring <robh@kernel.org> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE
> TREE BINDINGS)
> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> (maintainer:OPEN
> FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
> Conor Dooley <conor+dt@kernel.org> (maintainer:OPEN FIRMWARE AND FLATTENED
> DEVICE TREE BINDINGS)
> Matthias Brugger <matthias.bgg@gmail.com> (maintainer:ARM/Mediatek SoC
> support,commit_signer:4/22=18%)
> AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> (maintainer:ARM/Mediatek SoC support,commit_signer:13/22=59%)

> Alexandre Mergnat <amergnat@baylibre.com> (commit_signer:11/22=50%)
> "NĂ­colas F. R. A. Prado" <nfraprado@collabora.com> (commit_signer:10/22=45%,authored:7/22=32%,added_lines:128/453=28%,removed_lines:45/98=46%)
> Balsam CHIHI <bchihi@baylibre.com>
> (authored:4/22=18%,added_lines:235/453=52%,removed_lines:22/98=22%,in file)
> Chen-Yu Tsai <wenst@chromium.org> (authored:2/22=9%)
> Minjie Du <duminjie@vivo.com> (authored:2/22=9%)
> Frank Wunderlich <frank-w@public-files.de>
> (authored:2/22=9%,added_lines:72/453=16%,removed_lines:17/98=17%)

Please don't suggest to people that commit signers and authors are CCed. 
That results in huge Cc lists of people that probably aren't interested. 
If they are, then they should add themselves to MAINTAINERS.

Rob
diff mbox series

Patch

diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index 98d9c80bd4..8aa6a8675b 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -679,7 +679,7 @@  static int lvts_calibration_init(struct device *dev, struct lvts_ctrl *lvts_ctrl
 
 	for (i = 0; i < lvts_ctrl_data->num_lvts_sensor; i++)
 		memcpy(&lvts_ctrl->calibration[i],
-		       efuse_calibration + lvts_ctrl_data->cal_offset[i], 2);
+		       efuse_calibration + lvts_ctrl_data->cal_offset[i], 3);
 
 	return 0;
 }