Commit graph

4 commits

Author SHA1 Message Date
Hans de Goede e3ec0a8c6e reset: Add of_reset_control_get to reset.h
of_reset_control_get is not declared static in drivers/reset/core.c, which
is correct as we want to use it elsewhere too. But it does not have a
protype declared anywhere under include/linux. Add a prototype / stub for it
to linux/reset.h to fix this.

Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2014-04-14 16:47:28 +02:00
Philipp Zabel b424080a9e reset: Add optional resets and stubs
This patch adds device_reset_optional and (devm_)reset_control_get_optional
variants that drivers can use to indicate they can function without control
over the reset line. For those functions, stubs are added so the drivers can
be compiled with CONFIG_RESET_CONTROLLER disabled.
Also, device_reset is annotated with __must_check. Drivers ignoring the return
value should use device_reset_optional instead.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
2014-03-09 19:53:45 +01:00
Maxime Ripard fc0a592156 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>
2014-02-03 10:19:40 +01:00
Philipp Zabel 61fc413176 reset: Add reset controller API
This adds a simple API for devices to request being reset
by separate reset controller hardware and implements the
reset signal device tree binding.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
2013-04-12 10:26:23 +02:00