[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <trinity-319df51e-2ff3-42cd-8efd-139fda159824-1748448614514@trinity-msg-rest-gmx-gmx-live-6995845bd-wzmz6>
Date: Wed, 28 May 2025 16:10:14 +0000
From: Frank Wunderlich <frank-w@...lic-files.de>
To: mason-cw.chang@...iatek.com, rafael@...nel.org,
daniel.lezcano@...aro.org, rui.zhang@...el.com, lukasz.luba@....com,
angelogioacchino.delregno@...labora.com, nfraprado@...labora.com,
jpanis@...libre.com, npitre@...libre.com, colin.i.king@...il.com,
u.kleine-koenig@...libre.com, wenst@...omium.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, daniel@...rotopia.org,
steven.liu@...iatek.com, sam.shih@...iatek.com
Cc: mason-cw.chang@...iatek.com
Subject: Aw: [PATCH 2/3] thermal/drivers/mediatek/lvts_thermal: add lvts
commands and their sizes to driver data
Hi Mason,
thank you for working on this.
I have not yet tested the series, but did not have the issue (which should be solved by it) reported [1].
So just my thoughts when looking through changes
> Gesendet: Montag, 26. Mai 2025 um 12:26
> Von: "Mason Chang" <mason-cw.chang@...iatek.com>
> Betreff: [PATCH 2/3] thermal/drivers/mediatek/lvts_thermal: add lvts commands and their sizes to driver data
>
> Add LVTS commands and their sizes to driver data in preparation for
> adding different commands.
>
> Signed-off-by: Mason Chang <mason-cw.chang@...iatek.com>
> ---
> drivers/thermal/mediatek/lvts_thermal.c | 65 ++++++++++++++++++++-----
> 1 file changed, 52 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
> index 7e4f56831..5b7bf29a7 100644
> --- a/drivers/thermal/mediatek/lvts_thermal.c
> +++ b/drivers/thermal/mediatek/lvts_thermal.c
> @@ -96,17 +96,6 @@
>
> #define LVTS_MINIMUM_THRESHOLD 20000
>
> -static const u32 default_conn_cmds[] = { 0xC103FFFF, 0xC502FF55 };
> -/*
> - * Write device mask: 0xC1030000
> - */
> -static const u32 default_init_cmds[] = {
> - 0xC1030E01, 0xC1030CFC, 0xC1030A8C, 0xC103098D, 0xC10308F1,
> - 0xC10307A6, 0xC10306B8, 0xC1030500, 0xC1030420, 0xC1030300,
> - 0xC1030030, 0xC10300F6, 0xC1030050, 0xC1030060, 0xC10300AC,
> - 0xC10300FC, 0xC103009D, 0xC10300F1, 0xC10300E1
> -};
could you please move this block in part 1 to the position used here in v2 to avoid deletion/adding again here?
Maybe magic numbers can be described a bit?
> static int golden_temp = LVTS_GOLDEN_TEMP_DEFAULT;
> static int golden_temp_offset;
>
...
> @@ -1446,6 +1442,17 @@ static int lvts_resume(struct device *dev)
> return 0;
> }
>
> +static const u32 default_conn_cmds[] = { 0xC103FFFF, 0xC502FF55 };
> +/*
> + * Write device mask: 0xC1030000
> + */
> +static const u32 default_init_cmds[] = {
> + 0xC1030E01, 0xC1030CFC, 0xC1030A8C, 0xC103098D, 0xC10308F1,
> + 0xC10307A6, 0xC10306B8, 0xC1030500, 0xC1030420, 0xC1030300,
> + 0xC1030030, 0xC10300F6, 0xC1030050, 0xC1030060, 0xC10300AC,
> + 0xC10300FC, 0xC103009D, 0xC10300F1, 0xC10300E1
> +};
> +
> /*
> * The MT8186 calibration data is stored as packed 3-byte little-endian
> * values using a weird layout that makes sense only when viewed as a 32-bit
> @@ -1740,7 +1747,11 @@ static const struct lvts_ctrl_data mt8195_lvts_ap_data_ctrl[] = {
regards Frank
[1] https://github.com/openwrt/openwrt/pull/18750#issuecomment-2877554514
Powered by blists - more mailing lists