[RFC PATCHv4 4/6] clocksource: TI-Nspire timer support

From
Linus Walleij <hidden>
Date
2013-05-27 10:53:16
Also in
lkml
Reply to
Daniel Tang, 2013-05-25
On Sat, May 25, 2013 at 1:08 PM, Daniel Tang [off-list ref] wrote:
Add clocksource and clockevent driver for the TI-Nspire.

Signed-off-by: Daniel Tang <redacted>
This is *much* improved :-D

But:
quoted hunk ↗ jump to hunk
+++ b/drivers/clocksource/zevio-timer.c
quoted hunk ↗ jump to hunk
+static void zevio_timer_set_mode(enum clock_event_mode mode,
+               struct clock_event_device *dev)
+{
+       unsigned long flags;
+       struct zevio_timer *timer = container_of(dev,
+                       struct zevio_timer,
+                       clkevt);
+
+       local_irq_save(flags);
+
+       switch (mode) {
+       case CLOCK_EVT_MODE_PERIODIC:
+               /* Unsupported */
+               break;
+       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);
+               dev->mode = mode;
+               break;
+       case CLOCK_EVT_MODE_SHUTDOWN:
+       case CLOCK_EVT_MODE_UNUSED:
+               /* Disable timer interrupts */
+               writel(0, timer->interrupt_regs + IO_INTR_MSK);
+               writel(TIMER_INTR_ALL, timer->interrupt_regs + IO_INTR_ACK);
+               /* Stop timer */
+               writel(CNTL_STOP_TIMER, timer->timer1 + IO_CONTROL);
+               dev->mode = mode;
+               break;
+       }
Surely both the compiler and checkpatch is complaining that this
switch does not contain a default: clause?

If you fix this you can add my:
Reviewed-by: Linus Walleij <redacted>

Yours,
Linus Walleij
Thread (28 messages) 28 messages, 9 authors, last reply 2013-05-31
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help