> -----Original Message----- > From: Gopinath, Thara > Sent: Tuesday, June 08, 2010 7:29 AM > >>-----Original Message----- > >>From: Menon, Nishanth > >>Sent: Tuesday, June 08, 2010 9:45 AM > >>> -----Original Message----- > >>> From: Gopinath, Thara > >>> Sent: Friday, June 04, 2010 3:35 PM > >> > >>> Slightly off the topic but considering we are discussing opp layer > here, I > >>> do not find API's > >>> that take the OPP type (OPP_MPU or OPP_L3) and voltage/frequency as > >>> parameters and returns back the associated frequency/voltage. I do not > >>> want to get the opp table entry every time I do this. Any chance of > >>> introducing this in the framework? I could send a patch for the same. > >>Am curios on the usage that combination of > >>opp_find_freq_exact > >>opp_find_freq_ceil > >>opp_find_freq_floor > >> > >>and opp_get_freq, opp_get_voltage is unable to cater to? Would be > interested > >>in seeing a patch for the same. > > Ok here is the need. Let us suppose I know the opp type (OPP_MPU, > OPP_L3 ...) etc and the frequency and I need to get the voltage. Today I > have to do the following > struct omap_opp *opp = > opp_find_freq_exact/opp_find_freq_floor/opp_find_freq_ceil(type, freq); > u32 volt = opp_get_voltage(opp). > > As a user of opp layer it would be much simpler for me to do > opp_get_volt(type, freq, exact/ceil/floor) as I really do not care > about the opp struct at all. The intent was we are not always sure what exact behavior the caller desires. Option1: (currently implemented) Opp_get_volt(opp_find_freq_exact/opp_find_freq_floor/opp_find_freq_ceil(type, freq) Option2: Opp_get_volt_freq_exact(freq); Opp_get_volt_freq_ceil(freq); Opp_get_volt_freq_floor(freq); The intent is if we don't really care about the opp structure, choose the nature of the search and plug it straight to get_volt. > > Now let us suppose I have the opp type and the voltage I need to put the > vdd associated with it to. Today there is no way to retrieve the frequency > from the opp layer. Why would we want to do this? > > Again as a user of the opp layer I would like to have an API > u32 freq = opp_get_freq(type, volt) A voltage could be linked to 1 or more frequencies. OPP layer functions based on some sort of unique identifier. We aligned earlier this year(jan if I recollect), that frequency is the common unique identifier, is there a Reason that this is not good enough? Regards, Nishanth Menon -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html