Re: [PATCH] soc: mediatek: mtk-mutex: Fix confusing usage of MUTEX_MOD2

From: AngeloGioacchino Del Regno
Date: Mon Jun 23 2025 - 05:42:55 EST


Il 20/06/25 04:40, Jason-JH Lin ha scritto:
The usage of MUTEX_MOD1 and MUTEX_MOD2 for calculating mod settings
over 32 has been confusing. To improve consistency and clarity, these
defines need to fit into the same MUTEX_MOD define as possible.

However, MUTEX_MOD1 cannot be directly used for all SoCs because,
for example, the mod1 register (0x34) of MT2712 is not adjacent to
its mod0 register (0x2c). To address this, a `mutex_mod1_reg` field
is introduced in the mutex driver data structure. This allows all
SoCs to use a unified MUTEX_MOD to determine their register offsets.

With this change, the separate usage of MUTEX_MOD1 and MUTEX_MOD2 is
eliminated, simplifying the logic for obtaining offsets and mod IDs.

Yeah, okay, that makes sense, but...


Fixes: e1e4f7fea375 ("soc / drm: mediatek: Move mtk mutex driver to soc folder")

...this is an improvement, it's not a fix, so please drop the Fixes tag.

Signed-off-by: Jason-JH Lin <jason-jh.lin@xxxxxxxxxxxx>

After which:

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>