Re: [PATCH 1/2] PM / OPP: Use list_for_each_entry_reverse instead of list_for_each_entry

From: Viresh Kumar
Date: Tue Apr 29 2014 - 02:10:34 EST


On 29 April 2014 11:20, Jonghwan Choi <jhbird.choi@xxxxxxxxxxx> wrote:
> -> You are right. But 5440 cpufreq driver write an index number instead of
> clk divider value
> for change DVFS. And our another(will submit) also write an index number for
> changing DVFS.
> As you said, order of table shouldn't matter at all in cpufreq layer. Then,
> could this can be applied?

These two patches aren't going to fly I believe. Depending on the order
of table for setting hardware is inviting trouble.

> In our case, We want to use index 0 for P0 and index 1 for P1.....

What I would recommend is, use .driver_data field to hold what has to
be written to hardware for any frequency. And then simply use
driver_data instead of index.
--
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/