OSDN Git Service

reset: Add APIs to manage array of resets
authorVivek Gautam <vivek.gautam@codeaurora.org>
Mon, 22 May 2017 11:23:25 +0000 (16:53 +0530)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 19 Jul 2017 08:28:12 +0000 (10:28 +0200)
commit17c82e206d2a3cd876b64921c59116f1ecdce6ad
treef808080ebf719a5fceff40f638b523b99189471a
parent01da10e11f7b5a3944df5a77fefb1c2021a63092
reset: Add APIs to manage array of resets

Many devices may want to request a bunch of resets and control them. So
it's better to manage them as an array. Add APIs to _get() an array of
reset_control, reusing the _assert(), _deassert(), and _reset() APIs for
single reset controls. Since reset controls already may control multiple
reset lines with a single hardware bit, from the user perspective, reset
control arrays are not at all different from single reset controls.
Note that these APIs don't guarantee that the reset lines managed in the
array are handled in any particular order.

Cc: Felipe Balbi <balbi@kernel.org>
Cc: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
[p.zabel@pengutronix.de: changed API to hide reset control arrays behind
 struct reset_control]
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/reset/core.c
include/linux/reset.h