Re: [PATCH 01/16] clk: permit to define a custom parent for clk_hw_get_parent_index

From
Stephen Boyd <sboyd@kernel.org>
Date
2022-03-15 21:30:41
Also in
linux-arm-msm, linux-clk, linux-tegra, lkml
Reply to
Ansuel Smith, 2022-03-15
Quoting Ansuel Smith (2022-03-15 11:07:26)
On Tue, Mar 15, 2022 at 10:55:18AM -0700, Stephen Boyd wrote:
quoted
Quoting Ansuel Smith (2022-03-13 12:04:04)
quoted
  */
-int clk_hw_get_parent_index(struct clk_hw *hw)
+int clk_hw_get_parent_index(struct clk_hw *hw, struct clk_hw *parent)
Please introduce another API vs. tacking on an "output" argument to this
API. That makes the patch less invasive. And it can also return a
pointer instead of an integer in that case.
Any suggestion about the name? clk_hw_fetch_parent_index? That would be
a direct access of the internal clk_fetch_parent_index.

The name is already not that intuitive as is. The alternative is to make
it extra long, don't know if that's a problem...
Something like clk_hw_get_parent_index_by_parent? (that is even more
confusing)
Haha that's a mouthful. clk_hw_get_index_of_parent()? I realize now that
I misread the API because parent wasn't a const pointer. Please make
parent argument const as well and return an int as before.
Thread (31 messages) 31 messages, 4 authors, last reply 2022-03-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help