[PATCH v14 07/11] clk: realtek: Add support for mux clock
Yu-Chun Lin [林祐君]
eleanor.lin at realtek.com
Tue Sep 22 22:42:01 PDT 2026
Hi Jerome,
> > +static u8 rtk_clk_regmap_mux_get_parent(struct clk_hw *hw) {
> > + struct rtk_clk_regmap_mux *clkm = to_rtk_clk_regmap_mux(hw);
> > + unsigned int num_parents = clk_hw_get_num_parents(hw);
> > + u32 val;
> > + int ret;
> > +
> > + ret = regmap_read(clkm->clkr.regmap, clkm->mux_ofs, &val);
> > + if (ret)
> > + return 0xff;
> > +
> > + val = (val >> clkm->shift) & clkm->mask;
> > +
> > + return val >= num_parents ? 0xff : val;
>
> This is not really useful, the core already rejects val >= num_parent.
> So returning a higher number changes nothing as it stands
>
Will change it to 'return val;'
Best Regards,
Yu-Chun
More information about the linux-arm-kernel
mailing list