mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
reset: Add of_reset_control_get
In some cases, you might need to deassert from reset an hardware block that doesn't associated to a struct device (CPUs, timers, etc.). Add a small helper to retrieve the reset controller from the device tree without the need to pass a struct device. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
parent
0c5b2b915a
commit
fc0a592156
2 changed files with 34 additions and 9 deletions
|
@ -1,6 +1,8 @@
|
|||
#ifndef _LINUX_RESET_H_
|
||||
#define _LINUX_RESET_H_
|
||||
|
||||
#include <linux/of.h>
|
||||
|
||||
struct device;
|
||||
struct reset_control;
|
||||
|
||||
|
@ -8,6 +10,8 @@ int reset_control_reset(struct reset_control *rstc);
|
|||
int reset_control_assert(struct reset_control *rstc);
|
||||
int reset_control_deassert(struct reset_control *rstc);
|
||||
|
||||
struct reset_control *of_reset_control_get(struct device_node *node,
|
||||
const char *id);
|
||||
struct reset_control *reset_control_get(struct device *dev, const char *id);
|
||||
void reset_control_put(struct reset_control *rstc);
|
||||
struct reset_control *devm_reset_control_get(struct device *dev, const char *id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue