Re: [PATCH 2/5] clk: lpc32xx: read-only divider can propagate rate change
From: Jerome Brunet
Date: Mon Jan 08 2018 - 04:11:07 EST
On Sat, 2018-01-06 at 16:04 +0200, Vladimir Zapolskiy wrote:
> > I added the fix to LPC32xx because it looks like the generic divider (a lot) and
>
> right, the relevant divider operations were copied, however the difference
> is important, unfortunately there is no simple option to get rid of regmap,
> because System Control Block registers are shared with a number of other
> device drivers.
I have the same issue ;)
>
> > appears to support CLK_DIVIDER_READ_ONLY. If it does not, could you please kill
> > the related code ?
>
> The driver supports CLK_DIVIDER_READ_ONLY clocks, and it should not be
> changed, but all such clocks don't have children with CLK_SET_RATE_PARENT
> property, which invalidates your fix for LPC32xx. Please let me know,
> if I missed something.
You did not miss anything. I understand your choice.
I just have different approach and usually prefer to avoid these particularity
which may catch you later on.
At least, the fact that propagation would stop with CLK_DIVIDER_READ_ONLY on
LPC32xx, even with CLK_SET_RATE_PARENT, is now known.
Adding a comment in the code to make this explicit would be nice though.
Regards
Jerome