soc: mediatek: mutex: add common interface for modules setting
authorMoudy Ho <moudy.ho@mediatek.com>
Fri, 10 Jun 2022 06:34:18 +0000 (14:34 +0800)
committerMatthias Brugger <matthias.bgg@gmail.com>
Fri, 17 Jun 2022 13:51:51 +0000 (15:51 +0200)
commitd0804085c5a7feb557bd3219777b51f5598dfdc6
treea6a0c24a42997a2e6f3da360c60ceb9aae2f7057
parent72be1e7a447add1536653592b317e93aed46588d
soc: mediatek: mutex: add common interface for modules setting

In order to allow multiple modules to operate MUTEX hardware through
a common interfrace, two flexible indexes "mtk_mutex_mod_index" and
"mtk_mutex_sof_index" need to be added to replace original component
ID so that like DDP and MDP can add their own MOD table or SOF
settings independently.

In addition, 2 generic interface "mtk_mutex_write_mod" and
"mtk_mutex_write_sof" have been added, which is expected to replace
the "mtk_mutex_add_comp" and "mtk_mutex_remove_comp" pair originally
dedicated to DDP in the future.

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://lore.kernel.org/r/20220610063424.7800-2-moudy.ho@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-mutex.c
include/linux/soc/mediatek/mtk-mutex.h