From patchwork Thu Sep 12 10:10:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19995 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C70CE25B63 for ; Thu, 12 Sep 2013 10:11:08 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id hf12sf11626281vcb.7 for ; Thu, 12 Sep 2013 03:11: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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=zjIc1V878BZ7ip6hQjsKvNoo8Hs1bxjEdSpdcWptWLs=; b=F8dLapEiOOCtPtAjP/A4Zep1w0bR1PIJYhy6sAgcVbyBr92murs9yxCplHX/Ggo8Ls 0vaEE91Gfy/Hun4SIT8TRntmn8WEDnn77BU2oU0FCpEd4Q8dMRCXhFVP2SrjIyBD85KD 4Pq6Y/xg9uwm4O2VPhIWBLYw8+PZCjEiI2yZ2Tr9QvF+FgV4RZd0rO7TkE0csZm6MxTt JH1NUEohtr24rmBFQIiJPGM+P0U2VUXyGAOIwJfprn8DYnz+lBfRunbbH1KkFN/COijC gXjUhHgQxfo+3czoSAKJt00gTBk8fgD9xmJ472OHNF9rynXEBSnt3KsDkie24Hb/+pEk SXOg== X-Gm-Message-State: ALoCoQl5EpeNPohQg5wim9dv8YFmrfW6u/UOBMlWXGrU4c/dCHJc8yub3JB2xXtvINjCuUhR6q2I X-Received: by 10.236.0.232 with SMTP id 68mr2532801yhb.16.1378980668569; Thu, 12 Sep 2013 03:11:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.39.104 with SMTP id o8ls611961qek.38.gmail; Thu, 12 Sep 2013 03:11:08 -0700 (PDT) X-Received: by 10.58.233.173 with SMTP id tx13mr70448vec.31.1378980668323; Thu, 12 Sep 2013 03:11:08 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id l8si967420vez.10.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Sep 2013 03:11:08 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id gf11so6889276vcb.25 for ; Thu, 12 Sep 2013 03:11:08 -0700 (PDT) X-Received: by 10.58.233.173 with SMTP id tx13mr70443vec.31.1378980668240; Thu, 12 Sep 2013 03:11:08 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp11302vcz; Thu, 12 Sep 2013 03:11:07 -0700 (PDT) X-Received: by 10.67.11.103 with SMTP id eh7mr8596674pad.153.1378980667340; Thu, 12 Sep 2013 03:11:07 -0700 (PDT) Received: from mail-pb0-f45.google.com (mail-pb0-f45.google.com [209.85.160.45]) by mx.google.com with ESMTPS id ct5si2348678pbb.251.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Sep 2013 03:11:07 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.45 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.45; Received: by mail-pb0-f45.google.com with SMTP id mc17so10281722pbc.18 for ; Thu, 12 Sep 2013 03:11:06 -0700 (PDT) X-Received: by 10.68.134.65 with SMTP id pi1mr6726109pbb.59.1378980666160; Thu, 12 Sep 2013 03:11:06 -0700 (PDT) Received: from localhost ([106.197.30.106]) by mx.google.com with ESMTPSA id oh2sm3819259pbb.3.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 12 Sep 2013 03:11:05 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, g.liakhovetski@gmx.de, amit.daniel@samsung.com, kgene.kim@samsung.com, Viresh Kumar Subject: [PATCH 1/2] cpufreq: distinguish drivers that do asynchronous notifications Date: Thu, 12 Sep 2013 15:40:45 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , There are few special cases like exynos5440 which doesn't send POSTCHANGE notification from their ->target() routine and call some kind of bottom halves for doing this work, work/tasklet/etc.. From which they finally send POSTCHANGE notification. Its better if we distinguish them from other cpufreq drivers in some way so that core can handle them specially. So this patch introduces another flag: CPUFREQ_ASYNC_NOTIFICATION, which will be set by such drivers. This also changes exynos5440-cpufreq.c in order to set this flag. Signed-off-by: Viresh Kumar --- drivers/cpufreq/exynos5440-cpufreq.c | 2 +- include/linux/cpufreq.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/exynos5440-cpufreq.c b/drivers/cpufreq/exynos5440-cpufreq.c index d514c15..f44664a 100644 --- a/drivers/cpufreq/exynos5440-cpufreq.c +++ b/drivers/cpufreq/exynos5440-cpufreq.c @@ -342,7 +342,7 @@ static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy) } static struct cpufreq_driver exynos_driver = { - .flags = CPUFREQ_STICKY, + .flags = CPUFREQ_STICKY | CPUFREQ_ASYNC_NOTIFICATION, .verify = exynos_verify_speed, .target = exynos_target, .get = exynos_getspeed, diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index fcabc42..3cefb7b 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -218,6 +218,12 @@ struct cpufreq_driver { * frequency transitions */ #define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed * mismatches */ +/* + * Driver will do POSTCHANGE notifications from outside of their ->target() + * routine and so must set cpufreq_driver->flags with this flag, so that core + * can handle them specially. + */ +#define CPUFREQ_ASYNC_NOTIFICATION 0x08 int cpufreq_register_driver(struct cpufreq_driver *driver_data); int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);