Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755137AbbHFJLc (ORCPT ); Thu, 6 Aug 2015 05:11:32 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:33218 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754526AbbHFJL3 (ORCPT ); Thu, 6 Aug 2015 05:11:29 -0400 From: Viresh Kumar To: linus.walleij@linaro.org, arm@kernel.org, olof@lixom.net, hsweeten@visionengravers.com Cc: linaro-kernel@lists.linaro.org, Thomas Gleixner , Daniel Lezcano , arnd.bergmann@linaro.org, Viresh Kumar , linux-arm-kernel@lists.infradead.org (moderated list:ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list), Russell King , Ryan Mallon Subject: [PATCH] ARM/EP93xx/timer: Migrate to new 'set-state' interface Date: Thu, 6 Aug 2015 14:41:13 +0530 Message-Id: <744dca162a7626694770a9f51457566a33c3e08f.1438852023.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1991 Lines: 61 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/