[PATCH 41/41] clocksource: zevio: Migrate to new 'set-state' interface

Viresh Kumar viresh.kumar at linaro.org
Fri Jul 3 01:56:19 PDT 2015


On 02-07-15, 22:11, Daniel Lezcano wrote:
> On 06/18/2015 12:54 PM, Viresh Kumar wrote:
> >Migrate zevio 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.
> >
> >Cc: Daniel Tang <dt.tangr at gmail.com>
> >Signed-off-by: Viresh Kumar <viresh.kumar at linaro.org>
> >---
> 
> [ ... ]
> 
> >  static irqreturn_t zevio_timer_interrupt(int irq, void *dev_id)
> >@@ -162,7 +158,9 @@ static int __init zevio_timer_add(struct device_node *node)
> >  	if (timer->interrupt_regs && irqnr) {
> >  		timer->clkevt.name		= timer->clockevent_name;
> >  		timer->clkevt.set_next_event	= zevio_timer_set_event;
> >-		timer->clkevt.set_mode		= zevio_timer_set_mode;
> >+		timer->clkevt.set_state_shutdown = zevio_timer_shutdown;
> >+		timer->clkevt.set_state_oneshot = zevio_timer_set_oneshot;
> >+		timer->clkevt.tick_resume	= zevio_timer_set_oneshot;
> 
> Why is tick_resume added here ?

I am assuming you are lost because of reviewing too many similar
patches, but anyway below was part of the diff and so resume was
required :)

-       switch (mode) {
-       case CLOCK_EVT_MODE_RESUME:
-       case CLOCK_EVT_MODE_ONESHOT:
-               /* Enable timer interrupts */
-               writel(TIMER_INTR_MSK, timer->interrupt_regs + IO_INTR_MSK);
-               writel(TIMER_INTR_ALL, timer->interrupt_regs + IO_INTR_ACK);
-               break;

-- 
viresh



More information about the linux-arm-kernel mailing list