Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

From: Sudeep Holla
Date: Tue May 06 2014 - 13:25:53 EST


On Mon, May 5, 2014 at 3:14 PM, Viresh Kumar <viresh.kumar@xxxxxxxxxx> wrote:
> On 5 May 2014 19:08, Nishanth Menon <nm@xxxxxx> wrote:
>> With the brief history of the patch in linux-pm, I am unable to
>> understand why not just use ceil/floor routines to pick up data the
>> way you need it. It should not matter if we use an ordered list, or
>> some other weird organization inside the storage. There are already
>> accessors functions meant to precisely help with the case that is
>> being tried here.
>
> To be precise, for exynos they need the position of a frequency when
> it is arranged in descending order. And they will simply write this position
> in their clock controller later. For example, if frequencies are:
> 100 MHz, 200, 300, 400, 500, 600
>
> Then they need to write 1 for 600, 2 for 500, 3 for 400, and so on..
> I am not able to imaging how ceil/floor would help here.

It's better to have these mapping in the users of this framework IMO.
Assuming these OPPs come from DT, what happens if entries in the DT are
updated (added/removed), won't the mapping go wrong then ?

Regards,
Sudeep
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/