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 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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux