From e7012e6e1f9e1c16f093d71bd53b34a6467f07bc Mon Sep 17 00:00:00 2001 From: Andreas Dannenberg Date: Mon, 27 Aug 2018 15:57:39 +0530 Subject: dm: reset: Update uclass to allow querying reset status Add a reset operations function pointer to support querying the current status of a reset control. Reviewed-by: Tom Rini Signed-off-by: Andreas Dannenberg Signed-off-by: Lokesh Vutla --- include/reset.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/reset.h') diff --git a/include/reset.h b/include/reset.h index a7bbc1c331b..34ebb096dd2 100644 --- a/include/reset.h +++ b/include/reset.h @@ -206,6 +206,15 @@ int reset_deassert(struct reset_ctl *reset_ctl); */ int reset_deassert_bulk(struct reset_ctl_bulk *bulk); +/** + * rst_status - Check reset signal status. + * + * @reset_ctl: The reset signal to check. + * @return 0 if deasserted, positive if asserted, or a negative + * error code. + */ +int reset_status(struct reset_ctl *reset_ctl); + /** * reset_release_all - Assert/Free an array of previously requested resets. * @@ -279,6 +288,11 @@ static inline int reset_deassert_bulk(struct reset_ctl_bulk *bulk) return 0; } +static inline int reset_status(struct reset_ctl *reset_ctl) +{ + return -ENOTSUPP; +} + static inline int reset_release_all(struct reset_ctl *reset_ctl, int count) { return 0; -- cgit v1.2.3