reset: Get the RESET by index without device
authorJagan Teki <jagan@amarulasolutions.com>
Wed, 27 Feb 2019 18:56:55 +0000 (00:26 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Wed, 8 May 2019 19:14:13 +0000 (00:44 +0530)
commitea9dc35aab9fd9e87cbb73a3a63fcbea4d6378c3
tree1784b86aaf3ce4e1cedd64b5330d036e9d97d104
parentd7a672e35f4788f95cee36797f7cf80474fd151b
reset: Get the RESET by index without device

Getting a RESET 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 RESET operation for child
without udevice but with ofnode.

So add reset_get_by_index_nodev() and move the common code
in reset_get_by_index_tail() to use for reset_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/reset/reset-uclass.c
include/reset.h