[PATCH 05/10] clk: Add support for simple dividers

Sascha Hauer s.hauer at pengutronix.de
Mon Apr 25 14:51:13 EDT 2011


On Sun, Apr 24, 2011 at 09:48:33PM +0800, Richard Zhao wrote:
> > +
> > +	div = clk_divider_bestdiv(clk, rate, &best_parent_rate);
> > +
> > +	if (rate != best_parent_rate / div)
> > +		return -EINVAL;
> > +
> > +	ret = clk_set_rate(divider->parent, best_parent_rate);
> why do you set parent rate? It may impact hte parent's other children.
>

In a newer version I already created a barrier flag for not setting the
parents rate. Setting the parents rate is needed for for example
cascaded dividers. Otherwise this could be much simpler.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the linux-arm-kernel mailing list