1 #ifndef _LINUX_RESET_H_
2 #define _LINUX_RESET_H_
7 #ifdef CONFIG_RESET_CONTROLLER
9 int reset_control_reset(struct reset_control *rstc);
10 int reset_control_assert(struct reset_control *rstc);
11 int reset_control_deassert(struct reset_control *rstc);
13 struct reset_control *reset_control_get(struct device *dev, const char *id);
14 void reset_control_put(struct reset_control *rstc);
15 struct reset_control *devm_reset_control_get(struct device *dev, const char *id);
17 int __must_check device_reset(struct device *dev);
19 static inline int device_reset_optional(struct device *dev)
21 return device_reset(dev);
24 static inline struct reset_control *reset_control_get_optional(
25 struct device *dev, const char *id)
27 return reset_control_get(dev, id);
30 static inline struct reset_control *devm_reset_control_get_optional(
31 struct device *dev, const char *id)
33 return devm_reset_control_get(dev, id);
38 static inline int reset_control_reset(struct reset_control *rstc)
44 static inline int reset_control_assert(struct reset_control *rstc)
50 static inline int reset_control_deassert(struct reset_control *rstc)
56 static inline void reset_control_put(struct reset_control *rstc)
61 static inline int device_reset_optional(struct device *dev)
66 static inline struct reset_control *reset_control_get_optional(
67 struct device *dev, const char *id)
69 return ERR_PTR(-ENOSYS);
72 static inline struct reset_control *devm_reset_control_get_optional(
73 struct device *dev, const char *id)
75 return ERR_PTR(-ENOSYS);
78 #endif /* CONFIG_RESET_CONTROLLER */