From patchwork Mon Aug 10 09:51:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 52219 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id 500272152A for ; Mon, 10 Aug 2015 10:14:24 +0000 (UTC) Received: by labth1 with SMTP id th1sf59833835lab.2 for ; Mon, 10 Aug 2015 03:14:23 -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:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=Ip1eKjjcgKRoqSKLZ4brZq7nMr4atK9+W0jKGZolKCw=; b=Ule1FkNn9fhYB7PKrm1uA6li+HRgdKevwh2rAiVVxEE29cDShm9Zoncq/FY3HdmAK1 oyi/MGohsTGFn9Z0jVb6gBxgm1A1FEOEmALdBqxsGA2QPkKef5CLPE12+REu84YXVx78 glMHfUzJMyNVbvOUJv4cI0mva0FKzAbs4xRolqr39R+CxjEdLnwGxwG5tkCElsbPuVR4 +aaTDOxKA2Vo8ZAbD1vDtwRBzmfkW7I1OLWe1v9Wt5R735GlMxhJW2VE13ELK/OtLYuL DBg65D1IKJONe6oT8gVOn3RYhD/bJNpldEakFQGnpEB31DDnmkEKSubG5nqN7IvClRjz 7Puw== X-Gm-Message-State: ALoCoQl5OVWi8SrCZtTyMLc3/PuJXHrZN330Jg/m93XpG+IchqeSYXYrZPqmUZIkGSJyVUOSduil X-Received: by 10.112.98.42 with SMTP id ef10mr6103492lbb.18.1439201663273; Mon, 10 Aug 2015 03:14:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.7 with SMTP id v7ls735098laa.107.gmail; Mon, 10 Aug 2015 03:14:22 -0700 (PDT) X-Received: by 10.152.6.65 with SMTP id y1mr5138191lay.58.1439201662944; Mon, 10 Aug 2015 03:14:22 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id pm4si13749709lbb.129.2015.08.10.03.14.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Aug 2015 03:14:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbbtg9 with SMTP id tg9so54417989lbb.1 for ; Mon, 10 Aug 2015 03:14:22 -0700 (PDT) X-Received: by 10.152.120.135 with SMTP id lc7mr19154593lab.41.1439201662848; Mon, 10 Aug 2015 03:14:22 -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 l6csp1837799lba; Mon, 10 Aug 2015 03:14:21 -0700 (PDT) X-Received: by 10.68.116.109 with SMTP id jv13mr42303469pbb.137.1439201660978; Mon, 10 Aug 2015 03:14:20 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y10si18716604pde.223.2015.08.10.03.14.20; Mon, 10 Aug 2015 03:14:20 -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 S932858AbbHJKOS (ORCPT + 28 others); Mon, 10 Aug 2015 06:14:18 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:37134 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932714AbbHJJxb (ORCPT ); Mon, 10 Aug 2015 05:53:31 -0400 Received: by wibhh20 with SMTP id hh20so142917783wib.0 for ; Mon, 10 Aug 2015 02:53:30 -0700 (PDT) X-Received: by 10.180.82.98 with SMTP id h2mr21451877wiy.37.1439200410355; Mon, 10 Aug 2015 02:53:30 -0700 (PDT) Received: from localhost.localdomain (sju31-1-78-210-255-2.fbx.proxad.net. [78.210.255.2]) by smtp.gmail.com with ESMTPSA id jr5sm28598154wjc.14.2015.08.10.02.53.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Aug 2015 02:53:29 -0700 (PDT) From: Daniel Lezcano To: mingo@kernel.org Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, Viresh Kumar , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com Subject: [PATCH 04/74] clockevents/drivers/bcm_kona: Migrate to new 'set-state' interface Date: Mon, 10 Aug 2015 11:51:21 +0200 Message-Id: <1439200352-26767-4-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1439200352-26767-1-git-send-email-daniel.lezcano@linaro.org> References: <55C87382.4070309@linaro.org> <1439200352-26767-1-git-send-email-daniel.lezcano@linaro.org> 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: daniel.lezcano@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.217.178 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: , From: Viresh Kumar Migrate bcm_kona driver to the new 'set-state' interface provided by the 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. Oneshot callback isn't required as it was empty. Acked-by: Ray Jui Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Signed-off-by: Viresh Kumar Signed-off-by: Daniel Lezcano --- drivers/clocksource/bcm_kona_timer.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/clocksource/bcm_kona_timer.c b/drivers/clocksource/bcm_kona_timer.c index f1e33d0..e717e87 100644 --- a/drivers/clocksource/bcm_kona_timer.c +++ b/drivers/clocksource/bcm_kona_timer.c @@ -127,25 +127,18 @@ static int kona_timer_set_next_event(unsigned long clc, return 0; } -static void kona_timer_set_mode(enum clock_event_mode mode, - struct clock_event_device *unused) +static int kona_timer_shutdown(struct clock_event_device *evt) { - switch (mode) { - case CLOCK_EVT_MODE_ONESHOT: - /* by default mode is one shot don't do any thing */ - break; - case CLOCK_EVT_MODE_UNUSED: - case CLOCK_EVT_MODE_SHUTDOWN: - default: - kona_timer_disable_and_clear(timers.tmr_regs); - } + kona_timer_disable_and_clear(timers.tmr_regs); + return 0; } static struct clock_event_device kona_clockevent_timer = { .name = "timer 1", .features = CLOCK_EVT_FEAT_ONESHOT, .set_next_event = kona_timer_set_next_event, - .set_mode = kona_timer_set_mode + .set_state_shutdown = kona_timer_shutdown, + .tick_resume = kona_timer_shutdown, }; static void __init kona_timer_clockevents_init(void)