linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: linux-omap <linux-omap@vger.kernel.org>
Cc: Nishanth Menon <nm@ti.com>,
	Eduardo Valentin <eduardo.valentin@nokia.com>,
	Kevin Hilman <khilman@deeprootsystems.com>,
	Paul Walmsley <paul@pwsan.com>, Rajendra Nayak <rnayak@ti.com>,
	Sanjeev Premi <premi@ti.com>, Thara Gopinath <thara@ti.com>,
	Tony Lindgren <tony@atomide.com>
Subject: [PM-OPP][PATCH 1/2] omap: pm: opp: remove opp_id
Date: Tue, 10 Aug 2010 21:16:57 -0500	[thread overview]
Message-ID: <1281493018-29294-2-git-send-email-nm@ti.com> (raw)
In-Reply-To: <1281493018-29294-1-git-send-email-nm@ti.com>

Remove the concept of opp_id now that SRF is gone from pm branch
the new framework should exist on silicon variants without the
notion of opp ids

This also removes the deprecated functions opp_get_opp_id and
opp_find_by_opp_id.

Cc: Eduardo Valentin <eduardo.valentin@nokia.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Sanjeev Premi <premi@ti.com>
Cc: Thara Gopinath <thara@ti.com>
Cc: Tony Lindgren <tony@atomide.com>

Signed-off-by: Nishanth Menon <nm@ti.com>
---

NOTE: for those desiring to live with SRF will have to revert this
patch

 arch/arm/plat-omap/include/plat/opp.h |   15 ----------
 arch/arm/plat-omap/opp.c              |   47 ---------------------------------
 2 files changed, 0 insertions(+), 62 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/opp.h b/arch/arm/plat-omap/include/plat/opp.h
index f9feb8d..997b56e 100644
--- a/arch/arm/plat-omap/include/plat/opp.h
+++ b/arch/arm/plat-omap/include/plat/opp.h
@@ -82,10 +82,6 @@ int opp_enable(struct omap_opp *opp);
 
 int opp_disable(struct omap_opp *opp);
 
-struct omap_opp *__deprecated opp_find_by_opp_id(struct device *dev,
-						  u8 opp_id);
-u8 __deprecated opp_get_opp_id(struct omap_opp *opp);
-
 void opp_init_cpufreq_table(struct device *dev,
 			    struct cpufreq_frequency_table **table);
 #else
@@ -139,17 +135,6 @@ static inline int opp_disable(struct omap_opp *opp)
 	return 0;
 }
 
-static inline struct omap_opp *__deprecated
-opp_find_by_opp_id(struct omap_opp *opps, u8 opp_id)
-{
-	return ERR_PTR(-EINVAL);
-}
-
-static inline u8 __deprecated opp_get_opp_id(struct omap_opp *opp)
-{
-	return 0;
-}
-
 static inline
 void opp_init_cpufreq_table(struct omap_opp *opps,
 			    struct cpufreq_frequency_table **table)
diff --git a/arch/arm/plat-omap/opp.c b/arch/arm/plat-omap/opp.c
index b9b7bda..a246bb9 100644
--- a/arch/arm/plat-omap/opp.c
+++ b/arch/arm/plat-omap/opp.c
@@ -27,7 +27,6 @@
  * @enabled:	true/false - marking this OPP as enabled/disabled
  * @rate:	Frequency in hertz
  * @u_volt:	Nominal voltage in microvolts corresponding to this OPP
- * @opp_id:	opp identifier (deprecated)
  * @dev_opp:	contains the device_opp struct
  *
  * This structure stores the OPP information for a given domain.
@@ -38,7 +37,6 @@ struct omap_opp {
 	bool enabled;
 	unsigned long rate;
 	unsigned long u_volt;
-	u8 opp_id;
 
 	struct device_opp *dev_opp;
 };
@@ -132,50 +130,6 @@ unsigned long opp_get_freq(const struct omap_opp *opp)
 }
 
 /**
- * opp_find_by_opp_id - look up OPP by OPP ID (deprecated)
- * @opp_type:	OPP type where we want the look up to happen.
- * @opp_id:	OPP ID to search for
- *
- * Returns the struct omap_opp pointer corresponding to the given OPP
- * ID @opp_id, or returns NULL on error.
- */
-struct omap_opp * __deprecated opp_find_by_opp_id(struct device *dev,
-						  u8 opp_id)
-{
-	struct device_opp *dev_opp;
-	struct omap_opp *temp_opp, *opp = ERR_PTR(-ENODEV);
-
-	dev_opp = find_device_opp(dev);
-	if (IS_ERR(dev_opp))
-		return opp;
-
-	list_for_each_entry(temp_opp, &dev_opp->opp_list, node) {
-		if (temp_opp->enabled && temp_opp->opp_id == opp_id) {
-			opp = temp_opp;
-			break;
-		}
-	}
-
-	return opp;
-}
-
-/**
- * opp_get_opp_id() - Provide OPP ID corresponding to an OPP (deprecated)
- * @opp:	opp for which frequency has to be returned for
- *
- * Returns an OPP ID for the OPP required, if error, returns 0
- */
-u8 __deprecated opp_get_opp_id(struct omap_opp *opp)
-{
-	if (unlikely(!opp || IS_ERR(opp)) || !opp->enabled) {
-		pr_err("%s: Invalid parameter being passed\n", __func__);
-		return 0;
-	}
-
-	return opp->opp_id;
-}
-
-/**
  * opp_get_opp_count() - Get number of opps enabled in the opp list
  * @opp_type:	OPP type we want to count
  *
@@ -413,7 +367,6 @@ int opp_add(const struct omap_opp_def *opp_def)
 	/* renumber (deprecated) OPP IDs based on new order */
 	i = 0;
 	list_for_each_entry(opp, &dev_opp->opp_list, node)
-		opp->opp_id = i++;
 
 	return 0;
 }
-- 
1.6.3.3


  reply	other threads:[~2010-08-11  2:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11  2:16 [PM-OPP][PATCH 0/2] OMAP: pm: opp: few additional cleanups Nishanth Menon
2010-08-11  2:16 ` Nishanth Menon [this message]
2010-08-11  2:16 ` [PM-OPP][PATCH 2/2] omap3: opp: make independent of cpufreq Nishanth Menon
2010-08-11  9:12   ` Gopinath, Thara
2010-08-11 10:43     ` Nishanth Menon
2010-08-11 11:23       ` Gopinath, Thara
2010-08-11 11:38         ` Nishanth Menon
2010-08-12 14:20           ` Gopinath, Thara
2010-08-12 14:34             ` Kevin Hilman
2010-08-12 15:27               ` Nishanth Menon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1281493018-29294-2-git-send-email-nm@ti.com \
    --to=nm@ti.com \
    --cc=eduardo.valentin@nokia.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=premi@ti.com \
    --cc=rnayak@ti.com \
    --cc=thara@ti.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).