From patchwork Mon Mar 11 23:05:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 2251851 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 63744DFE76 for ; Mon, 11 Mar 2013 23:06:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754673Ab3CKXFx (ORCPT ); Mon, 11 Mar 2013 19:05:53 -0400 Received: from mail-oa0-f52.google.com ([209.85.219.52]:48945 "EHLO mail-oa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754301Ab3CKXFk (ORCPT ); Mon, 11 Mar 2013 19:05:40 -0400 Received: by mail-oa0-f52.google.com with SMTP id k14so5190009oag.11 for ; Mon, 11 Mar 2013 16:05:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=6lMw7rPqz+CviVoZnI/e4QtKnWBJMcineUoVI2lq6ug=; b=u45sCCP/FZ5dHM26jEooXuOxd1q9IM79HOb/KICZ3bHDLYdMeOpVNRFYLa103zb7mH APH4DfAykbQ8Q/M/xUPMrcXS40DszTQ+Fejxs7QSD/m5UYPyugqyLezVbM82u500uMyR 5gRqyCe6kBw9aM7nSjXH8kNJf3FiZ/UghfGY09HaH/YZ/lV+LUy0Ll4CkDxCAEBndqVH NaByup9JxdadaQpTCaKebf3mhZaCSnM7VXauEeTz4DbkL9GKJL5OxXycAW3joD0JfJ2N rSQie2KCLnUy9PXUNxf/eNANSTWqs9CyiEZ+w/XzTRlpK8ycOtXGBDE71NNKGxGid06a 4AYg== X-Received: by 10.60.3.10 with SMTP id 10mr10797527oey.61.1363043139782; Mon, 11 Mar 2013 16:05:39 -0700 (PDT) Received: from localhost (cpe-24-27-111-228.tx.res.rr.com. [24.27.111.228]) by mx.google.com with ESMTPS id ad19sm19711242oec.0.2013.03.11.16.05.38 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 11 Mar 2013 16:05:39 -0700 (PDT) From: Nishanth Menon To: cpufreq Cc: Nishanth Menon , "Rafael J. Wysocki" , Santosh Shilimkar , Shawn Guo , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup Date: Mon, 11 Mar 2013 18:05:30 -0500 Message-Id: <1363043130-30270-3-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1363043130-30270-1-git-send-email-nm@ti.com> References: <1363043130-30270-1-git-send-email-nm@ti.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver) now forces platform device to be registered for allowing cpufreq-cpu0 to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c However, for SoCs that wish to link up using device tree, instead of platform device, provide compatibility string match: compatible = "cpufreq,cpu0"; Cc: "Rafael J. Wysocki" Cc: Santosh Shilimkar Cc: Shawn Guo Cc: linux-kernel@vger.kernel.org Cc: cpufreq@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: linux-omap@vger.kernel.org Signed-off-by: Nishanth Menon Acked-by: Santosh Shilimkar --- .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt | 3 +++ drivers/cpufreq/cpufreq-cpu0.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt index f180963..a5699f0 100644 --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt @@ -10,6 +10,8 @@ under node /cpus/cpu@0. Required properties: - operating-points: Refer to Documentation/devicetree/bindings/power/opp.txt for details +- compatible: if platform_device is *not* used, should be: + "cpufreq,cpu0" Optional properties: - clock-name: If the clock is not converted to device tree, then describe @@ -24,6 +26,7 @@ Examples: cpus { #address-cells = <1>; #size-cells = <0>; + compatible = "cpufreq,cpu0"; cpu@0 { compatible = "arm,cortex-a9"; diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c index 28223c9..a6f0a9b 100644 --- a/drivers/cpufreq/cpufreq-cpu0.c +++ b/drivers/cpufreq/cpufreq-cpu0.c @@ -277,9 +277,15 @@ static int cpu0_cpufreq_remove(struct platform_device *pdev) return 0; } +static struct of_device_id of_cpu0_cpufreq_match[] = { + { .compatible = "cpufreq,cpu0", }, + { /* end */ } +}; + static struct platform_driver cpu0_cpufreq_platdrv = { .driver = { .name = "cpufreq-cpu0", + .of_match_table = of_cpu0_cpufreq_match, .owner = THIS_MODULE, }, .probe = cpu0_cpufreq_probe,