Skip to content

Commit

Permalink
clk: sunxi-ng: Provide a default reset hook
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Maxime Ripard authored and Ulf Hansson committed Aug 30, 2017
1 parent d341ca8 commit 734d21c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/clk/sunxi-ng/ccu_reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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,
};

0 comments on commit 734d21c

Please sign in to comment.