<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/regulator, branch linux-5.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.7.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.7.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2020-08-19T06:23:31Z</updated>
<entry>
<title>regulator: fix memory leak on error path of regulator_register()</title>
<updated>2020-08-19T06:23:31Z</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://universe.0xinfinity.dev/distro/kernel/commit/?id=cfd61b6121f9a9f5be53b7365c182bfc36296dcd'/>
<id>urn:sha1:cfd61b6121f9a9f5be53b7365c182bfc36296dcd</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>regualtor: pfuze100: correct sw1a/sw2 on pfuze3000</title>
<updated>2020-06-30T19:36:02Z</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://universe.0xinfinity.dev/distro/kernel/commit/?id=75b62ce4acfa503b76b946908196b3c85435f196'/>
<id>urn:sha1:75b62ce4acfa503b76b946908196b3c85435f196</id>
<content type='text'>
[ Upstream commit 6f1cf5257acc6e6242ddf2f52bc7912aed77b79f ]

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;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: da9063: fix LDO9 suspend and warning.</title>
<updated>2020-06-30T19:36:00Z</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://universe.0xinfinity.dev/distro/kernel/commit/?id=92fa1e9bce41d4662eb0d39b37e8998fee2ce2cd'/>
<id>urn:sha1:92fa1e9bce41d4662eb0d39b37e8998fee2ce2cd</id>
<content type='text'>
[ Upstream commit d7442ba13d62de9afc4e57344a676f9f4623dcaa ]

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;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: qcom-rpmh: Fix typos in pm8150 and pm8150l</title>
<updated>2020-06-22T07:32:29Z</updated>
<author>
<name>Bjorn Andersson</name>
<email>bjorn.andersson@linaro.org</email>
</author>
<published>2020-04-15T05:37:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8fead53264db65ace4a34167dbab6e3828b6840e'/>
<id>urn:sha1:8fead53264db65ace4a34167dbab6e3828b6840e</id>
<content type='text'>
[ Upstream commit 906746ba26d0b45688f4c3b730c35f765dc958ba ]

Fix typos in pm8150 l13/l16/l17 and pm8150l ldo8 supplies.

Fixes: 06369bcc15a1 ("regulator: qcom-rpmh: Add support for SM8150")
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Tested-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Reviewed-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Link: https://lore.kernel.org/r/20200415053708.717623-1-bjorn.andersson@linaro.org
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: Revert "Use driver_deferred_probe_timeout for regulator_init_complete_work"</title>
<updated>2020-04-29T17:57:45Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2020-04-29T17:23:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2a15483b401c0b07e44b43b95414e36f32c02f32'/>
<id>urn:sha1:2a15483b401c0b07e44b43b95414e36f32c02f32</id>
<content type='text'>
This reverts commit dca0b44957e5 ("regulator: Use
driver_deferred_probe_timeout for regulator_init_complete_work"),
as we ended up reverting the default deferred_probe_timeout
value back to zero, to preserve behavior with 5.6 we need to
decouple the regulator timeout which was previously 30 seconds.

This avoids breaking some systems that depend on the regulator
timeout but don't require the deferred probe timeout.

Cc: linux-pm@vger.kernel.org
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Thierry Reding &lt;treding@nvidia.com&gt;
Cc: Liam Girdwood &lt;lgirdwood@gmail.com&gt;
Cc: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Cc: Saravana Kannan &lt;saravanak@google.com&gt;
Cc: Todd Kjos &lt;tkjos@google.com&gt;
Cc: Len Brown &lt;len.brown@intel.com&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Cc: Kevin Hilman &lt;khilman@kernel.org&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@rjwysocki.net&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
Reported-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Suggested-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Reviewed-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20200429172349.55979-1-john.stultz@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'regulator-spi-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc</title>
<updated>2020-03-30T21:58:26Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2020-03-30T21:58:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a231bed2267cf45b0759da1d3ad62483b8bd0925'/>
<id>urn:sha1:a231bed2267cf45b0759da1d3ad62483b8bd0925</id>
<content type='text'>
Pull spi and regulator updates from Mark Brown:
 "At one point in the release cycle I managed to fat finger things and
  apply some SPI fixes onto a regulator branch and merge that into the
  SPI tree, then pull in a change shared with the MTD tree moving the
  Mediatek quadspi driver over to become the Mediatek spi-nor driver in
  the SPI tree.

  This has made a mess which I only just noticed while preparing this
  and I can't see a sensible way to unpick things due to other
  subsequent merge commits especially the pull from MTD so it looks like
  the most sensible thing to do is give up and combine the two pull
  requests.

  Fortunately both subsystems were fairly quiet this cycle, the
  highlights are:

  regulator:

   - Support for Monoloithic Power Systems MP5416, MP8867 and MPS8869
     and Qualcomm PMI8994 and SMB208.

  SPI:

   - Lots of enhancements for spi-fsl-dspi, including XSPI mode support,
     from Vladimir Oltean.

   - Support for amlogic Meson G12A, IBM FSI, Mediatek spi-nor (moved
     from MTD), NXP i.MX8Mx, Rockchip PX30, RK3308 and RK3328, and
     Qualcomm Atheros AR934x/QCA95xx"

* tag 'regulator-spi-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc: (118 commits)
  spi: efm32: Convert to use GPIO descriptors
  regulator: qcom_smd: Add pmi8994 regulator support
  regulator: da9063: Fix get_mode() functions to read sleep field
  spi: spi-fsl-lpspi: Replace zero-length array with flexible-array member
  spi: spi-s3c24xx: Replace zero-length array with flexible-array member
  spi: stm32: Fix comments compilation warnings
  spi: atmel-quadspi: Add verbose debug facilities to monitor register accesses
  spi: spi-fsl-dspi: Add support for LS1028A
  spi: spi-fsl-dspi: Move invariant configs out of dspi_transfer_one_message
  spi: spi-fsl-dspi: Fix interrupt-less DMA mode taking an XSPI code path
  spi: spi-fsl-dspi: Avoid NULL pointer in dspi_slave_abort for non-DMA mode
  spi: spi-fsl-dspi: Replace interruptible wait queue with a simple completion
  spi: spi-fsl-dspi: Protect against races on dspi-&gt;words_in_flight
  spi: spi-fsl-dspi: Avoid reading more data than written in EOQ mode
  spi: spi-fsl-dspi: Fix bits-per-word acceleration in DMA mode
  spi: spi-fsl-dspi: Fix little endian access to PUSHR CMD and TXDATA
  spi: spi-fsl-dspi: Don't access reserved fields in SPI_MCR
  regulator: driver.h: fix regulator_map_* function names
  regulator: da9063: fix suspend
  spi: mxs: Drop GPIO includes
  ...
</content>
</entry>
<entry>
<title>Merge branch 'regulator-5.7' into regulator-next</title>
<updated>2020-03-24T17:33:09Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2020-03-24T17:33:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=24bd2afda8ce633385a3c96aa51181008d7252da'/>
<id>urn:sha1:24bd2afda8ce633385a3c96aa51181008d7252da</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'regulator-5.6' into regulator-linus</title>
<updated>2020-03-24T17:33:06Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2020-03-24T17:33:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bae4cb90541a5bb9625377f6edf94e3dd1b9bb96'/>
<id>urn:sha1:bae4cb90541a5bb9625377f6edf94e3dd1b9bb96</id>
<content type='text'>
</content>
</entry>
<entry>
<title>regulator: qcom_smd: Add pmi8994 regulator support</title>
<updated>2020-03-24T17:32:33Z</updated>
<author>
<name>Bjorn Andersson</name>
<email>bjorn.andersson@linaro.org</email>
</author>
<published>2020-03-24T04:14:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=86332c343491c6d2228a1e0c80b1ea98a2653d20'/>
<id>urn:sha1:86332c343491c6d2228a1e0c80b1ea98a2653d20</id>
<content type='text'>
The pmi8994 is commonly found on MSM8996 based devices, such as the
Dragonboard 820c, where it supplies power to a number of LDOs on the
primary PMIC.

Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20200324041424.518160-1-bjorn.andersson@linaro.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: da9063: Fix get_mode() functions to read sleep field</title>
<updated>2020-03-24T16:52:25Z</updated>
<author>
<name>Adam Thomson</name>
<email>Adam.Thomson.Opensource@diasemi.com</email>
</author>
<published>2020-03-24T09:25:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fc69bab1ec382d16210ef6bb2d3f117a37169de2'/>
<id>urn:sha1:fc69bab1ec382d16210ef6bb2d3f117a37169de2</id>
<content type='text'>
get_mode() is used to retrieve the active mode state. Settings-A
config is used during active state, whilst Settings-B is for
suspend. This means we only need to check the sleep field of each
buck and LDO as that field solely relates to Settings-A config.

This change is a clone of the get_mode() update which was committed
as part of:
 - regulator: da9062: fix suspend_enable/disable preparation
   [a72865f057820ea9f57597915da4b651d65eb92f]

Signed-off-by: Adam Thomson &lt;Adam.Thomson.Opensource@diasemi.com&gt;
Link: https://lore.kernel.org/r/20200324092516.60B5C3FB8D@swsrvapps-01.diasemi.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
