<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/devfreq/rk3399_dmc.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-07-18T04:58:39Z</updated>
<entry>
<title>PM / devfreq: rk3399_dmc: Fix duplicated opp table on reload.</title>
<updated>2018-07-18T04:58:39Z</updated>
<author>
<name>Enric Balletbo i Serra</name>
<email>enric.balletbo@collabora.com</email>
</author>
<published>2018-06-15T15:12:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d6e98f3e6d825380b566dc59359917a116090154'/>
<id>urn:sha1:d6e98f3e6d825380b566dc59359917a116090154</id>
<content type='text'>
The opp table is not removed when the driver is unloaded neither when
there is an error within probe, so if the driver is reloaded the opp
core shows the following warning:

  rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
               200000000, volt: 900000, enabled: 1. New: freq: 200000000,
               volt: 900000, enabled: 1
  rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
               400000000, volt: 900000, enabled: 1. New: freq: 400000000,
               volt: 900000, enabled: 1
  rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
               666000000, volt: 900000, enabled: 1. New: freq: 666000000,
               volt: 900000, enabled: 1
  rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
               800000000, volt: 900000, enabled: 1. New: freq: 800000000,
               volt: 900000, enabled: 1
  rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
               928000000, volt: 900000, enabled: 1. New: freq: 928000000,
               volt: 900000, enabled: 1

This patch fixes the error path in the probe function and adds a .remove
function to properly cleanup the opp table on unloading.

Fixes: 5a893e31a636c (PM / devfreq: rockchip: add devfreq driver for rk3399 dmc)
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: rk3399_dmc: fix spelling mistakes.</title>
<updated>2018-07-18T04:58:38Z</updated>
<author>
<name>Enric Balletbo i Serra</name>
<email>enric.balletbo@collabora.com</email>
</author>
<published>2018-05-09T12:57:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dfa7d764caf00b12da276ea473d7f1fd7fd40200'/>
<id>urn:sha1:dfa7d764caf00b12da276ea473d7f1fd7fd40200</id>
<content type='text'>
Fix some spelling mistakes in error and debug messages.

Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: rk3399_dmc: do not print error when get supply and clk defer.</title>
<updated>2018-07-18T04:58:37Z</updated>
<author>
<name>Lin Huang</name>
<email>hl@rock-chips.com</email>
</author>
<published>2018-05-09T12:57:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=49edc52312c34c981722833b0d9344c2aa83892d'/>
<id>urn:sha1:49edc52312c34c981722833b0d9344c2aa83892d</id>
<content type='text'>
We just return -EPROBE_DEFER error code to caller and do not
print error message when try to get center logic regulator
and DMC clock defer.

Signed-off-by: Lin Huang &lt;hl@rock-chips.com&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: rk3399_dmc: remove wait for dcf irq event.</title>
<updated>2018-07-18T04:58:36Z</updated>
<author>
<name>Enric Balletbo i Serra</name>
<email>enric.balletbo@collabora.com</email>
</author>
<published>2018-05-09T12:57:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=90dd72e1290dd86c4b6e5c421fcd13e60e625782'/>
<id>urn:sha1:90dd72e1290dd86c4b6e5c421fcd13e60e625782</id>
<content type='text'>
We have already wait dcf done in ATF, so don't need wait dcf irq
in kernel, besides, clear dcf irq in kernel will import competiton
between kernel and ATF, only handle dcf irq in ATF is a better way.

Signed-off-by: Lin Huang &lt;hl@rock-chips.com&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Define the constant governor name</title>
<updated>2017-10-26T08:08:40Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2017-10-23T01:32:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=aa7c352f9841ab3fee5bf1de127a45e6310124a6'/>
<id>urn:sha1:aa7c352f9841ab3fee5bf1de127a45e6310124a6</id>
<content type='text'>
Prior to that, the devfreq device uses the governor name when adding
the itself. In order to prevent the mistake used the wrong governor name,
this patch defines the governor name as a constant and then uses them
instead of using the string directly.

Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Cc: Kukjin Kim &lt;kgene@kernel.org&gt;
Cc: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
</content>
</entry>
<entry>
<title>PM / devfreq: rk3399_dmc: fix error return code in rk3399_dmcfreq_probe()</title>
<updated>2017-07-06T01:15:22Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>garsilva@embeddedor.com</email>
</author>
<published>2017-07-03T12:59:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=da55b1ad4b29b6ab44d5dc8ea8306260246d2699'/>
<id>urn:sha1:da55b1ad4b29b6ab44d5dc8ea8306260246d2699</id>
<content type='text'>
platform_get_irq() returns an error code, but the rk3399_dmc
driver ignores it and always returns -EINVAL. This is not correct,
and prevents -EPROBE_DEFER from being propagated properly.

Notice that platform_get_irq() no longer returns 0 on error:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af

Print and propagate the return value of platform_get_irq on failure.

Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Gustavo A. R. Silva &lt;garsilva@embeddedor.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Update OPP users to put reference</title>
<updated>2017-01-30T08:22:21Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2017-01-23T04:41:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8a31d9d94297b1ecae3012069d35d78c959693c2'/>
<id>urn:sha1:8a31d9d94297b1ecae3012069d35d78c959693c2</id>
<content type='text'>
This patch updates dev_pm_opp_find_freq_*() routines to get a reference
to the OPPs returned by them.

Also updates the users of dev_pm_opp_find_freq_*() routines to call
dev_pm_opp_put() after they are done using the OPPs.

As it is guaranteed the that OPPs wouldn't get freed while being used,
the RCU read side locking present with the users isn't required anymore.
Drop it as well.

This patch also updates all users of devfreq_recommended_opp() which was
returning an OPP received from the OPP core.

Note that some of the OPP core routines have gained
rcu_read_{lock|unlock}() calls, as those still use RCU specific APIs
within them.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt; [Devfreq]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>devfreq: rk3399_dmc: Don't use OPP structures outside of RCU locks</title>
<updated>2016-12-08T00:46:07Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2016-12-05T03:23:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e37d35082e75982ef714f9e25bfa43a061d0c5e6'/>
<id>urn:sha1:e37d35082e75982ef714f9e25bfa43a061d0c5e6</id>
<content type='text'>
The OPP structures are abused to the best here, without understanding
how the OPP core and RCU locks work.

In short, the OPP pointer saved in 'rk3399_dmcfreq' can become invalid
under your nose, as the OPP core may free it.

Fix various abuses around OPP structures and calls.

Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>devfreq: rk3399_dmc: Remove dangling rcu_read_unlock()</title>
<updated>2016-12-08T00:46:06Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2016-12-01T10:42:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d8323de3d4062e1b5a5aa7e9c0f935138405a582'/>
<id>urn:sha1:d8323de3d4062e1b5a5aa7e9c0f935138405a582</id>
<content type='text'>
This call never had the rcu_read_lock() counterpart. Remove the unlock
part as well.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: rk3399_dmc: Use the resource-managed function to add devfreq dev</title>
<updated>2016-11-17T02:31:29Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2016-11-08T09:13:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=927b75a628b1d80fef171420fbd694fc28d9b8e9'/>
<id>urn:sha1:927b75a628b1d80fef171420fbd694fc28d9b8e9</id>
<content type='text'>
This patch uses the resource-managed to add the devfreq device.
This function will make it easy to handle the devfreq device.

- struct devfreq *devm_devfreq_add_device(struct device *dev,
				  struct devfreq_dev_profile *profile,
				  const char *governor_name,
				  void *data);

Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
</feed>
