<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/regulator/core.c, branch linux-5.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-02-24T07:38:38Z</updated>
<entry>
<title>regulator: core: Fix exported symbols to the exported GPL version</title>
<updated>2020-02-24T07:38:38Z</updated>
<author>
<name>Enric Balletbo i Serra</name>
</author>
<published>2020-01-20T12:39:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3721868c1fe733f39c1b12832a606842ff163c02'/>
<id>urn:sha1:3721868c1fe733f39c1b12832a606842ff163c02</id>
<content type='text'>
[ Upstream commit 3d7610e8da993539346dce6f7c909fd3d56bf4d5 ]

Change the exported symbols introduced by commit e9153311491da
("regulator: vctrl-regulator: Avoid deadlock getting and setting the voltage")
from EXPORT_SYMBOL() to EXPORT_SYMBOL_GPL(), like is used for all the core
parts.

Fixes: e9153311491da ("regulator: vctrl-regulator: Avoid deadlock getting and setting the voltage")
Reported-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Link: https://lore.kernel.org/r/20200120123921.1204339-1-enric.balletbo@collabora.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: vctrl-regulator: Avoid deadlock getting and setting the voltage</title>
<updated>2020-02-24T07:38:35Z</updated>
<author>
<name>Enric Balletbo i Serra</name>
</author>
<published>2020-01-16T09:45:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=38e4f02b35720a12f13f76fea5c99230879b096c'/>
<id>urn:sha1:38e4f02b35720a12f13f76fea5c99230879b096c</id>
<content type='text'>
[ Upstream commit e9153311491da9d9863ead9888a1613531cb4a1b ]

`cat /sys/kernel/debug/regulator/regulator_summary` ends on a deadlock
when you have a voltage controlled regulator (vctrl).

The problem is that the vctrl_get_voltage() and vctrl_set_voltage() calls the
regulator_get_voltage() and regulator_set_voltage() and that will try to lock
again the dependent regulators (the regulator supplying the control voltage).

Fix the issue by exporting the unlocked version of the regulator_get_voltage()
and regulator_set_voltage() API so drivers that need it, like the voltage
controlled regulator driver can use it.

Fixes: f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking")
Reported-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Link: https://lore.kernel.org/r/20200116094543.2847321-1-enric.balletbo@collabora.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'regulator-fix-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator</title>
<updated>2019-12-17T21:08:41Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2019-12-17T21:08:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=58d90a04bdcc28e1b34251f4d9c1c4d39d4bba69'/>
<id>urn:sha1:58d90a04bdcc28e1b34251f4d9c1c4d39d4bba69</id>
<content type='text'>
Pull regulator fixes from Mark Brown:
 "A small set of fixes for mostly minor issues here, the only real code
  ones are Wen Yang's fixes for error handling in the core and Christian
  Marussi's list_voltage() change which is a fix for disruptively bad
  performance for regulators with continuous voltage control (which are
  rare)"

* tag 'regulator-fix-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: rn5t618: fix module aliases
  regulator: max77650: add of_match table
  regulator: core: avoid unneeded .list_voltage calls
  regulator: s5m8767: Fix a warning message
  regulator: core: fix regulator_register() error paths to properly release rdev
  regulator: fix use after free issue
</content>
</entry>
<entry>
<title>regulator: core: avoid unneeded .list_voltage calls</title>
<updated>2019-12-09T18:41:40Z</updated>
<author>
<name>Cristian Marussi</name>
</author>
<published>2019-12-09T12:52:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6d30fc511bec82dd8801b9bb8718cbeea1366ad8'/>
<id>urn:sha1:6d30fc511bec82dd8801b9bb8718cbeea1366ad8</id>
<content type='text'>
Inside machine_constraints_voltage() a loop is in charge of verifying that
each of the defined voltages are within the configured constraints and
that those constraints are in fact compatible with the available voltages'
list.

When the registered regulator happens to be defined with a wide range of
possible voltages the above O(n) loop can be costly.
Moreover since this behaviour is triggered during the registration process,
it means also that it can be easily triggered at probe time, slowing down
considerably some module loading.

On the other side if such wide range of voltage values happens to be also
continuous and without discontinuity of any kind, the above potentially
cumbersome operation is also useless.

For these reasons, avoid such .list_voltage poll loop when regulator is
described as 'continuous_voltage_range' as is, indeed, similarly already
done inside regulator_is_supported_voltage().

Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Link: https://lore.kernel.org/r/20191209125239.46054-1-cristian.marussi@arm.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: core: fix regulator_register() error paths to properly release rdev</title>
<updated>2019-12-03T12:18:33Z</updated>
<author>
<name>Wen Yang</name>
</author>
<published>2019-12-01T03:02:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a3cde9534ebdafe18a9bbab208df724c57e6c8e8'/>
<id>urn:sha1:a3cde9534ebdafe18a9bbab208df724c57e6c8e8</id>
<content type='text'>
There are several issues with the error handling code of
the regulator_register() function:
        ret = device_register(&amp;rdev-&gt;dev);
        if (ret != 0) {
                put_device(&amp;rdev-&gt;dev); --&gt; rdev released
                goto unset_supplies;
        }
...
unset_supplies:
...
        unset_regulator_supplies(rdev); --&gt; use-after-free
...
clean:
        if (dangling_of_gpiod)
                gpiod_put(config-&gt;ena_gpiod);
        kfree(rdev);                     --&gt; double free

We add a variable to record the failure of device_register() and
move put_device() down a bit to avoid the above issues.

Fixes: c438b9d01736 ("regulator: core: Move registration of regulator device")
Signed-off-by: Wen Yang &lt;wenyang@linux.alibaba.com&gt;
Cc: Liam Girdwood &lt;lgirdwood@gmail.com&gt;
Cc: Mark Brown &lt;broonie@kernel.org&gt;
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/r/20191201030250.38074-1-wenyang@linux.alibaba.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: fix use after free issue</title>
<updated>2019-11-27T12:53:48Z</updated>
<author>
<name>Wen Yang</name>
</author>
<published>2019-11-24T14:58:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4affd79a125ac91e6a53be843ea3960a8fc00cbb'/>
<id>urn:sha1:4affd79a125ac91e6a53be843ea3960a8fc00cbb</id>
<content type='text'>
This is caused by dereferencing 'rdev' after put_device() in
the _regulator_get()/_regulator_put() functions.
This patch just moves the put_device() down a bit to avoid the
issue.

Signed-off-by: Wen Yang &lt;wenyang@linux.alibaba.com&gt;
Cc: Liam Girdwood &lt;lgirdwood@gmail.com&gt;
Cc: Mark Brown &lt;broonie@kernel.org&gt;
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/r/20191124145835.25999-1-wenyang@linux.alibaba.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'regulator-5.5' into regulator-next</title>
<updated>2019-11-22T19:56:20Z</updated>
<author>
<name>Mark Brown</name>
</author>
<published>2019-11-22T19:56:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a21da94f617bce0771144ea8093b6987184b38d0'/>
<id>urn:sha1:a21da94f617bce0771144ea8093b6987184b38d0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>regulator: core: Let boot-on regulators be powered off</title>
<updated>2019-11-15T12:05:27Z</updated>
<author>
<name>Pascal Paillet</name>
</author>
<published>2019-11-13T10:27:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=089b3f61ecfc43ca4ea26d595e1d31ead6de3f7b'/>
<id>urn:sha1:089b3f61ecfc43ca4ea26d595e1d31ead6de3f7b</id>
<content type='text'>
Boot-on regulators are always kept on because their use_count value
is now incremented at boot time and never cleaned.

Only increment count value for alway-on regulators.
regulator_late_cleanup() is now able to power off boot-on regulators
when unused.

Fixes: 05f224ca6693 ("regulator: core: Clean enabling always-on regulators + their supplies")
Signed-off-by: Pascal Paillet &lt;p.paillet@st.com&gt;
Link: https://lore.kernel.org/r/20191113102737.27831-1-p.paillet@st.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: core: Don't try to remove device links if add failed</title>
<updated>2019-11-15T12:04:20Z</updated>
<author>
<name>Saravana Kannan</name>
</author>
<published>2019-11-15T00:04:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b59b654478093fa429ad4c7897ae29f201146a00'/>
<id>urn:sha1:b59b654478093fa429ad4c7897ae29f201146a00</id>
<content type='text'>
device_link_add() might not always succeed depending on the type of
device link and the rest of the dependencies in the system. If
device_link_add() didn't succeed, then we shouldn't try to remove the
link later on as it might remove a link someone else created.

Signed-off-by: Saravana Kannan &lt;saravanak@google.com&gt;
Link: https://lore.kernel.org/r/20191115000438.45970-1-saravanak@google.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: core: Allow generic coupling only for always-on regulators</title>
<updated>2019-10-28T13:15:52Z</updated>
<author>
<name>Dmitry Osipenko</name>
</author>
<published>2019-10-25T00:22:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e381bfe45a891a5894465f072c5bbf3ed3e33b8a'/>
<id>urn:sha1:e381bfe45a891a5894465f072c5bbf3ed3e33b8a</id>
<content type='text'>
The generic voltage balancer doesn't work correctly if one of regulator
couples turns off. Currently there are no users in kernel for that case,
although let's explicitly show that this case is unsupported for those who
will try to use that feature.

Link: https://lore.kernel.org/linux-samsung-soc/20191008170503.yd6GscYPLxjgrXqDuCO7AJc6i6egNZGJkVWHLlCxvA4@z/
Signed-off-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Link: https://lore.kernel.org/r/20191025002240.25288-2-digetx@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
