<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/regulator/virtual.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-12-11T12:54:31+00:00</updated>
<entry>
<title>regulator: virtual: Convert to platform remove callback returning void</title>
<updated>2023-12-11T12:54:31+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-12-05T12:26:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d637a75ede3db84f7ae4bc2ab398fe2232f22c26'/>
<id>urn:sha1:d637a75ede3db84f7ae4bc2ab398fe2232f22c26</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/d9954f02ae51b1b0b0077c710d16bfaeafa216ec.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:25+00:00</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2023-03-16T19:54:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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: virtual: add devicetree support</title>
<updated>2022-03-02T13:45:31+00:00</updated>
<author>
<name>Vincent Whitchurch</name>
<email>vincent.whitchurch@axis.com</email>
</author>
<published>2022-03-01T11:18:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=80c056656d46ffbece6125dee3f25adbc36d1486'/>
<id>urn:sha1:80c056656d46ffbece6125dee3f25adbc36d1486</id>
<content type='text'>
The reg-virt-consumer is very useful for development and testing of
regulator drivers since it allows voltages and modes to be set from
userspace.  However, it currently requires platform data so it cannot be
used without patching the kernel.  Add support for probing it from the
devicetree to remedy this.

Since this driver is only meant for testing and is a purely software
construct, no binding documentation is added.

Signed-off-by: Vincent Whitchurch &lt;vincent.whitchurch@axis.com&gt;
Link: https://lore.kernel.org/r/20220301111831.3742383-4-vincent.whitchurch@axis.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: virtual: warn against production use</title>
<updated>2022-03-02T13:45:30+00:00</updated>
<author>
<name>Vincent Whitchurch</name>
<email>vincent.whitchurch@axis.com</email>
</author>
<published>2022-03-01T11:18:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d2fb5487ecb2a28b61ff261ae18488afc98d24a6'/>
<id>urn:sha1:d2fb5487ecb2a28b61ff261ae18488afc98d24a6</id>
<content type='text'>
This driver is only meant for debugging and testing.  Currently, it's
not possible to use it without patching the kernel since it requires
platform data, but we'll be adding devicetree support, so add a loud
warning to make it clear that it's still only meant for debugging and
testing.

Signed-off-by: Vincent Whitchurch &lt;vincent.whitchurch@axis.com&gt;
Link: https://lore.kernel.org/r/20220301111831.3742383-3-vincent.whitchurch@axis.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: virtual: use dev_err_probe()</title>
<updated>2022-03-02T13:45:29+00:00</updated>
<author>
<name>Vincent Whitchurch</name>
<email>vincent.whitchurch@axis.com</email>
</author>
<published>2022-03-01T11:18:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=75c3543e39f0c94644eac5965b3efe50c2c5c39d'/>
<id>urn:sha1:75c3543e39f0c94644eac5965b3efe50c2c5c39d</id>
<content type='text'>
Use dev_err_probe() to avoid printing spurious warnings on
probe deferral.

Signed-off-by: Vincent Whitchurch &lt;vincent.whitchurch@axis.com&gt;
Link: https://lore.kernel.org/r/20220301111831.3742383-2-vincent.whitchurch@axis.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:32+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-27T06:55:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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: drop owner assignment from platform_drivers</title>
<updated>2014-10-20T14:21:29+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa@the-dreams.de</email>
</author>
<published>2014-10-20T14:21:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c794b2654555d6af7572e3a8f13b2b39126df0c'/>
<id>urn:sha1:6c794b2654555d6af7572e3a8f13b2b39126df0c</id>
<content type='text'>
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>drivers/regulator/virtual: avoid world-writable sysfs files.</title>
<updated>2014-05-14T01:23:55+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2014-05-14T01:03:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=71e06af26cb6ed93a58a8a835d0d70191d779343'/>
<id>urn:sha1:71e06af26cb6ed93a58a8a835d0d70191d779343</id>
<content type='text'>
In line with practice for module parameters, we're adding a build-time
check that sysfs files aren't world-writable.

Cc: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>regulator: use dev_get_platdata()</title>
<updated>2013-07-30T11:24:20+00:00</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-07-30T08:20:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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: Remove all platform_set_drvdata(pdev, NULL) in drivers</title>
<updated>2013-05-12T14:34:12+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-05-03T12:46:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=405c54009c85cf03d459f5880744b0d4ebb892e4'/>
<id>urn:sha1:405c54009c85cf03d459f5880744b0d4ebb892e4</id>
<content type='text'>
Since 0998d06310 "device-core: Ensure drvdata = NULL when no driver is bound",
this is done by driver core after device_release or on probe failure.
Thus we can remove all platform_set_drvdata(pdev, NULL) in drivers.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
</entry>
</feed>
