<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/power/regulator.h, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/include/power/regulator.h?h=main</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/include/power/regulator.h?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2026-07-12T08:18:32Z</updated>
<entry>
<title>power: regulator: Fix regulator_enable/disable() macros</title>
<updated>2026-07-12T08:18:32Z</updated>
<author>
<name>Jonas Karlman</name>
<email>jonas@kwiboo.se</email>
</author>
<published>2026-07-10T13:15:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0f04bbf9ab3751405308f0a8aef2b6016a072b7d'/>
<id>urn:sha1:0f04bbf9ab3751405308f0a8aef2b6016a072b7d</id>
<content type='text'>
The commit 076265b75e61 ("compat: regulator: add enable/disable macros")
added regulator_enable/disable() macros to provide a closer analogue to
the Linux API.

These new macros wrap regulator_set_enable() that may return detailed
error codes and should typically not directly be called by drivers.

Change the macros to wrap regulator_set_enable_if_allowed() that masks
error codes consumers typically do not expect to closer match the
behavior of the Linux API.

Also move the macros outside the #if #else blocks to make the macros
available when !CONFIG_IS_ENABLED(DM_REGULATOR).

Fixes: 076265b75e61 ("compat: regulator: add enable/disable macros")
Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
</entry>
<entry>
<title>power: regulator: Add helper to set voltage within an acceptable range</title>
<updated>2026-07-12T08:18:32Z</updated>
<author>
<name>Jonas Karlman</name>
<email>jonas@kwiboo.se</email>
</author>
<published>2026-07-09T23:02:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0663b4f553789f8d38220a543116563885693120'/>
<id>urn:sha1:0663b4f553789f8d38220a543116563885693120</id>
<content type='text'>
Add regulator_set_value_clamp() that clamps a requested target voltage
to both caller-provided limits and the regulator constraints before
setting the regulator voltage value.

Return -EINVAL when the caller limits cannot be satisfied by the
regulator constraints or when the requested range is invalid.

This helper will initially be used to set vqmmc-supply voltage within an
acceptable range according to SD Standards, i.e. 1.70V-1.95V and
2.7V-3.6V.

Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
</entry>
<entry>
<title>compat: regulator: add enable/disable macros</title>
<updated>2026-04-21T17:19:49Z</updated>
<author>
<name>Casey Connolly</name>
<email>casey.connolly@linaro.org</email>
</author>
<published>2026-04-01T14:15:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=076265b75e61f56490003639b3d0a6483a9f507f'/>
<id>urn:sha1:076265b75e61f56490003639b3d0a6483a9f507f</id>
<content type='text'>
These just wrap regulator_set_enable() and provide a closer analogue to
the Linux API.

Signed-off-by: Casey Connolly &lt;casey.connolly@linaro.org&gt;
</content>
</entry>
<entry>
<title>power: regulator: Drop regulators_enable_boot_on/off()</title>
<updated>2024-10-01T01:19:07Z</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2024-09-26T23:14:15Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6f52feee2867f138af3d81a90a02a2b222e3366d'/>
<id>urn:sha1:6f52feee2867f138af3d81a90a02a2b222e3366d</id>
<content type='text'>
Both regulators_enable_boot_on/off() are unused and superseded by
regulator uclass regulator_post_probe(). Remove both functions.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</content>
</entry>
<entry>
<title>power: regulator: Drop regulator_unset()</title>
<updated>2024-10-01T01:19:07Z</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2024-09-26T23:14:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ba0faba52a3ffb86a59c6078053f2c9a10ef261b'/>
<id>urn:sha1:ba0faba52a3ffb86a59c6078053f2c9a10ef261b</id>
<content type='text'>
This function is never called, drop it.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</content>
</entry>
<entry>
<title>headers: don't depend on errno.h being available</title>
<updated>2024-01-24T16:12:11Z</updated>
<author>
<name>Max Krummenacher</name>
<email>max.krummenacher@toradex.com</email>
</author>
<published>2024-01-18T18:10:47Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e2e69291ee6031eccf50113fdd12099a1a7d44ba'/>
<id>urn:sha1:e2e69291ee6031eccf50113fdd12099a1a7d44ba</id>
<content type='text'>
These headers follow the pattern:

| #if CONFIG_IS_ENABLED(FANCY_FEATURE)
|   void foo(void);
| #else
|   static inline void foo(void) { return -ENOSYS; }
| #endif

In the #else path ENOSYS is used, however linux/errno.h is not included.
If errno.h has not been included already the compiler errors out even
if the inline function is not referenced.

Make those headers self contained.

Signed-off-by: Max Krummenacher &lt;max.krummenacher@toradex.com&gt;
Reviewed-by: Francesco Dolcini &lt;francesco.dolcini@toradex.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>power: regulator: Only run autoset once for each regulator</title>
<updated>2023-10-07T08:49:41Z</updated>
<author>
<name>Jonas Karlman</name>
<email>jonas@kwiboo.se</email>
</author>
<published>2023-08-21T22:30:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d99fb64a98af3bebf6b0c134291c4fb89e177aa2'/>
<id>urn:sha1:d99fb64a98af3bebf6b0c134291c4fb89e177aa2</id>
<content type='text'>
With the commit 4fcba5d556b4 ("regulator: implement basic reference
counter"), keeping regulator enablement in balance become more important.
Calling regulator_autoset multiple times on a fixed regulator increase
the enable count for each call, resulting in an unbalanced enable count.

Introduce a AUTOSET_DONE flag and use it to mark that autoset has run
for the regulator. Return -EALREADY on any subsequent call to autoset.

This fixes so that the enable count is only ever increased by one per
regulator for autoset.

Fixes: 4fcba5d556b4 ("regulator: implement basic reference counter")
Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Reviewed-by: Kever Yang &lt;kever.yang@rock-chips.com&gt;
</content>
</entry>
<entry>
<title>doc: replace @return by Return:</title>
<updated>2022-01-19T17:11:34Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2022-01-19T17:05:50Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=185f812c419f1b4f0d10d9787d59cf9f11a2a600'/>
<id>urn:sha1:185f812c419f1b4f0d10d9787d59cf9f11a2a600</id>
<content type='text'>
Sphinx expects Return: and not @return to indicate a return value.

find . -name '*.c' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;

find . -name '*.h' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
</entry>
<entry>
<title>power: regulator: Add support for regulator-force-boot-off</title>
<updated>2021-04-29T05:38:57Z</updated>
<author>
<name>Konstantin Porotchkin</name>
<email>kostap@marvell.com</email>
</author>
<published>2017-05-29T12:59:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fec8c900c8b2a08661f6ac3e1e71d6af6aaa67cd'/>
<id>urn:sha1:fec8c900c8b2a08661f6ac3e1e71d6af6aaa67cd</id>
<content type='text'>
Add support for regulator-force-boot-off DT property.
This property can be used by the board/device drivers for
turning off regulators on early init stages as pre-requisite
for the other components initialization.

Signed-off-by: Konstantin Porotchkin &lt;kostap@marvell.com&gt;
Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Cc: Jaehoon Chung &lt;jh80.chung@samsung.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Jaehoon Chung &lt;jh80.chung@samsung.com&gt;
</content>
</entry>
<entry>
<title>common: Drop asm/global_data.h from common header</title>
<updated>2021-02-02T20:33:42Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-10-31T03:38:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=401d1c4f5d2d29c4bc4beaec95402ca23eb63295'/>
<id>urn:sha1:401d1c4f5d2d29c4bc4beaec95402ca23eb63295</id>
<content type='text'>
Move this out of the common header and include it only where needed.  In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly.   Finally, we have a few
cases where we did not need to include &lt;asm/global_data.h&gt; at all, so
remove that include.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
</feed>
