Thread (22 messages) 22 messages, 8 authors, 2013-06-13

[PATCH v4 3/5] clk: add support for clock reparent on set_rate

From: James Hogan <hidden>
Date: 2013-05-22 10:13:30
Also in: lkml

On 21/05/13 06:10, Saravana Kannan wrote:
On 05/20/2013 06:28 AM, James Hogan wrote:
quoted
diff --git a/include/linux/clk-private.h b/include/linux/clk-private.h
index dd7adff..8138c94 100644
--- a/include/linux/clk-private.h
+++ b/include/linux/clk-private.h
@@ -33,8 +33,11 @@ struct clk {
      const char        **parent_names;
      struct clk        **parents;
      u8            num_parents;
+    u8            new_parent_index;
Why do you need this? Given the new_parent, can't the specific clock
implementation just look it up when set_rate() is called? Wouldn't that
be the only time you would actually need the index?

If it's just for optimization of some error cases, I think we should
drop this to keep the code simpler. One less state to keep track of when
reading, writing or reviewing the clock framework.
clk_change_rate cannot currently return an error condition so I had
assumed it was better to check that the requested parent clock has a
valid parent index prior to starting to change any clock rates or firing
off any notifications.

Cheers
James
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help