Re: [PATCH 1/1] thermal: fix cpu_cooling max_level behavior

2014-01-04 Thread Eduardo Valentin
On 02-01-2014 00:02, Zhang Rui wrote: > On Fri, 2013-12-06 at 09:52 -0400, Eduardo Valentin wrote: >> On 13-11-2013 14:11, Eduardo Valentin wrote: >>> As per Documentation/thermal/sysfs-api.txt, max_level >>> is an index, not a counter. Thus, in case a CPU has >>> 3 valid frequencies, max_level is

Re: [PATCH 1/1] thermal: fix cpu_cooling max_level behavior

2014-01-01 Thread Zhang Rui
On Fri, 2013-12-06 at 09:52 -0400, Eduardo Valentin wrote: > On 13-11-2013 14:11, Eduardo Valentin wrote: > > As per Documentation/thermal/sysfs-api.txt, max_level > > is an index, not a counter. Thus, in case a CPU has > > 3 valid frequencies, max_level is expected to be 2, for instance. > > > >

Re: [PATCH 1/1] thermal: fix cpu_cooling max_level behavior

2013-12-06 Thread Eduardo Valentin
On 13-11-2013 14:11, Eduardo Valentin wrote: > As per Documentation/thermal/sysfs-api.txt, max_level > is an index, not a counter. Thus, in case a CPU has > 3 valid frequencies, max_level is expected to be 2, for instance. > > The current code makes max_level == number of valid frequencies, > whic

Re: [PATCH 1/1] thermal: fix cpu_cooling max_level behavior

2013-11-13 Thread Eduardo Valentin
On 13-11-2013 14:11, Eduardo Valentin wrote: > As per Documentation/thermal/sysfs-api.txt, max_level > is an index, not a counter. Thus, in case a CPU has > 3 valid frequencies, max_level is expected to be 2, for instance. > > The current code makes max_level == number of valid frequencies, > whic

[PATCH 1/1] thermal: fix cpu_cooling max_level behavior

2013-11-13 Thread Eduardo Valentin
As per Documentation/thermal/sysfs-api.txt, max_level is an index, not a counter. Thus, in case a CPU has 3 valid frequencies, max_level is expected to be 2, for instance. The current code makes max_level == number of valid frequencies, which is bogus. This patch fix the cpu_cooling device by rang