<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/thermal/devfreq_cooling.c, branch linux-4.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-11-23T02:07:35Z</updated>
<entry>
<title>devfreq_cooling: pass a pointer to devfreq in the power model callbacks</title>
<updated>2016-11-23T02:07:35Z</updated>
<author>
<name>Javi Merino</name>
</author>
<published>2016-09-15T14:44:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3aa5374376746f20a27be8682be7f91c8b71d1d8'/>
<id>urn:sha1:3aa5374376746f20a27be8682be7f91c8b71d1d8</id>
<content type='text'>
When the devfreq cooling device was designed, it was an oversight not to
pass a pointer to the struct devfreq as the first parameters of the
callbacks.  The design patterns of the kernel suggest it for a good
reason.

By passing a pointer to struct devfreq, the driver can register one
function that works with multiple devices.  With the current
implementation, a driver that can work with multiple devices has to
create multiple copies of the same function with different parameters so
that each devfreq_cooling_device can use the appropriate one.  By
passing a pointer to struct devfreq, the driver can identify which
device it's referring to.

Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Cc: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Reviewed-by: Punit Agrawal &lt;punit.agrawal@arm.com&gt;
Reviewed-by: Ørjan Eide &lt;orjan.eide@arm.com&gt;
Reviewed-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Signed-off-by: Javi Merino &lt;javi.merino@arm.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
</entry>
<entry>
<title>devfreq_cooling: no need to check state with negative number</title>
<updated>2016-09-27T06:02:16Z</updated>
<author>
<name>Shawn Lin</name>
</author>
<published>2016-08-22T08:08:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e3da1cbed64a19babe91775e21fcd8887039e711'/>
<id>urn:sha1:e3da1cbed64a19babe91775e21fcd8887039e711</id>
<content type='text'>
We could see that state is defined as unsigned type, so it
should never be less than zero. Let' remove this check.

Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>devfreq_cooling: return on allocation failure</title>
<updated>2015-11-04T19:06:29Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2015-11-04T13:36:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ce5ee1611284bef81d0308c6c2749902f55ed1d5'/>
<id>urn:sha1:ce5ee1611284bef81d0308c6c2749902f55ed1d5</id>
<content type='text'>
If the allocation fails then we can't continue.

Fixes: a76caf55e5b3 ('thermal: Add devfreq cooling')
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
</entry>
<entry>
<title>thermal: devfreq_cooling: Make power a u64</title>
<updated>2015-11-02T21:14:46Z</updated>
<author>
<name>Javi Merino</name>
</author>
<published>2015-11-02T19:03:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=61c8e8aa9fa266d3b917621d69cd8086a0db558d'/>
<id>urn:sha1:61c8e8aa9fa266d3b917621d69cd8086a0db558d</id>
<content type='text'>
The prototype of do_div() is:

uint32_t do_div(uint64_t *n, uint32_t base);

Make power u64 to avoid the following warning:

   drivers/thermal/devfreq_cooling.c: In function 'get_dynamic_power':
   drivers/thermal/devfreq_cooling.c:267:2: warning: comparison of distinct pointer types lacks a cast [enabled by default]
   drivers/thermal/devfreq_cooling.c:267:2: warning: right shift count &gt;= width of type [enabled by default]
   drivers/thermal/devfreq_cooling.c:267:2: warning: passing argument 1 of '__div64_32' from incompatible pointer type [enabled by default]
   include/asm-generic/div64.h:35:17: note: expected 'uint64_t *' but argument is of type 'long unsigned int *'

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Cc: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Signed-off-by: Javi Merino &lt;javi.merino@arm.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
</entry>
<entry>
<title>thermal: devfreq_cooling: use a thermal_cooling_device for register and unregister</title>
<updated>2015-11-02T21:14:44Z</updated>
<author>
<name>Javi Merino</name>
</author>
<published>2015-11-02T19:03:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c99c2cef75eb5bfc05c5728e4560f3ee656d47e'/>
<id>urn:sha1:3c99c2cef75eb5bfc05c5728e4560f3ee656d47e</id>
<content type='text'>
Be consistent with what other cooling devices do and return a struct
thermal_cooling_device * on register.  Also, for the unregister, accept
a struct thermal_cooling_device * as parameter.

Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Cc: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Javi Merino &lt;javi.merino@arm.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
</entry>
<entry>
<title>devfreq_cooling: add trace information</title>
<updated>2015-10-30T17:41:38Z</updated>
<author>
<name>Javi Merino</name>
</author>
<published>2015-09-10T17:09:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9876b1a4431a3f0959c70e1d817ecab6440cb2e6'/>
<id>urn:sha1:9876b1a4431a3f0959c70e1d817ecab6440cb2e6</id>
<content type='text'>
Tracing is useful for debugging and performance tuning.  Add similar
traces to what's present in the cpu cooling device.

Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Cc: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Signed-off-by: Javi Merino &lt;javi.merino@arm.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
</entry>
<entry>
<title>thermal: Add devfreq cooling</title>
<updated>2015-10-30T17:21:01Z</updated>
<author>
<name>Ørjan Eide</name>
</author>
<published>2015-09-10T17:09:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a76caf55e5b356ba20a5a43ac4d9f7a04b20941d'/>
<id>urn:sha1:a76caf55e5b356ba20a5a43ac4d9f7a04b20941d</id>
<content type='text'>
Add a generic thermal cooling device for devfreq, that is similar to
cpu_cooling.

The device must use devfreq.  In order to use the power extension of the
cooling device, it must have registered its OPPs using the OPP library.

Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Cc: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Javi Merino &lt;javi.merino@arm.com&gt;
Signed-off-by: Ørjan Eide &lt;orjan.eide@arm.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
</entry>
</feed>
