From patchwork Tue May 20 22:30:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Soren Brinkmann X-Patchwork-Id: 4213341 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2F632BEEAB for ; Tue, 20 May 2014 22:33:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6020220353 for ; Tue, 20 May 2014 22:33:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6B17A20320 for ; Tue, 20 May 2014 22:33:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751138AbaETWd2 (ORCPT ); Tue, 20 May 2014 18:33:28 -0400 Received: from mail-bn1blp0186.outbound.protection.outlook.com ([207.46.163.186]:28082 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751103AbaETWd1 (ORCPT ); Tue, 20 May 2014 18:33:27 -0400 Received: from BN1BFFO11FD024.protection.gbl (10.58.144.34) by BN1BFFO11HUB042.protection.gbl (10.58.144.189) with Microsoft SMTP Server (TLS) id 15.0.949.9; Tue, 20 May 2014 22:33:24 +0000 Received: from xsj-gw1 (149.199.60.83) by BN1BFFO11FD024.mail.protection.outlook.com (10.58.144.87) with Microsoft SMTP Server id 15.0.949.9 via Frontend Transport; Tue, 20 May 2014 22:33:23 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-smtp1) by xsj-gw1 with esmtp (Exim 4.63) (envelope-from ) id 1Wmsb5-0007O5-GI; Tue, 20 May 2014 15:33:23 -0700 Date: Tue, 20 May 2014 15:30:12 -0700 From: =?utf-8?B?U8O2cmVu?= Brinkmann To: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , "Rafael J. Wysocki" , Len Brown , Pavel Machek , Greg Kroah-Hartman , Viresh Kumar CC: =?utf-8?B?U8O2cmVu?= Brinkmann , , , Subject: [RFC] Migrate to Hz resolution for OPP binding MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Message-ID: <672dd8e9-2857-49fb-848f-d38d38b23c9b@BN1BFFO11FD024.protection.gbl> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.83; CTRY:US; IPV:NLI; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(438001)(164054003)(189002)(199002)(81542001)(102836001)(33646001)(21056001)(85182001)(85202002)(87936001)(74502001)(76482001)(4396001)(46102001)(50466002)(74316001)(31966008)(74662001)(81342001)(99396002)(54356999)(50986999)(70736001)(92566001)(92726001)(86362001)(83506001)(19580395003)(47776003)(79102001)(85852003)(83072002)(53416003)(44976005)(64706001)(15975445006)(31696002)(77982001)(83322001)(23676002)(80022001)(20776003)(921003)(1121002); DIR:OUT; SFP:; SCL:1; SRVR:BN1BFFO11HUB042; H:xsj-gw1; FPR:; MLV:sfv; PTR:unknown-60-83.xilinx.com; MX:1; A:1; LANG:en; X-OriginatorOrg: xilinx.onmicrosoft.com X-Forefront-PRVS: 02176E2458 Received-SPF: Pass (: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=; client-ip=149.199.60.83; helo=xsj-gw1; Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=soren.brinkmann@xilinx.com; Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, I guess this is just to evaluate how big the lynch mob will be. Anyway: Triggered by this discussion https://lkml.org/lkml/2014/5/15/46, I looked a little into what it would take to migrate everybody to Hz frequency resolutions to avoid all the conversions between cpufreq, CCF, OPPs, etc. Turns out, OPPs are already stored in Hz resolution in the kernel, but the DT bindings use kHz resolution to specify them in DT. So, code-wise there is just a removal of a multiplication in the OPP parser (see below), but then there are the DT bindings... As plan B, I was thinking to add the property 'operating-points-hz'... Any better ideas? Thanks, Sören --- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c index 25538675d59e..61795111e8ca 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c @@ -731,7 +731,7 @@ int of_init_opp_table(struct device *dev) val = prop->value; while (nr) { - unsigned long freq = be32_to_cpup(val++) * 1000; + unsigned long freq = be32_to_cpup(val++); unsigned long volt = be32_to_cpup(val++); if (dev_pm_opp_add(dev, freq, volt)) {