@@ -245,6 +245,9 @@ struct omap_opp * __deprecated opp_find_by_opp_id(struct omap_opp *opps,
u8 opp_id);
u8 __deprecated opp_get_opp_id(struct omap_opp *opp);
+struct omap_opp *__deprecated opp_find_by_index(struct omap_opp *opps,
+ u8 index);
+
void opp_init_cpufreq_table(struct omap_opp *opps,
struct cpufreq_frequency_table **table);
@@ -90,6 +90,25 @@ int opp_get_opp_count(struct omap_opp *oppl)
return n;
}
+/**
+ * opp_find_by_opp_index - look up OPP by OPP ID (deprecated)
+ * @opps: pointer to an array of struct omap_opp
+ *
+ * Returns the struct omap_opp pointer corresponding to the given
+ * array index.
+ */
+struct omap_opp *__deprecated opp_find_by_index(struct omap_opp *opps,
+ u8 index)
+{
+ if (!opps)
+ return NULL;
+
+ if (index >= opp_get_opp_count(opps))
+ return NULL;
+
+ return &opps[index];
+}
+
struct omap_opp *opp_find_freq_exact(struct omap_opp *oppl,
unsigned long freq, bool enabled)
{