clk: Rename clk_get_by_driver_info()
This is actually a misnomer now, since the phandle info may contain
a driver_info index or a udevice index. Rename it to use the word
'phandle', which seems more accurate. Add a comment while we are here.
Also add a test for this function.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 7b1ea07..493018b 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -36,8 +36,8 @@
}
#if CONFIG_IS_ENABLED(OF_PLATDATA)
-int clk_get_by_driver_info(struct udevice *dev, struct phandle_1_arg *cells,
- struct clk *clk)
+int clk_get_by_phandle(struct udevice *dev, const struct phandle_1_arg *cells,
+ struct clk *clk)
{
int ret;
@@ -413,6 +413,7 @@
return clk_get_by_index(dev, index, clk);
}
+#endif /* OF_REAL */
int clk_get_by_name_nodev(ofnode node, const char *name, struct clk *clk)
{
@@ -465,8 +466,6 @@
return 0;
}
-#endif /* OF_REAL */
-
int clk_request(struct udevice *dev, struct clk *clk)
{
const struct clk_ops *ops;