]>
git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - include/linux/reset.h
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
);
13 int reset_control_status(struct reset_control
*rstc
);
15 struct reset_control
*reset_control_get(struct device
*dev
, const char *id
);
16 void reset_control_put(struct reset_control
*rstc
);
17 struct reset_control
*devm_reset_control_get(struct device
*dev
, const char *id
);
19 int __must_check
device_reset(struct device
*dev
);
21 static inline int device_reset_optional(struct device
*dev
)
23 return device_reset(dev
);
26 static inline struct reset_control
*reset_control_get_optional(
27 struct device
*dev
, const char *id
)
29 return reset_control_get(dev
, id
);
32 static inline struct reset_control
*devm_reset_control_get_optional(
33 struct device
*dev
, const char *id
)
35 return devm_reset_control_get(dev
, id
);
38 struct reset_control
*of_reset_control_get(struct device_node
*node
,
43 static inline int reset_control_reset(struct reset_control
*rstc
)
49 static inline int reset_control_assert(struct reset_control
*rstc
)
55 static inline int reset_control_deassert(struct reset_control
*rstc
)
61 static inline int reset_control_status(struct reset_control
*rstc
)
67 static inline void reset_control_put(struct reset_control
*rstc
)
72 static inline int device_reset_optional(struct device
*dev
)
77 static inline struct reset_control
*__must_check
reset_control_get(
78 struct device
*dev
, const char *id
)
81 return ERR_PTR(-EINVAL
);
84 static inline struct reset_control
*__must_check
devm_reset_control_get(
85 struct device
*dev
, const char *id
)
88 return ERR_PTR(-EINVAL
);
91 static inline struct reset_control
*reset_control_get_optional(
92 struct device
*dev
, const char *id
)
94 return ERR_PTR(-ENOSYS
);
97 static inline struct reset_control
*devm_reset_control_get_optional(
98 struct device
*dev
, const char *id
)
100 return ERR_PTR(-ENOSYS
);
103 static inline struct reset_control
*of_reset_control_get(
104 struct device_node
*node
, const char *id
)
106 return ERR_PTR(-ENOSYS
);
109 #endif /* CONFIG_RESET_CONTROLLER */