Re: [PATCH v1] clk: qcom: Add support for regmap clock dividers

From: Stephen Boyd
Date: Fri Oct 03 2014 - 13:49:43 EST


On 10/03/14 08:13, Georgi Djakov wrote:
> On 10/02/2014 09:11 PM, Stephen Boyd wrote:
>> On 09/30/14 10:20, Georgi Djakov wrote:
>> + unsigned long parent_rate)
>> +{
>> + struct clk_regmap *rclk = to_clk_regmap(hw);
>> + struct clkdiv_regmap *clkdiv = to_clkdiv_regmap(rclk);
>> + unsigned int div, val;
>> +
>> + regmap_read(rclk->regmap, clkdiv->reg, &val);
>> + if (!val)
>> + return parent_rate;
>> +
>> + div = (val >> clkdiv->shift) & ((1 << clkdiv->width)-1);
>> +
>> + return parent_rate / div;
>> I don't know if you saw the patch to split out the clk-divider.c logic
>> from the readl/writel patch I sent[1]? That could make this slightly
>> smaller.
>> tabl
> Could you please provide a link to that patch?

Doh, here it is: https://lkml.org/lkml/2014/9/5/762


--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/