diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/reset-uclass.h | 8 | ||||
-rw-r--r-- | include/reset.h | 14 |
2 files changed, 22 insertions, 0 deletions
diff --git a/include/reset-uclass.h b/include/reset-uclass.h index c17d738b31..7b5cc3cb3b 100644 --- a/include/reset-uclass.h +++ b/include/reset-uclass.h @@ -76,6 +76,14 @@ struct reset_ops { * @return 0 if OK, or a negative error code. */ int (*rst_deassert)(struct reset_ctl *reset_ctl); + /** + * 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 (*rst_status)(struct reset_ctl *reset_ctl); }; #endif diff --git a/include/reset.h b/include/reset.h index a7bbc1c331..34ebb096dd 100644 --- a/include/reset.h +++ b/include/reset.h @@ -207,6 +207,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. * * For each reset contained in the reset array, this function will check if @@ -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; |