[PATCH 1/8] clk: add a fixed factor clock

Sascha Hauer s.hauer at pengutronix.de
Fri Mar 23 04:40:00 EDT 2012


Hi Philipp,

On Fri, Mar 23, 2012 at 08:37:52AM +0100, Philipp Zabel wrote:
> Hi Sascha,
> 
> Am Montag, den 19.03.2012, 14:35 +0100 schrieb Sascha Hauer:
> > Having fixed factors/dividers in hardware is a common pattern, so
> > add a clock doing this. Currently no rate propagation is supported.

Also this is not true anymore, rate propagation now is supported.

> > 
> > Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
> 
> Tested-by: Philipp Zabel <philipp.zabel at gmail.com>
> 
> Only a few clk-gateisms remain in clk_register_fixed_factor:

Thanks, I'll integrate this.

Sascha

> diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c
> index 7c5e1fc..d99b842 100644
> --- a/drivers/clk/clk-fixed-factor.c
> +++ b/drivers/clk/clk-fixed-factor.c
> @@ -64,14 +64,14 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name,
>  	struct clk_fixed_factor *fix;
>  	struct clk *clk;
>  
> -	fix = kmalloc(sizeof(struct clk_gate), GFP_KERNEL);
> +	fix = kmalloc(sizeof(struct clk_fixed_factor), GFP_KERNEL);
>  
>  	if (!fix) {
> -		pr_err("%s: could not allocate gated clk\n", __func__);
> +		pr_err("%s: could not allocate fixed factor clk\n", __func__);
>  		return ERR_PTR(-ENOMEM);
>  	}
>  
> -	/* struct clk_gate assignments */
> +	/* struct clk_fixed_factor assignments */
>  	fix->mult = mult;
>  	fix->div = div;
>  
> --
> 1.7.9.1
> 
> regards
> Philipp
> 
> 

-- 
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