<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/base/power/opp/of.c, branch linux-4.13.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.13.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.13.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-06-22T01:15:30Z</updated>
<entry>
<title>PM / OPP: opp-microvolt is not optional if regulators are set</title>
<updated>2017-06-22T01:15:30Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-05-23T04:02:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=688a48b0d27000167e0450bc1243e29a560395ca'/>
<id>urn:sha1:688a48b0d27000167e0450bc1243e29a560395ca</id>
<content type='text'>
If dev_pm_opp_set_regulators() is called for a device and its regulators
are set in the OPP core, the OPP nodes for the device must contain the
"opp-microvolt" property, otherwise there is something wrong and we
better error out.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Expose _of_get_opp_desc_node as dev_pm_opp API</title>
<updated>2017-02-09T21:52:17Z</updated>
<author>
<name>Dave Gerlach</name>
</author>
<published>2017-02-03T17:29:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0764c604c8128f17fd740ff8b1701d0a1301eb7e'/>
<id>urn:sha1:0764c604c8128f17fd740ff8b1701d0a1301eb7e</id>
<content type='text'>
Rename _of_get_opp_desc_node to dev_pm_opp_of_get_opp_desc_node and add it
to include/linux/pm_opp.h to allow other drivers, such as platform OPP
and cpufreq drivers, to make use of it.

Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Dave Gerlach &lt;d-gerlach@ti.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Move away from RCU locking</title>
<updated>2017-01-30T08:22:22Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-01-23T04:41:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=052c6f19141dd13f266cc465fde6f38ddc93d5fb'/>
<id>urn:sha1:052c6f19141dd13f266cc465fde6f38ddc93d5fb</id>
<content type='text'>
The RCU locking isn't well suited for the OPP core. The RCU locking fits
better for reader heavy stuff, while the OPP core have at max one or two
readers only at a time.

Over that, it was getting very confusing the way RCU locking was used
with the OPP core. The individual OPPs are mostly well handled, i.e. for
an update a new structure was created and then that replaced the older
one. But the OPP tables were updated directly all the time from various
parts of the core. Though they were mostly used from within RCU locked
region, they didn't had much to do with RCU and were governed by the
mutex instead.

And that mixed with the 'opp_table_lock' has made the core even more
confusing.

Now that we are already managing the OPPs and the OPP tables with kernel
reference infrastructure, we can get rid of RCU locking completely and
simplify the code a lot.

Remove all RCU references from code and comments.

Acquire opp_table-&gt;lock while parsing the list of OPPs though.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Use dev_pm_opp_get_opp_table() instead of _add_opp_table()</title>
<updated>2017-01-30T08:22:21Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-01-23T04:41:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b83c1899a0e98cabd0997531434e1fb3b6574db8'/>
<id>urn:sha1:b83c1899a0e98cabd0997531434e1fb3b6574db8</id>
<content type='text'>
Migrate all users of _add_opp_table() to use dev_pm_opp_get_opp_table()
to guarantee that the OPP table doesn't get freed while being used.

Also update _managed_opp() to get the reference to the OPP table.

Now that the OPP table wouldn't get freed while these routines are
executing after dev_pm_opp_get_opp_table() is called, there is no need
to take opp_table_lock. Drop them as well.

Now that _add_opp_table(), _remove_opp_table() and the unlocked release
routines aren't used anymore, remove them.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Don't allocate OPP table from _opp_allocate()</title>
<updated>2017-01-27T10:49:09Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-01-02T09:11:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8cd2f6e8f34e75198063a6d84675b18bdb106824'/>
<id>urn:sha1:8cd2f6e8f34e75198063a6d84675b18bdb106824</id>
<content type='text'>
There is no point in trying to find/allocate the table for every OPP
that is added for a device. It would be far more efficient to allocate
the table only once and pass its pointer to the routines that add the
OPP entry.

Locking is removed from _opp_add_static_v2() and _opp_add_v1() now as
the callers call them with that lock already held.

Call to _remove_opp_table() routine is also removed from _opp_free()
now, as opp_table isn't allocated from within _opp_allocate(). This is
handled by the routines which created the OPP table in the first place.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Rename and split _dev_pm_opp_remove_table()</title>
<updated>2017-01-27T10:49:09Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-01-02T09:11:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9274c892430ef3240acf3f336916f64fe2b67b02'/>
<id>urn:sha1:9274c892430ef3240acf3f336916f64fe2b67b02</id>
<content type='text'>
Later patches would want to remove OPP table (and its OPPs) using the
opp_table pointer instead of 'dev'.

In order to prepare for that, rename _dev_pm_opp_remove_table() as
_dev_pm_opp_find_and_remove_table() split out part of it.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Add light weight _opp_free() routine</title>
<updated>2017-01-27T10:49:09Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-01-02T09:10:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=969fceb3c7e6fc7fd0419b0392435717824f7ba5'/>
<id>urn:sha1:969fceb3c7e6fc7fd0419b0392435717824f7ba5</id>
<content type='text'>
The OPPs which are never successfully added using _opp_add() are not
required to be freed with the _opp_remove() routine, as a simple kfree()
is enough for them.

Introduce a new light weight routine _opp_free(), which will do that.

That also helps us removing the 'notify' parameter to _opp_remove(),
which isn't required anymore.

Note that _opp_free() contains a call to _remove_opp_table() as the OPP
table might have been added for this very OPP only. The
_remove_opp_table() routine returns quickly if there are more OPPs in
the table. This will be simplified in later patches though.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Error out on failing to add static OPPs for v1 bindings</title>
<updated>2017-01-27T10:49:09Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-01-02T09:10:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=04a86a84c42ca18f37ab446127dc619b41dd3b23'/>
<id>urn:sha1:04a86a84c42ca18f37ab446127dc619b41dd3b23</id>
<content type='text'>
The code adding static OPPs for V2 bindings already does so. Make the V1
bindings specific code behave the same.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Rename _allocate_opp() to _opp_allocate()</title>
<updated>2017-01-27T10:49:08Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-01-02T09:10:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=63a69ea4b88f37bda3bb13c4fb417a3218902022'/>
<id>urn:sha1:63a69ea4b88f37bda3bb13c4fb417a3218902022</id>
<content type='text'>
Make the naming consistent with how other routines are named.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Remove useless TODO</title>
<updated>2017-01-27T10:49:08Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-01-02T09:10:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1715371ddd5affdd63c7cb5220d104062c74ad66'/>
<id>urn:sha1:1715371ddd5affdd63c7cb5220d104062c74ad66</id>
<content type='text'>
This TODO doesn't make sense anymore as we have all the information in a
single OPP table. Remove it.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
