public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] clk: mediatek: fix gate-less mux definitions
@ 2026-03-26  5:09 Daniel Golle
  2026-03-26  5:09 ` [PATCH v2 1/3] clk: mediatek: add MUX_CLR_SET macro Daniel Golle
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Daniel Golle @ 2026-03-26  5:09 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle,
	Nícolas F. R. A. Prado, Laura Nao, Chen-Yu Tsai, Weiyi Lu,
	Chun-Jie Chen, Ikjoon Jang, Sam Shih, linux-clk, linux-kernel,
	linux-arm-kernel, linux-mediatek

Some MediaTek clock drivers define gate-less muxes without an update
register using MUX_GATE_CLR_SET_UPD, passing -1 as a sentinel for the
absent gate and update fields.  Since those fields are stored in u8 and
u32 struct members, the -1 truncates to unexpected values.

Add MUX_CLR_SET, a wrapper around MUX_CLR_SET_UPD that hardcodes the
absent fields, and convert the affected mux definitions in mt8192 and
mt7988 to use it.

Daniel Golle (3):
  clk: mediatek: add MUX_CLR_SET macro
  clk: mediatek: mt8192: use MUX_CLR_SET
  clk: mediatek: mt7988: use MUX_CLR_SET for gate-less muxes

 drivers/clk/mediatek/clk-mt7988-infracfg.c | 80 ++++++++++------------
 drivers/clk/mediatek/clk-mt8192.c          |  4 +-
 drivers/clk/mediatek/clk-mux.h             |  6 ++
 3 files changed, 46 insertions(+), 44 deletions(-)

-- 
2.53.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-03-26  6:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-26  5:09 [PATCH v2 0/3] clk: mediatek: fix gate-less mux definitions Daniel Golle
2026-03-26  5:09 ` [PATCH v2 1/3] clk: mediatek: add MUX_CLR_SET macro Daniel Golle
2026-03-26  6:37   ` Chen-Yu Tsai
2026-03-26  5:10 ` [PATCH v2 2/3] clk: mediatek: mt8192: use MUX_CLR_SET Daniel Golle
2026-03-26  6:37   ` Chen-Yu Tsai
2026-03-26  5:11 ` [PATCH v2 3/3] clk: mediatek: mt7988: use MUX_CLR_SET for gate-less muxes Daniel Golle
2026-03-26  6:39   ` Chen-Yu Tsai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox