From patchwork Mon Jun 8 16:22:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 49635 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4A2E421419 for ; Mon, 8 Jun 2015 16:22:57 +0000 (UTC) Received: by wizw5 with SMTP id w5sf16239039wiz.2 for ; Mon, 08 Jun 2015 09:22:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=VFL0FiIaErM8i/LmBlcoEn7rx93ynY3fzge+cFgEw5I=; b=Y9375dFxlR0LegOpV3yoYAUAPfxmHUguGTXDV10M/c5h2InIBc/OP/MVe2cuctA8ms EQXAVQR1loFVvAWrDLP31PM/IiSKDII2HyWfm9ttNsVhVBbcpZJ0Wpex0T08f6UvoCJr aA7KegM00lUbuNottKFb5cGyFhcUxK/FM3am3aiKRv4yqjKgGE8EF1v/E7imVT6ACOPf DbTAX7LE+FdejeieJ+jTIqH2au4VEvtCIu8yJ9/PFU/hODwzVoRxd0lcqnAbGSgZcTok uDmUDxRq0nnkEwYqFptjjkjkKwDUSbBF41XNyqzsWxNjttA5PM4vsTzn2I4FryWew89f JaMQ== X-Gm-Message-State: ALoCoQk0POyO987qTPaAtp609WDgqhVdGjjN6ppQOl73ECpnrzYAMbFdosTLhuYAF2XKWp1f7LgF X-Received: by 10.112.144.4 with SMTP id si4mr17714914lbb.17.1433780576633; Mon, 08 Jun 2015 09:22:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.30.6 with SMTP id o6ls206824lah.56.gmail; Mon, 08 Jun 2015 09:22:56 -0700 (PDT) X-Received: by 10.152.23.38 with SMTP id j6mr17213401laf.47.1433780576457; Mon, 08 Jun 2015 09:22:56 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id ao2si3180026lac.169.2015.06.08.09.22.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jun 2015 09:22:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by labpy14 with SMTP id py14so101071744lab.0 for ; Mon, 08 Jun 2015 09:22:56 -0700 (PDT) X-Received: by 10.152.4.137 with SMTP id k9mr17622397lak.29.1433780576300; Mon, 08 Jun 2015 09:22:56 -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.108.230 with SMTP id hn6csp1972496lbb; Mon, 8 Jun 2015 09:22:55 -0700 (PDT) X-Received: by 10.68.221.70 with SMTP id qc6mr30705516pbc.76.1433780574531; Mon, 08 Jun 2015 09:22:54 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si4823276pat.91.2015.06.08.09.22.52; Mon, 08 Jun 2015 09:22:54 -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 S1753449AbbFHQWt (ORCPT + 28 others); Mon, 8 Jun 2015 12:22:49 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:33302 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752685AbbFHQWr (ORCPT ); Mon, 8 Jun 2015 12:22:47 -0400 Received: by pdjn11 with SMTP id n11so70297056pdj.0 for ; Mon, 08 Jun 2015 09:22:47 -0700 (PDT) X-Received: by 10.70.49.43 with SMTP id r11mr30473305pdn.91.1433780567333; Mon, 08 Jun 2015 09:22:47 -0700 (PDT) Received: from localhost ([122.167.219.251]) by mx.google.com with ESMTPSA id h11sm3057828pdj.27.2015.06.08.09.22.45 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 08 Jun 2015 09:22:46 -0700 (PDT) Date: Mon, 8 Jun 2015 21:52:42 +0530 From: Viresh Kumar To: Ray Jui Cc: Thomas Gleixner , Daniel Lezcano , linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Florian Fainelli , Scott Branden , bcm-kernel-feedback-list@broadcom.com Subject: Re: [PATCH 4/6] clocksource: bcm_kona: Migrate to new 'set-state' interface Message-ID: <20150608162242.GA4198@linux> References: <37f46a2101da7435343810d9fa94cfae716c377a.1433768426.git.viresh.kumar@linaro.org> <5575BE20.6020102@broadcom.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5575BE20.6020102@broadcom.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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.52 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: , On 08-06-15, 09:09, Ray Jui wrote: > There's a typo here. It's "kona" not "cona" Crap, how does this look: From: Viresh Kumar Date: Fri, 27 Feb 2015 13:39:52 +0530 Subject: [PATCH] clocksource: bcm_kona: Migrate to new 'set-state' interface 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. Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Signed-off-by: Viresh Kumar --- drivers/clocksource/bcm_kona_timer.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) -- 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/ diff --git a/drivers/clocksource/bcm_kona_timer.c b/drivers/clocksource/bcm_kona_timer.c index f1e33d08dd83..9df3f1e3fd0e 100644 --- a/drivers/clocksource/bcm_kona_timer.c +++ b/drivers/clocksource/bcm_kona_timer.c @@ -127,25 +127,25 @@ 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 int kona_timer_set_oneshot(struct clock_event_device *evt) +{ + /* By default mode is one shot, don't do any thing */ + 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, + .set_state_oneshot = kona_timer_set_oneshot, + .tick_resume = kona_timer_shutdown, }; static void __init kona_timer_clockevents_init(void)