From: viresh.kumar@linaro.org (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM/EP93xx/timer: Migrate to new 'set-state' interface
Date: Thu, 6 Aug 2015 14:41:13 +0530 [thread overview]
Message-ID: <744dca162a7626694770a9f51457566a33c3e08f.1438852023.git.viresh.kumar@linaro.org> (raw)
Migrate EP93xx driver to the new 'set-state' interface provided by
clockevents core, the earlier 'set-mode' interface is marked obsolete
now.
This also enables us to implement callbacks for new states of clockevent
devices, for example: ONESHOT_STOPPED.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
Linus,
All other clockevent drivers are migrated to the new interface and yours
was left as it adapted generic clockevents framework just now.
Probably Olof can apply it directly to ARM SoC tree..
arch/arm/mach-ep93xx/timer-ep93xx.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-ep93xx/timer-ep93xx.c b/arch/arm/mach-ep93xx/timer-ep93xx.c
index ac48ac1fd16d..e5f791145bd0 100644
--- a/arch/arm/mach-ep93xx/timer-ep93xx.c
+++ b/arch/arm/mach-ep93xx/timer-ep93xx.c
@@ -86,19 +86,22 @@ static int ep93xx_clkevt_set_next_event(unsigned long next,
}
-static void ep93xx_clkevt_set_mode(enum clock_event_mode mode,
- struct clock_event_device *evt)
+static int ep93xx_clkevt_shutdown(struct clock_event_device *evt)
{
/* Disable timer */
writel(0, EP93XX_TIMER3_CONTROL);
+
+ return 0;
}
static struct clock_event_device ep93xx_clockevent = {
- .name = "timer1",
- .features = CLOCK_EVT_FEAT_ONESHOT,
- .set_mode = ep93xx_clkevt_set_mode,
- .set_next_event = ep93xx_clkevt_set_next_event,
- .rating = 300,
+ .name = "timer1",
+ .features = CLOCK_EVT_FEAT_ONESHOT,
+ .set_state_shutdown = ep93xx_clkevt_shutdown,
+ .set_state_oneshot = ep93xx_clkevt_shutdown,
+ .tick_resume = ep93xx_clkevt_shutdown,
+ .set_next_event = ep93xx_clkevt_set_next_event,
+ .rating = 300,
};
static irqreturn_t ep93xx_timer_interrupt(int irq, void *dev_id)
--
2.4.0
next reply other threads:[~2015-08-06 9:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 9:11 Viresh Kumar [this message]
2015-08-10 9:01 ` [PATCH] ARM/EP93xx/timer: Migrate to new 'set-state' interface Linus Walleij
2015-08-10 9:03 ` Viresh Kumar
2015-08-11 13:19 ` Olof Johansson
2015-08-11 14:07 ` Viresh Kumar
2015-08-12 16:39 ` Hartley Sweeten
2015-08-13 9:24 ` Olof Johansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=744dca162a7626694770a9f51457566a33c3e08f.1438852023.git.viresh.kumar@linaro.org \
--to=viresh.kumar@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).