From patchwork Wed Nov 19 07:46:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 41106 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 57906241C9 for ; Wed, 19 Nov 2014 07:46:30 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id e53sf316836eek.11 for ; Tue, 18 Nov 2014 23:46:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :date:message-id:subject:from:to:cc:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=Ao85Jm+tQ23L27/E8qSLTY6UjYVJoxYys2pMFZHGsl0=; b=S7fNP0pT9YlrAJAIyr97Wi7MygB/yWWAHJ710NK4ylhDHIB3vSkPIeIDJDMdyLP+z1 HsE9dfxCWft7Spz0cnEabSd2sMXle7RyujvREb7K/GmKgrjlPKOk4OSEc6meNMsFp2j8 FEeLs3J7n5umn1DeoL3kWPRnXmEN1C+jLhbNwnEYkKOM640foLBYS3UdCcXzINrqkysK 1G+5B58diuOn3J52xtF6yTmFhsUVDtRHA6cM14z51SIjx2qhCi1E3SmtJd9cLEH5OkZD BHYDvhyVYQChK31BSd2bt4IRD/V3sqsgoo7M2iFlnvAaqBdm0EtiifGqYvrYSF39UA6/ Qahg== X-Gm-Message-State: ALoCoQn0MCQMZ9QimBkIl7su95gOobONczwdQcsdmVnJZaVhcg1x/zRnQCpurEf8biTRpg6Fa6T1 X-Received: by 10.180.19.226 with SMTP id i2mr6784701wie.5.1416383189588; Tue, 18 Nov 2014 23:46:29 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.6.12 with SMTP id cq12ls675210lad.42.gmail; Tue, 18 Nov 2014 23:46:29 -0800 (PST) X-Received: by 10.112.166.101 with SMTP id zf5mr3965883lbb.42.1416383189208; Tue, 18 Nov 2014 23:46:29 -0800 (PST) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id bc18si785624lab.128.2014.11.18.23.46.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Nov 2014 23:46:29 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by mail-lb0-f174.google.com with SMTP id w7so34461lbi.19 for ; Tue, 18 Nov 2014 23:46:29 -0800 (PST) X-Received: by 10.153.7.170 with SMTP id dd10mr3886157lad.44.1416383188983; Tue, 18 Nov 2014 23:46:28 -0800 (PST) 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.184.201 with SMTP id ew9csp41796lbc; Tue, 18 Nov 2014 23:46:28 -0800 (PST) X-Received: by 10.70.95.4 with SMTP id dg4mr18366235pdb.85.1416383187245; Tue, 18 Nov 2014 23:46:27 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nt8si1043555pdb.253.2014.11.18.23.46.26 for ; Tue, 18 Nov 2014 23:46:27 -0800 (PST) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754946AbaKSHqZ (ORCPT + 12 others); Wed, 19 Nov 2014 02:46:25 -0500 Received: from mail-oi0-f41.google.com ([209.85.218.41]:65352 "EHLO mail-oi0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754836AbaKSHqY (ORCPT ); Wed, 19 Nov 2014 02:46:24 -0500 Received: by mail-oi0-f41.google.com with SMTP id a3so30385oib.14 for ; Tue, 18 Nov 2014 23:46:24 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.202.91.138 with SMTP id p132mr32898810oib.40.1416383184387; Tue, 18 Nov 2014 23:46:24 -0800 (PST) Received: by 10.182.233.170 with HTTP; Tue, 18 Nov 2014 23:46:24 -0800 (PST) In-Reply-To: <1714555.tu97zMrOn0@vostro.rjw.lan> References: <7017fa592bdaf73c260ad001a2b7abdc8d14f08a.1416211616.git.viresh.kumar@linaro.org> <2808463.UGmrrQ79Aq@vostro.rjw.lan> <1714555.tu97zMrOn0@vostro.rjw.lan> Date: Wed, 19 Nov 2014 13:16:24 +0530 Message-ID: Subject: Re: [PATCH] opp: convert dev_warn() to dev_dbg() for duplicate OPPs From: Viresh Kumar To: "Rafael J. Wysocki" Cc: Stefan Wahren , Lists linaro-kernel , "linux-pm@vger.kernel.org" , Nishanth Menon , "linux-arm-kernel@lists.infradead.org" Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@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.217.174 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 19 November 2014 02:21, Rafael J. Wysocki wrote: > On Tuesday, November 18, 2014 08:38:14 AM Viresh Kumar wrote: >> We are allowing addition of duplicate OPPs as a standard thing right now >> as cpufreq drivers don't get rid of the OPPs they create with DT. So, that >> shouldn't complain, isn't it ? > > Is cpufreq the only user of OPP? I thought there were other users, so what > about them? Probably of CPU OPPs, but I am not sure. Obviously dev OPPs can be used by others. > I'm not sure about that. If they aren't useful for anything after > that, what's the benefit of keeping them around? I don't think they are of any use once the driver is gone, unless the driver is inserted again. So, this is what we can do to distinguish DT OPPs with other dynamic ones: Does this look fine? I can then write of_free_opp_table(), opposite of of_init_opp_table(). --- 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 490e9db..7e25f01 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c @@ -49,6 +49,7 @@ * are protected by the dev_opp_list_lock for integrity. * IMPORTANT: the opp nodes should be maintained in increasing * order. + * @from_dt: created from static DT entries. * @available: true/false - marks if this OPP as available or not * @rate: Frequency in hertz * @u_volt: Nominal voltage in microvolts corresponding to this OPP @@ -61,6 +62,7 @@ struct dev_pm_opp { struct list_head node; bool available; + bool from_dt; unsigned long rate; unsigned long u_volt;