<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/regulator, branch v5.8.8</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.8.8</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.8.8'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-08-19T06:26:10Z</updated>
<entry>
<title>regulator: fix memory leak on error path of regulator_register()</title>
<updated>2020-08-19T06:26:10Z</updated>
<author>
<name>Vladimir Zapolskiy</name>
<email>vz@mleia.com</email>
</author>
<published>2020-07-24T00:50:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=680283e6992db44d51637bfbce60f94451636332'/>
<id>urn:sha1:680283e6992db44d51637bfbce60f94451636332</id>
<content type='text'>
[ Upstream commit 9177514ce34902b3adb2abd490b6ad05d1cfcb43 ]

The change corrects registration and deregistration on error path
of a regulator, the problem was manifested by a reported memory
leak on deferred probe:

    as3722-regulator as3722-regulator: regulator 13 register failed -517

    # cat /sys/kernel/debug/kmemleak
    unreferenced object 0xecc43740 (size 64):
      comm "swapper/0", pid 1, jiffies 4294937640 (age 712.880s)
      hex dump (first 32 bytes):
        72 65 67 75 6c 61 74 6f 72 2e 32 34 00 5a 5a 5a  regulator.24.ZZZ
        5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
      backtrace:
        [&lt;0c4c3d1c&gt;] __kmalloc_track_caller+0x15c/0x2c0
        [&lt;40c0ad48&gt;] kvasprintf+0x64/0xd4
        [&lt;109abd29&gt;] kvasprintf_const+0x70/0x84
        [&lt;c4215946&gt;] kobject_set_name_vargs+0x34/0xa8
        [&lt;62282ea2&gt;] dev_set_name+0x40/0x64
        [&lt;a39b6757&gt;] regulator_register+0x3a4/0x1344
        [&lt;16a9543f&gt;] devm_regulator_register+0x4c/0x84
        [&lt;51a4c6a1&gt;] as3722_regulator_probe+0x294/0x754
        ...

The memory leak problem was introduced as a side ef another fix in
regulator_register() error path, I believe that the proper fix is
to decouple device_register() function into its two compounds and
initialize a struct device before assigning any values to its fields
and then using it before actual registration of a device happens.

This lets to call put_device() safely after initialization, and, since
now a release callback is called, kfree(rdev-&gt;constraints) shall be
removed to exclude a double free condition.

Fixes: a3cde9534ebd ("regulator: core: fix regulator_register() error paths to properly release rdev")
Signed-off-by: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
Cc: Wen Yang &lt;wenyang@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20200724005013.23278-1-vz@mleia.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: rename da903x to da903x-regulator</title>
<updated>2020-06-25T14:29:21Z</updated>
<author>
<name>Seth Forshee</name>
<email>seth.forshee@canonical.com</email>
</author>
<published>2020-06-24T17:10:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f16861b12fa05717489e0c8fbe93a0b9346a6839'/>
<id>urn:sha1:f16861b12fa05717489e0c8fbe93a0b9346a6839</id>
<content type='text'>
This module shares the same name as its parent PMIC driver, which
confuses tools like kmod. Rename the regulator driver to avoid
such problems.

Signed-off-by: Seth Forshee &lt;seth.forshee@canonical.com&gt;
Link: https://lore.kernel.org/r/20200624171010.845271-1-seth.forshee@canonical.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: qcom_smd: Fix pmi8994 label</title>
<updated>2020-06-23T10:51:33Z</updated>
<author>
<name>Konrad Dybcio</name>
<email>konradybcio@gmail.com</email>
</author>
<published>2020-06-20T14:46:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0d46f69881c34351b6ec523c31225b90ea89ee20'/>
<id>urn:sha1:0d46f69881c34351b6ec523c31225b90ea89ee20</id>
<content type='text'>
s3 was mislabeled as s2. Fix it.

Signed-off-by: Konrad Dybcio &lt;konradybcio@gmail.com&gt;
Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20200620144639.335093-19-konradybcio@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: mt6358: Remove BROKEN dependency</title>
<updated>2020-06-17T12:01:19Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2020-06-16T13:50:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1b3bcca2085865c1facfbea9baf2f5cde5dc15e4'/>
<id>urn:sha1:1b3bcca2085865c1facfbea9baf2f5cde5dc15e4</id>
<content type='text'>
The MFD part is merged into v5.8-rc1, thus remove BROKEN dependency.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Link: https://lore.kernel.org/r/20200616135030.1163660-1-axel.lin@ingics.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v5.8-rc1' into regulator-5.8</title>
<updated>2020-06-17T11:39:12Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2020-06-17T11:39:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6870112c46c867f50cd27570860a05bd82614b5c'/>
<id>urn:sha1:6870112c46c867f50cd27570860a05bd82614b5c</id>
<content type='text'>
Linux 5.8-rc1
</content>
</entry>
<entry>
<title>regualtor: pfuze100: correct sw1a/sw2 on pfuze3000</title>
<updated>2020-06-15T14:39:53Z</updated>
<author>
<name>Robin Gong</name>
<email>yibin.gong@nxp.com</email>
</author>
<published>2020-06-14T21:54:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6f1cf5257acc6e6242ddf2f52bc7912aed77b79f'/>
<id>urn:sha1:6f1cf5257acc6e6242ddf2f52bc7912aed77b79f</id>
<content type='text'>
PFUZE100_SWB_REG is not proper for sw1a/sw2, because enable_mask/enable_reg
is not correct. On PFUZE3000, sw1a/sw2 should be the same as sw1a/sw2 on
pfuze100 except that voltages are not linear, so add new PFUZE3000_SW_REG
and pfuze3000_sw_regulator_ops which like the non-linear PFUZE100_SW_REG
and pfuze100_sw_regulator_ops.

Fixes: 1dced996ee70 ("regulator: pfuze100: update voltage setting for pfuze3000 sw1a")
Reported-by: Christophe Meynard &lt;Christophe.Meynard@ign.fr&gt;
Signed-off-by: Robin Gong &lt;yibin.gong@nxp.com&gt;
Link: https://lore.kernel.org/r/1592171648-8752-1-git-send-email-yibin.gong@nxp.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: Fix pickable ranges mapping</title>
<updated>2020-06-12T13:57:17Z</updated>
<author>
<name>Matti Vaittinen</name>
<email>matti.vaittinen@fi.rohmeurope.com</email>
</author>
<published>2020-06-12T09:23:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=92919679d31721381e3c376488477efe49b915f3'/>
<id>urn:sha1:92919679d31721381e3c376488477efe49b915f3</id>
<content type='text'>
Pickable ranges mapping function never used range min selector. Thus
existing drivers broke when proper linear_ranges functionality was taken
in use. Fix this for now just by ignoring the minimum selector.

Fixes: 60ab7f4153b6 ("regulator: use linear_ranges helper")
Signed-off-by: Matti Vaittinen &lt;matti.vaittinen@fi.rohmeurope.com&gt;
Link: https://lore.kernel.org/r/20200612090225.GA3243@localhost.localdomain
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: da9063: fix LDO9 suspend and warning.</title>
<updated>2020-06-12T13:57:17Z</updated>
<author>
<name>Martin Fuzzey</name>
<email>martin.fuzzey@flowbird.group</email>
</author>
<published>2020-06-12T10:50:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d7442ba13d62de9afc4e57344a676f9f4623dcaa'/>
<id>urn:sha1:d7442ba13d62de9afc4e57344a676f9f4623dcaa</id>
<content type='text'>
Commit 99f75ce66619 ("regulator: da9063: fix suspend") converted
the regulators to use a common (corrected) suspend bit setting but
one of regulators (LDO9) slipped through the crack.

This means that the original problem was not fixed for LDO9 and
also leads to a warning found by the test robot.
	da9063-regulator.c:515:3: warning: initialized field overwritten

Fix this by converting that regulator too like the others.

Fixes: 99f75ce66619 ("regulator: da9063: fix suspend")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;

Signed-off-by: Martin Fuzzey &lt;martin.fuzzey@flowbird.group&gt;
Link: https://lore.kernel.org/r/1591959073-16792-1-git-send-email-martin.fuzzey@flowbird.group
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'regulator/for-5.8' into regulator-linus</title>
<updated>2020-06-01T12:01:44Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2020-06-01T12:01:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5fb565b69dabd5a256fc116702331b54a4621dc9'/>
<id>urn:sha1:5fb565b69dabd5a256fc116702331b54a4621dc9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'regulator/for-5.7' into regulator-linus</title>
<updated>2020-06-01T12:01:42Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2020-06-01T12:01:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cc58045486d0f938662b01025c855fd4aea89ea6'/>
<id>urn:sha1:cc58045486d0f938662b01025c855fd4aea89ea6</id>
<content type='text'>
</content>
</entry>
</feed>
