<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/regulator, branch v5.11</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2021-01-22T14:03:07Z</updated>
<entry>
<title>regulator: Fix lockdep warning resolving supplies</title>
<updated>2021-01-22T14:03:07Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2021-01-22T13:20:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=14a71d509ac809dcf56d7e3ca376b15d17bd0ddd'/>
<id>urn:sha1:14a71d509ac809dcf56d7e3ca376b15d17bd0ddd</id>
<content type='text'>
With commit eaa7995c529b54 (regulator: core: avoid
regulator_resolve_supply() race condition) we started holding the rdev
lock while resolving supplies, an operation that requires holding the
regulator_list_mutex. This results in lockdep warnings since in other
places we take the list mutex then the mutex on an individual rdev.

Since the goal is to make sure that we don't call set_supply() twice
rather than a concern about the cost of resolution pull the rdev lock
and check for duplicate resolution down to immediately before we do the
set_supply() and drop it again once the allocation is done.

Fixes: eaa7995c529b54 (regulator: core: avoid regulator_resolve_supply() race condition)
Reported-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20210122132042.10306-1-broonie@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: core: avoid regulator_resolve_supply() race condition</title>
<updated>2021-01-08T18:22:59Z</updated>
<author>
<name>David Collins</name>
<email>collinsd@codeaurora.org</email>
</author>
<published>2021-01-08T01:16:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eaa7995c529b54d68d97a30f6344cc6ca2f214a7'/>
<id>urn:sha1:eaa7995c529b54d68d97a30f6344cc6ca2f214a7</id>
<content type='text'>
The final step in regulator_register() is to call
regulator_resolve_supply() for each registered regulator
(including the one in the process of being registered).  The
regulator_resolve_supply() function first checks if rdev-&gt;supply
is NULL, then it performs various steps to try to find the supply.
If successful, rdev-&gt;supply is set inside of set_supply().

This procedure can encounter a race condition if two concurrent
tasks call regulator_register() near to each other on separate CPUs
and one of the regulators has rdev-&gt;supply_name specified.  There
is currently nothing guaranteeing atomicity between the rdev-&gt;supply
check and set steps.  Thus, both tasks can observe rdev-&gt;supply==NULL
in their regulator_resolve_supply() calls.  This then results in
both creating a struct regulator for the supply.  One ends up
actually stored in rdev-&gt;supply and the other is lost (though still
present in the supply's consumer_list).

Here is a kernel log snippet showing the issue:

[   12.421768] gpu_cc_gx_gdsc: supplied by pm8350_s5_level
[   12.425854] gpu_cc_gx_gdsc: supplied by pm8350_s5_level
[   12.429064] debugfs: Directory 'regulator.4-SUPPLY' with parent
               '17a00000.rsc:rpmh-regulator-gfxlvl-pm8350_s5_level'
               already present!

Avoid this race condition by holding the rdev-&gt;mutex lock inside
of regulator_resolve_supply() while checking and setting
rdev-&gt;supply.

Signed-off-by: David Collins &lt;collinsd@codeaurora.org&gt;
Link: https://lore.kernel.org/r/1610068562-4410-1-git-send-email-collinsd@codeaurora.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge qcom driver fix into regulator-5.11</title>
<updated>2021-01-04T16:23:20Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2021-01-04T16:23:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=36836f5b377b5a75c16f5bdc5c0f97f9f51212e1'/>
<id>urn:sha1:36836f5b377b5a75c16f5bdc5c0f97f9f51212e1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>regulator: qcom-rpmh: add QCOM_COMMAND_DB dependency</title>
<updated>2021-01-04T14:26:15Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2020-12-30T14:56:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d957d1610c661e758426654de3b04bea6fb29f8b'/>
<id>urn:sha1:d957d1610c661e758426654de3b04bea6fb29f8b</id>
<content type='text'>
A built-in regulator driver cannot link against a modular cmd_db driver:

qcom-rpmh-regulator.c:(.text+0x174): undefined reference to `cmd_db_read_addr'

There is already a dependency for RPMh, so add another one of this
type for cmd_db.

Fixes: 34c5aa2666db ("regulator: Kconfig: Fix REGULATOR_QCOM_RPMH dependencies to avoid build error")
Fixes: 46fc033eba42 ("regulator: add QCOM RPMh regulator driver")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20201230145712.3133110-1-arnd@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: qcom-rpmh-regulator: correct hfsmps515 definition</title>
<updated>2021-01-04T14:25:03Z</updated>
<author>
<name>Dmitry Baryshkov</name>
<email>dmitry.baryshkov@linaro.org</email>
</author>
<published>2020-12-31T12:23:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=df6b92fa40050e59ea89784294bf6d04c0c47705'/>
<id>urn:sha1:df6b92fa40050e59ea89784294bf6d04c0c47705</id>
<content type='text'>
According to the datasheet pm8009's HFS515 regulators have 16mV
resolution rather than declared 1.6 mV. Correct the resolution.

Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Fixes: 06369bcc15a1 ("regulator: qcom-rpmh: Add support for SM8150")
Reviewed-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Link: https://lore.kernel.org/r/20201231122348.637917-3-dmitry.baryshkov@linaro.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v5.11-rc1' into regulator-5.11</title>
<updated>2020-12-28T14:20:00Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2020-12-28T14:20:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2ae6f64ce1ce304b502461fdfe0b96c8171ae2cc'/>
<id>urn:sha1:2ae6f64ce1ce304b502461fdfe0b96c8171ae2cc</id>
<content type='text'>
Linux 5.11-rc1
</content>
</entry>
<entry>
<title>regulator: bd718x7: Add enable times</title>
<updated>2020-12-21T18:57:28Z</updated>
<author>
<name>Guido Günther</name>
<email>agx@sigxcpu.org</email>
</author>
<published>2020-12-18T18:38:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3b66e4a8e58a85af3212c7117d7a29c9ef6679a2'/>
<id>urn:sha1:3b66e4a8e58a85af3212c7117d7a29c9ef6679a2</id>
<content type='text'>
Use the typical startup times from the data sheet so boards get a
reasonable default. Not setting any enable time can lead to board hangs
when e.g. clocks are enabled too soon afterwards.

This fixes gpu power domain resume on the Librem 5.

[Moved #defines into driver, seems to be general agreement and avoids any
cross tree issues -- broonie]

Signed-off-by: Guido Günther &lt;agx@sigxcpu.org&gt;
Reviewed-by: Matti Vaittinen &lt;matti.vaittinen@fi.rohmeurope.com&gt;
Link: https://lore.kernel.org/r/41fb2ed19f584f138336344e2297ae7301f72b75.1608316658.git.agx@sigxcpu.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: pf8x00: Use specific compatible strings for devices</title>
<updated>2020-12-16T13:53:55Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2020-12-15T13:20:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=df9716ec9ade3d2e190a2aac199557d30a3a8416'/>
<id>urn:sha1:df9716ec9ade3d2e190a2aac199557d30a3a8416</id>
<content type='text'>
The pf8x00 driver supports three devices, the DT compatible strings
and I2C IDs should enumerate these specifically rather than using a
wildcard so that we don't collide with anything incompatible in the
same ID range in the future and so that we can handle any software
visible differences between the variants we find.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20201215132024.13356-1-broonie@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'regulator/for-5.11' into regulator-next</title>
<updated>2020-12-11T17:48:32Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2020-12-11T17:48:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5e999f10a16b90fc1d5ded8aa365e9804e894aa9'/>
<id>urn:sha1:5e999f10a16b90fc1d5ded8aa365e9804e894aa9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>regulator: mc13892-regulator: convert comma to semicolon</title>
<updated>2020-12-11T13:23:07Z</updated>
<author>
<name>Zheng Yongjun</name>
<email>zhengyongjun3@huawei.com</email>
</author>
<published>2020-12-11T08:45:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2819569147cb6e79730f2907d3ab3dfe75fe8478'/>
<id>urn:sha1:2819569147cb6e79730f2907d3ab3dfe75fe8478</id>
<content type='text'>
Replace a comma between expression statements by a semicolon.

Signed-off-by: Zheng Yongjun &lt;zhengyongjun3@huawei.com&gt;
Link: https://lore.kernel.org/r/20201211084510.2264-1-zhengyongjun3@huawei.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
