From patchwork Thu Aug 6 09:11:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 51995 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id 64FFD22A15 for ; Thu, 6 Aug 2015 09:18:09 +0000 (UTC) Received: by lagz9 with SMTP id z9sf6042396lag.3 for ; Thu, 06 Aug 2015 02:18:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=YStAa7TY4CW723/qGMnu94uDvPm8Tw3KZlb/Hi8S00E=; b=E+zYXeV69XIQRzLEDPU3LOKZm9C6iHowsL1niR4MsQ/uxm68m8sy+Z7guMGiAIJUzh 3xuKkuWsVNSBB6BdR1t4T5pfhrHL/usn0Q83xl1QwMsdz+1/+irY8uuT+b5WrEONlPcN McMijfgT5IKUDVl7mU8vYkhIaCPw/TaYvz3pOcrMzfqLFSABCvc8KcJjbtkD5TY2kEht hWuTTWhj3CRA4ZJzEvyL07HeDEPS3WQIL8HnZOphUUa27RoxyL4ubaFwh9yC9s1uMcmi j6cWVN7SfMEPaG5/Gn5+nAp1ubcBrwLsajvGglt7LpZFLcQy0Qu+93wRqw6F+dRW3zYM KwZA== X-Gm-Message-State: ALoCoQnvn26yLjN5P5lwk+Dni3PWMUOC9EFrNI5qgTtvhjJaLbptCfLzfbvmomUI5b1rSjxt+by0 X-Received: by 10.180.83.33 with SMTP id n1mr658090wiy.4.1438852298461; Thu, 06 Aug 2015 02:11:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.227 with SMTP id n3ls313360lan.0.gmail; Thu, 06 Aug 2015 02:11:38 -0700 (PDT) X-Received: by 10.112.125.200 with SMTP id ms8mr590124lbb.60.1438852298264; Thu, 06 Aug 2015 02:11:38 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id wr11si4251026lbc.105.2015.08.06.02.11.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Aug 2015 02:11:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by labkb6 with SMTP id kb6so23109146lab.2 for ; Thu, 06 Aug 2015 02:11:37 -0700 (PDT) X-Received: by 10.152.203.134 with SMTP id kq6mr580926lac.106.1438852297814; Thu, 06 Aug 2015 02:11:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp820559lba; Thu, 6 Aug 2015 02:11:36 -0700 (PDT) X-Received: by 10.68.248.102 with SMTP id yl6mr1371324pbc.66.1438852295984; Thu, 06 Aug 2015 02:11:35 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ro7si10414600pab.52.2015.08.06.02.11.34; Thu, 06 Aug 2015 02:11:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755138AbbHFJLc (ORCPT + 28 others); 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 Received: by pabyb7 with SMTP id yb7so26272393pab.0 for ; Thu, 06 Aug 2015 02:11:29 -0700 (PDT) X-Received: by 10.68.226.195 with SMTP id ru3mr1411176pbc.22.1438852289260; Thu, 06 Aug 2015 02:11:29 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id vg4sm5695948pbc.90.2015.08.06.02.11.28 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 06 Aug 2015 02:11:28 -0700 (PDT) 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 Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Acked-by: Linus Walleij --- 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)