clk: Get the CLK by index without device
authorJagan Teki <jagan@amarulasolutions.com>
Wed, 27 Feb 2019 18:56:52 +0000 (00:26 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Wed, 8 May 2019 19:14:13 +0000 (00:44 +0530)
commit75f98314f92f64fd3526464006d934d4fe9b2710
tree3985d971f43df769093a3461e7dfb43c27893043
parentb24f9057e8a1c2e26acd3bdc2ba933cf9979b375
clk: Get the CLK by index without device

Getting a CLK by index with device is not straight forward
for some use-cases like handling clock operations for child
node in parent driver. So we need to process the child node
in parent probe via ofnode and process CLK operation for child
without udevice but with ofnode.

So add clk_get_by_index_nodev() and move the common code
in clk_get_by_index_tail() to use for clk_get_by_index()

Cc: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/clk/clk-uclass.c
include/clk.h