[PATCHv9 07/43] CLK: TI: add autoidle support
Tero Kristo
t-kristo at ti.com
Mon Nov 4 05:00:34 EST 2013
On 11/01/2013 09:16 PM, Nishanth Menon wrote:
> On 11/01/2013 04:18 AM, Tero Kristo wrote:
>> On 10/31/2013 06:05 PM, Nishanth Menon wrote:
>>> On 10/25/2013 10:57 AM, Tero Kristo wrote:
>
> [...]
>>>> diff --git a/drivers/clk/ti/autoidle.c b/drivers/clk/ti/autoidle.c
>>>> new file mode 100644
>>>> index 0000000..efa2a3e
>>>> --- /dev/null
>>>> +++ b/drivers/clk/ti/autoidle.c
> [...]
>>>> +}
>>>> +
>>>> +static void ti_deny_autoidle(struct clk_ti_autoidle *clk)
>>>> +{
>>>> + u32 val;
>>>> +
>>>> + regmap_read(clk->regmap, clk->reg, &val);
>>>> +
>>>> + if (clk->flags & AUTOIDLE_LOW)
>>>> + val |= (1 << clk->shift);
>>>> + else
>>>> + val &= ~(1 << clk->shift);
>>>> +
>>>> + regmap_write(clk->regmap, clk->reg, val);
>>> regmap_update_bits ?
>>
>> Same.
>>
>>>
>>> and ofcourse error handling for regmap ops..
>>
>> What do you propose to do in error case? Panic, WARN() or just printk?
>
> return error to caller and percolate back up the call stack.
Ok can do that.
> one other thing I missed, will be nice to introduce a common bindings
> for autoidle which tends to be reused in other drivers..
You mean documentation or? Autoidle from this patch is only used by two
clock drivers (divider + fixed-factor.) DPLLs use completely different
setup. Converting the interface clocks to use the same might be rather
nasty thing to do.
-Tero
More information about the linux-arm-kernel
mailing list