linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] clk: sunxi-ng: Provide a default reset hook
@ 2017-08-25  9:49 Maxime Ripard
  2017-08-25  9:49 ` [PATCH 2/2] mmc: sunxi: Reset the device at probe time Maxime Ripard
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Maxime Ripard @ 2017-08-25  9:49 UTC (permalink / raw)
  To: linux-arm-kernel

The reset hook was left implemented. Provide a dumb implementation so that
client drivers can depend on it.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 drivers/clk/sunxi-ng/ccu_reset.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/clk/sunxi-ng/ccu_reset.c b/drivers/clk/sunxi-ng/ccu_reset.c
index 6c31d48783a7..1dc4e98ea802 100644
--- a/drivers/clk/sunxi-ng/ccu_reset.c
+++ b/drivers/clk/sunxi-ng/ccu_reset.c
@@ -8,6 +8,7 @@
  * the License, or (at your option) any later version.
  */
 
+#include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/reset-controller.h>
 
@@ -49,7 +50,18 @@ static int ccu_reset_deassert(struct reset_controller_dev *rcdev,
 	return 0;
 }
 
+static int ccu_reset_reset(struct reset_controller_dev *rcdev,
+			   unsigned long id)
+{
+	ccu_reset_assert(rcdev, id);
+	udelay(10);
+	ccu_reset_deassert(rcdev, id);
+
+	return 0;
+}
+
 const struct reset_control_ops ccu_reset_ops = {
 	.assert		= ccu_reset_assert,
 	.deassert	= ccu_reset_deassert,
+	.reset		= ccu_reset_reset,
 };
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-09-01 20:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-25  9:49 [PATCH 1/2] clk: sunxi-ng: Provide a default reset hook Maxime Ripard
2017-08-25  9:49 ` [PATCH 2/2] mmc: sunxi: Reset the device at probe time Maxime Ripard
2017-08-30 13:14   ` Ulf Hansson
2017-08-27 13:01 ` [PATCH 1/2] clk: sunxi-ng: Provide a default reset hook icenowy at aosc.io
2017-08-27 13:10   ` Chen-Yu Tsai
2017-08-30 12:29 ` Ulf Hansson
2017-08-30 12:36   ` Maxime Ripard
2017-08-30 13:14     ` Ulf Hansson
2017-09-01 20:30       ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).