]> git.ipfire.org Git - thirdparty/linux.git/commit
clk: mediatek: add MUX_CLR_SET macro
authorDaniel Golle <daniel@makrotopia.org>
Thu, 26 Mar 2026 05:09:35 +0000 (05:09 +0000)
committerStephen Boyd <sboyd@kernel.org>
Wed, 29 Apr 2026 02:05:42 +0000 (19:05 -0700)
commit820ea6936b2d64d2171747ab37780ec9458a9236
tree55f18f6e17b5c0502358f5051e20fc5808bb03e9
parent254f49634ee16a731174d2ae34bc50bd5f45e731
clk: mediatek: add MUX_CLR_SET macro

Some MediaTek SoCs (e.g. MT7988) define infra muxes that have neither
a clock gate nor an update register.

Add a MUX_CLR_SET convenience macro that takes only the mux register
offsets, bit shift, and width, hardcoding upd_ofs = 0 and
upd_shift = -1 so callers cannot accidentally pass bogus sentinel
values to wrongly-typed fields.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/mediatek/clk-mux.h