History

reset: Add acquired flag to of_reset_control_array_get()

In order to be able to request an array of reset controls in acquired or released mode, add the acquired flag to of_reset_control_array_get() and pass the flag to subsequent calls of __of_reset_control_get().

Thierry Reding committed 7 years ago

Commit f31d5c21 parent c84b0323 files · +16 −10Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/reset.h+8−6
@@ -32,7 +32,8 @@ struct reset_control *__devm_reset_control_get(struct device *dev, · 31 unmodified lines
32struct reset_control *devm_reset_control_array_get(struct device *dev,32struct reset_control *devm_reset_control_array_get(struct device *dev,
33 bool shared, bool optional);33 bool shared, bool optional);
34struct reset_control *of_reset_control_array_get(struct device_node *np,34struct reset_control *of_reset_control_array_get(struct device_node *np,
35 bool shared, bool optional);35 bool shared, bool optional,
36 bool acquired);
36 37
37int reset_control_get_count(struct device *dev);38int reset_control_get_count(struct device *dev);
38 39
@@ -107,7 +108,8 @@ devm_reset_control_array_get(struct device *dev, bool shared, bool optional) · 68 unmodified lines
107}108}
108 109
109static inline struct reset_control *110static inline struct reset_control *
110of_reset_control_array_get(struct device_node *np, bool shared, bool optional)111of_reset_control_array_get(struct device_node *np, bool shared, bool optional,
112 bool acquired)
111{113{
112 return optional ? NULL : ERR_PTR(-ENOTSUPP);114 return optional ? NULL : ERR_PTR(-ENOTSUPP);
113}115}
@@ -465,24 +467,24 @@ devm_reset_control_array_get_optional_shared(struct device *dev) · 351 unmodified lines
465static inline struct reset_control *467static inline struct reset_control *
466of_reset_control_array_get_exclusive(struct device_node *node)468of_reset_control_array_get_exclusive(struct device_node *node)
467{469{
468 return of_reset_control_array_get(node, false, false);470 return of_reset_control_array_get(node, false, false, true);
469}471}
470 472
471static inline struct reset_control *473static inline struct reset_control *
472of_reset_control_array_get_shared(struct device_node *node)474of_reset_control_array_get_shared(struct device_node *node)
473{475{
474 return of_reset_control_array_get(node, true, false);476 return of_reset_control_array_get(node, true, false, true);
475}477}
476 478
477static inline struct reset_control *479static inline struct reset_control *
478of_reset_control_array_get_optional_exclusive(struct device_node *node)480of_reset_control_array_get_optional_exclusive(struct device_node *node)
479{481{
480 return of_reset_control_array_get(node, false, true);482 return of_reset_control_array_get(node, false, true, true);
481}483}
482 484
483static inline struct reset_control *485static inline struct reset_control *
484of_reset_control_array_get_optional_shared(struct device_node *node)486of_reset_control_array_get_optional_shared(struct device_node *node)
485{487{
486 return of_reset_control_array_get(node, true, true);488 return of_reset_control_array_get(node, true, true, true);
487}489}
488#endif490#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t