1 #ifndef _LINUX_RESET_H_
2 #define _LINUX_RESET_H_
8 #ifdef CONFIG_RESET_CONTROLLER
10 int reset_control_reset(struct reset_control *rstc);
11 int reset_control_assert(struct reset_control *rstc);
12 int reset_control_deassert(struct reset_control *rstc);
14 struct reset_control *reset_control_get(struct device *dev, const char *id);
15 void reset_control_put(struct reset_control *rstc);
16 struct reset_control *devm_reset_control_get(struct device *dev, const char *id);
18 int __must_check device_reset(struct device *dev);
20 static inline int device_reset_optional(struct device *dev)
22 return device_reset(dev);
25 static inline struct reset_control *reset_control_get_optional(
26 struct device *dev, const char *id)
28 return reset_control_get(dev, id);
31 static inline struct reset_control *devm_reset_control_get_optional(
32 struct device *dev, const char *id)
34 return devm_reset_control_get(dev, id);
37 struct reset_control *of_reset_control_get(struct device_node *node,
42 static inline int reset_control_reset(struct reset_control *rstc)
48 static inline int reset_control_assert(struct reset_control *rstc)
54 static inline int reset_control_deassert(struct reset_control *rstc)
60 static inline void reset_control_put(struct reset_control *rstc)
65 static inline int device_reset_optional(struct device *dev)
70 static inline struct reset_control *reset_control_get_optional(
71 struct device *dev, const char *id)
73 return ERR_PTR(-ENOSYS);
76 static inline struct reset_control *devm_reset_control_get_optional(
77 struct device *dev, const char *id)
79 return ERR_PTR(-ENOSYS);
82 static inline struct reset_control *of_reset_control_get(
83 struct device_node *node, const char *id)
85 return ERR_PTR(-ENOSYS);
88 #endif /* CONFIG_RESET_CONTROLLER */