aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/reset/core.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-12-04 10:57:36 -0500
committerArnd Bergmann <arnd@arndb.de>2014-12-04 10:57:36 -0500
commita8afa2645ccf3525409c749c1dc4ec1cf95ff3f5 (patch)
tree0148315475b348246201f4d57b7ed5802f76cfb2 /drivers/reset/core.c
parent136a713d80476fe993284bdf8b21709c179c9965 (diff)
parentf200890f224d9ed0af207145a2279f51c6be230b (diff)
Merge tag 'reset-for-3.19-2' of git://git.pengutronix.de/git/pza/linux into next/drivers
Pull "Reset controller changes for v3.19" from Philipp Zabel: This adds a new driver for the sti soc family, and creates a reset_control_status interface, which is added to the existing drivers. * tag 'reset-for-3.19-2' of git://git.pengutronix.de/git/pza/linux: reset: add socfpga_reset_status reset: sti: Document sti-picophyreset controllers bindings. reset: stih407: Add softreset, powerdown and picophy controllers reset: stih407: Add reset controllers DT bindings reset: add reset_control_status helper function Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/reset/core.c')
-rw-r--r--drivers/reset/core.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index baeaf82d40d9..7955e00d04d4 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -126,6 +126,21 @@ int reset_control_deassert(struct reset_control *rstc)
126EXPORT_SYMBOL_GPL(reset_control_deassert); 126EXPORT_SYMBOL_GPL(reset_control_deassert);
127 127
128/** 128/**
129 * reset_control_status - returns a negative errno if not supported, a
130 * positive value if the reset line is asserted, or zero if the reset
131 * line is not asserted.
132 * @rstc: reset controller
133 */
134int reset_control_status(struct reset_control *rstc)
135{
136 if (rstc->rcdev->ops->status)
137 return rstc->rcdev->ops->status(rstc->rcdev, rstc->id);
138
139 return -ENOSYS;
140}
141EXPORT_SYMBOL_GPL(reset_control_status);
142
143/**
129 * of_reset_control_get - Lookup and obtain a reference to a reset controller. 144 * of_reset_control_get - Lookup and obtain a reference to a reset controller.
130 * @node: device to be reset by the controller 145 * @node: device to be reset by the controller
131 * @id: reset line name 146 * @id: reset line name