Re: [PATCHv9 07/43] CLK: TI: add autoidle support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.

one other thing I missed, will be nice to introduce a common bindings
for autoidle which tends to be reused in other drivers..


-- 
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux