<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/regulator/userspace-consumer.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-02-26T18:30:24Z</updated>
<entry>
<title>regulator: userspace-consumer: add module device table</title>
<updated>2024-02-26T18:30:24Z</updated>
<author>
<name>John Keeping</name>
<email>jkeeping@inmusicbrands.com</email>
</author>
<published>2024-02-26T16:05:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=531a0c0cdbff9cecf41073220a826f8b1132f9ab'/>
<id>urn:sha1:531a0c0cdbff9cecf41073220a826f8b1132f9ab</id>
<content type='text'>
The userspace consumer can be built as a module but it cannot be
automatically probed as there is no device table to match it up with
device tree nodes.

Add the missing macro so that the module can load automatically.

Fixes: 5c51d4afcf3fd ("regulator: userspace-consumer: Handle regulator-output DT nodes")
Signed-off-by: John Keeping &lt;jkeeping@inmusicbrands.com&gt;
Link: https://msgid.link/r/20240226160554.1453283-1-jkeeping@inmusicbrands.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: userspace-consumer: Convert to platform remove callback returning void</title>
<updated>2023-12-11T12:54:30Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-12-05T12:26:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3b2e8e98692b20436d0346fc6adffff1b596d50f'/>
<id>urn:sha1:3b2e8e98692b20436d0346fc6adffff1b596d50f</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://msgid.link/r/89c5f261707bf178e1508cf5dd55121f0da2dc3f.1701778038.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14</title>
<updated>2023-03-20T13:11:25Z</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2023-03-16T19:54:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=259b93b21a9ffe5117af4dfb5505437e463c6a5a'/>
<id>urn:sha1:259b93b21a9ffe5117af4dfb5505437e463c6a5a</id>
<content type='text'>
Probing of regulators can be a slow operation and can contribute to
slower boot times. This is especially true if a regulator is turned on
at probe time (with regulator-boot-on or regulator-always-on) and the
regulator requires delays (off-on-time, ramp time, etc).

While the overall kernel is not ready to switch to async probe by
default, as per the discussion on the mailing lists [1] it is believed
that the regulator subsystem is in good shape and we can move
regulator drivers over wholesale. There is no way to just magically
opt in all regulators (regulators are just normal drivers like
platform_driver), so we set PROBE_PREFER_ASYNCHRONOUS for all
regulators found in 'drivers/regulator' individually.

Given the number of drivers touched and the impossibility to test this
ahead of time, it wouldn't be shocking at all if this caused a
regression for someone. If there is a regression caused by this patch,
it's likely to be one of the cases talked about in [1]. As a "quick
fix", drivers involved in the regression could be fixed by changing
them to PROBE_FORCE_SYNCHRONOUS. That being said, the correct fix
would be to directly fix the problem that caused the issue with async
probe.

The approach here follows a similar approach that was used for the mmc
subsystem several years ago [2]. In fact, I ran nearly the same python
script to auto-generate the changes. The only thing I changed was to
search for "i2c_driver", "spmi_driver", and "spi_driver" in addition
to "platform_driver".

[1] https://lore.kernel.org/r/06db017f-e985-4434-8d1d-02ca2100cca0@sirena.org.uk
[2] https://lore.kernel.org/r/20200903232441.2694866-1-dianders@chromium.org/

Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/20230316125351.1.I2a4677392a38db5758dee0788b2cea5872562a82@changeid
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: userspace-consumer: Handle regulator-output DT nodes</title>
<updated>2022-11-03T13:35:06Z</updated>
<author>
<name>Zev Weiss</name>
<email>zev@bewilderbeest.net</email>
</author>
<published>2022-10-31T23:37:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5c51d4afcf3fd36159713556402e16cfab794ae9'/>
<id>urn:sha1:5c51d4afcf3fd36159713556402e16cfab794ae9</id>
<content type='text'>
In addition to adding some fairly simple OF support code, we make some
slight adjustments to the userspace-consumer driver to properly
support use with regulator-output hardware:

 - We now do an exclusive get of the supply regulators so as to
   prevent regulator_init_complete_work from automatically disabling
   them.

 - Instead of assuming that the supply is initially disabled, we now
   query its state to determine the initial value of drvdata-&gt;enabled.

Signed-off-by: Zev Weiss &lt;zev@bewilderbeest.net&gt;
Link: https://lore.kernel.org/r/20221031233704.22575-4-zev@bewilderbeest.net
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: userspace-consumer: use DEVICE_ATTR_RO/RW macro</title>
<updated>2021-06-02T11:03:37Z</updated>
<author>
<name>Zhen Lei</name>
<email>thunder.leizhen@huawei.com</email>
</author>
<published>2021-06-02T08:05:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ba499a50ce5846dd6f7a6df92c1f01d4201b5cce'/>
<id>urn:sha1:ba499a50ce5846dd6f7a6df92c1f01d4201b5cce</id>
<content type='text'>
Use DEVICE_ATTR_RO/RW macro helper instead of plain DEVICE_ATTR, which
makes the code a bit shorter and easier to read.

Signed-off-by: Zhen Lei &lt;thunder.leizhen@huawei.com&gt;
Link: https://lore.kernel.org/r/20210602080526.11117-1-thunder.leizhen@huawei.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152</title>
<updated>2019-05-30T18:26:32Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-27T06:55:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2874c5fd284268364ece81a7bd936f3c8168e567'/>
<id>urn:sha1:2874c5fd284268364ece81a7bd936f3c8168e567</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>regulator: use dev_get_platdata()</title>
<updated>2013-07-30T11:24:20Z</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-07-30T08:20:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dff91d0b721bf8f036c1071a8f16a7effaa87514'/>
<id>urn:sha1:dff91d0b721bf8f036c1071a8f16a7effaa87514</id>
<content type='text'>
Use the wrapper function for retrieving the platform data instead of
accessing dev-&gt;platform_data directly.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</content>
</entry>
<entry>
<title>regulator: userspace-consumer: Convert to use devm_* APIs</title>
<updated>2012-04-18T09:26:24Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2012-04-18T01:34:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5abe0c4005dea3a67051eb1942916f9d0f6a1796'/>
<id>urn:sha1:5abe0c4005dea3a67051eb1942916f9d0f6a1796</id>
<content type='text'>
Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
</entry>
<entry>
<title>regulator: Convert virtual and userspace regulator consumer drivers to use module_platform_driver()</title>
<updated>2011-11-28T11:49:13Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2011-11-28T03:38:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=005d610f2abc550172726b997f5cfe683769cc1c'/>
<id>urn:sha1:005d610f2abc550172726b997f5cfe683769cc1c</id>
<content type='text'>
This patch converts virtual and userspace regulator consumer drivers to use the
module_platform_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
</entry>
<entry>
<title>regulator: Add module.h to drivers/regulator users as required</title>
<updated>2011-10-31T23:32:15Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-07-17T20:28:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=65602c32ee9b5500e3cb617ccec2154ee2191898'/>
<id>urn:sha1:65602c32ee9b5500e3cb617ccec2154ee2191898</id>
<content type='text'>
Another group of drivers that are taking advantage of the implicit
presence of module.h -- and will break when we pull the carpet out
from under them during a cleanup.  Fix 'em now.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
</feed>
