<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/regulator/driver.h, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-01-17T17:48:54+00:00</updated>
<entry>
<title>regulator: Add support for power budget</title>
<updated>2025-01-17T17:48:54+00:00</updated>
<author>
<name>Kory Maincent</name>
<email>kory.maincent@bootlin.com</email>
</author>
<published>2025-01-15T14:41:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=42d7c87b4e1251f36eceac987e74623e7cda8577'/>
<id>urn:sha1:42d7c87b4e1251f36eceac987e74623e7cda8577</id>
<content type='text'>
Introduce power budget management for the regulator device. Enable tracking
of available power capacity by providing helpers to request and release
power budget allocations.

Signed-off-by: Kory Maincent &lt;kory.maincent@bootlin.com&gt;
Link: https://patch.msgid.link/20250115-feature_regulator_pw_budget-v2-1-0a44b949e6bc@bootlin.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: doc: add missing documentation for init_cb</title>
<updated>2024-10-23T11:46:39+00:00</updated>
<author>
<name>Jerome Brunet</name>
<email>jbrunet@baylibre.com</email>
</author>
<published>2024-10-23T08:35:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e55f45b0cda71ac2e9b4c6dee8852dc8d6f22ef0'/>
<id>urn:sha1:e55f45b0cda71ac2e9b4c6dee8852dc8d6f22ef0</id>
<content type='text'>
Add comment documenting introduced init_cb.
This solves the following warning when building the kernel documentation:

./include/linux/regulator/driver.h:435: warning: Function parameter or struct member 'init_cb' not described in 'regulator_desc'

Fixes: cfcdf395c21e ("regulator: core: add callback to perform runtime init")
Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Closes: https://lore.kernel.org/lkml/20241023155120.6c4fea20@canb.auug.org.au/
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Link: https://patch.msgid.link/20241023-regulator-doc-fixup-v1-1-ec018742ad73@baylibre.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: core: add callback to perform runtime init</title>
<updated>2024-10-22T19:49:14+00:00</updated>
<author>
<name>Jerome Brunet</name>
<email>jbrunet@baylibre.com</email>
</author>
<published>2024-10-08T16:07:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cfcdf395c21eeac4543d2b8fef9d29ae9e4559e9'/>
<id>urn:sha1:cfcdf395c21eeac4543d2b8fef9d29ae9e4559e9</id>
<content type='text'>
Provide an initialisation callback to handle runtime parameters.
The idea is similar to the regulator_init() callback, but it provides
regulator specific structures, instead of just the driver specific data.

As an example, this allows the driver to amend the regulator constraints
based on runtime parameters if necessary.

Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Link: https://patch.msgid.link/20241008-regulator-ignored-data-v2-2-d1251e0ee507@baylibre.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: pickable ranges: don't always cache vsel</title>
<updated>2024-05-20T17:40:39+00:00</updated>
<author>
<name>Matti Vaittinen</name>
<email>mazziesaccount@gmail.com</email>
</author>
<published>2024-05-20T12:31:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f4f4276f985a5aac7b310a4ed040b47e275e7591'/>
<id>urn:sha1:f4f4276f985a5aac7b310a4ed040b47e275e7591</id>
<content type='text'>
Some PMICs treat the vsel_reg same as apply-bit. Eg, when voltage range
is changed, the new voltage setting is not taking effect until the vsel
register is written.

Add a flag 'range_applied_by_vsel' to the regulator desc to indicate this
behaviour and to force the vsel value to be written to hardware if range
was changed, even if the old selector was same as the new one.

Signed-off-by: Matti Vaittinen &lt;mazziesaccount@gmail.com&gt;
Link: https://msgid.link/r/ZktCpcGZdgHWuN_L@fedora
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: Reuse LINEAR_RANGE() in REGULATOR_LINEAR_RANGE()</title>
<updated>2023-12-19T16:15:14+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-12-19T15:40:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=67ba055dd7758c34f6e64c9d35132362c1e1f0b5'/>
<id>urn:sha1:67ba055dd7758c34f6e64c9d35132362c1e1f0b5</id>
<content type='text'>
REGULATOR_LINEAR_RANGE() repeats what LINEAR_RANGE() provides.
Deduplicate the former by using the latter. No functional change
intended.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://msgid.link/r/20231219154012.2478688-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: Use bitfield values for range selectors</title>
<updated>2023-07-25T11:14:27+00:00</updated>
<author>
<name>Chen-Yu Tsai</name>
<email>wenst@chromium.org</email>
</author>
<published>2023-07-14T08:14:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=269cb04b601dd8c35bbee180a9800335b93111fb'/>
<id>urn:sha1:269cb04b601dd8c35bbee180a9800335b93111fb</id>
<content type='text'>
Right now the regulator helpers expect raw register values for the range
selectors. This is different from the voltage selectors, which are
normalized as bitfield values. This leads to a bit of confusion. Also,
raw values are harder to copy from datasheets or match up with them,
as datasheets will typically have bitfield values.

Make the helpers expect bitfield values, and convert existing users. The
field in regulator_desc is renamed to |linear_range_selectors_bitfield|.
This is intended to cause drivers added in the same merge window and
out-of-tree drivers using the incorrect variable and values to break,
preventing incorrect values being used on actual hardware and potentially
producing magic smoke.

Also include bitops.h explicitly for ffs(), and reorder the header include
statements. While at it, also replace module.h with export.h, since the
only use is EXPORT_SYMBOL_GPL.

Signed-off-by: Chen-Yu Tsai &lt;wenst@chromium.org&gt;
Link: https://lore.kernel.org/r/20230714081408.274567-1-wenst@chromium.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: expose regulator_find_closest_bigger</title>
<updated>2023-05-23T18:01:55+00:00</updated>
<author>
<name>Sebastian Reichel</name>
<email>sebastian.reichel@collabora.com</email>
</author>
<published>2023-05-04T17:36:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=431cb97b763133fba8b1c68c1ed089315f25e4dd'/>
<id>urn:sha1:431cb97b763133fba8b1c68c1ed089315f25e4dd</id>
<content type='text'>
Expose and document the table lookup logic used by
regulator_set_ramp_delay_regmap, so that it can be
reused for devices that cannot be configured via
regulator_set_ramp_delay_regmap.

Tested-by: Diederik de Haas &lt;didi.debian@cknow.org&gt; # Rock64, Quartz64 Model A + B
Tested-by: Vincent Legoll &lt;vincent.legoll@gmail.com&gt; # Pine64 QuartzPro64
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
Link: https://lore.kernel.org/r/20230504173618.142075-11-sebastian.reichel@collabora.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: core: Use different devices for resource allocation and DT lookup</title>
<updated>2022-12-08T13:02:37+00:00</updated>
<author>
<name>ChiYuan Huang</name>
<email>cy_huang@richtek.com</email>
</author>
<published>2022-12-06T07:22:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8f3cbcd6b440032ebc7f7d48a1689dcc70a4eb98'/>
<id>urn:sha1:8f3cbcd6b440032ebc7f7d48a1689dcc70a4eb98</id>
<content type='text'>
Following by the below discussion, there's the potential UAF issue
between regulator and mfd.
https://lore.kernel.org/all/20221128143601.1698148-1-yangyingliang@huawei.com/

From the analysis of Yingliang

CPU A				|CPU B
mt6370_probe()			|
  devm_mfd_add_devices()	|
				|mt6370_regulator_probe()
				|  regulator_register()
				|    //allocate init_data and add it to devres
				|    regulator_of_get_init_data()
i2c_unregister_device()		|
  device_del()			|
    devres_release_all()	|
      // init_data is freed	|
      release_nodes()		|
				|  // using init_data causes UAF
				|  regulator_register()

It's common to use mfd core to create child device for the regulator.
In order to do the DT lookup for init data, the child that registered
the regulator would pass its parent as the parameter. And this causes
init data resource allocated to its parent, not itself. The issue happen
when parent device is going to release and regulator core is still doing
some operation of init data constraint for the regulator of child device.

To fix it, this patch expand 'regulator_register' API to use the
different devices for init data allocation and DT lookup.

Reported-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Signed-off-by: ChiYuan Huang &lt;cy_huang@richtek.com&gt;
Link: https://lore.kernel.org/r/1670311341-32664-1-git-send-email-u0084500@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: fix a kernel-doc warning</title>
<updated>2022-06-28T12:07:42+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@kernel.org</email>
</author>
<published>2022-06-28T09:46:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0e584d46218e3b9dc12a98e18e81a0cd3e0d5419'/>
<id>urn:sha1:0e584d46218e3b9dc12a98e18e81a0cd3e0d5419</id>
<content type='text'>
document n_ramp_values field at struct regulator_desc, in order
to solve this warning:

	include/linux/regulator/driver.h:434: warning: Function parameter or member 'n_ramp_values' not described in 'regulator_desc'

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Link: https://lore.kernel.org/r/15efc16e878aa327aa2769023bcdf959a795f41d.1656409369.git.mchehab@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'regulator-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator</title>
<updated>2022-01-11T20:17:45+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-01-11T20:17:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fef8dfaea9d6c444b6c2174b3a2b0fca4d226c5e'/>
<id>urn:sha1:fef8dfaea9d6c444b6c2174b3a2b0fca4d226c5e</id>
<content type='text'>
Pull regulator updates from Mark Brown:
 "This has been a fairly quiet release for the regulator API, the main
  thing has been the addition of helpers for interrupt handling from
  Matti Vaittinen.

  We do also have support for quite a few new devices.

  Summary:

   - Helpers for trivial interrupt notifications, making it easier for
     drivers to handle error interrupts.

   - Support for Dialog DA914x, Maxim MAX2008x, Qualcomm PM8826,
     PMG1100, and PM8450 and TI TPS68470"

* tag 'regulator-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (30 commits)
  regulator: Add MAX20086-MAX20089 driver
  dt-bindings: regulators: Add bindings for Maxim MAX20086-MAX20089
  regulator: qcom_smd: Align probe function with rpmh-regulator
  regulator: remove redundant ret variable
  regulator: qcom-labibb: OCP interrupts are not a failure while disabled
  regulator: dt-bindings: samsung,s5m8767: Move fixed string BUCK9 to 'properties'
  regulator: Introduce tps68470-regulator driver
  drivers/regulator: remove redundant ret variable
  regulator: fix bullet lists of regulator_ops comment
  regulator: Fix type of regulator-coupled-max-spread property
  regulator: maxim,max8973: Document interrupts property
  regulator: qcom-rpmh: Add support for PM8450 regulators
  regulator: qcom,rpmh: Add compatible for PM8450
  regulator: da9121: Add DA914x binding info
  regulator: da9121: Remove erroneous compatible from binding
  regulator: da9121: Add DA914x support
  regulator: da9121: Prevent current limit change when enabled
  regulator: qcom-rpmh: Add PMG1110 regulators
  dt-bindings: regulator: Add compatible for pmg1110
  regulator: qcom_spmi: Add pm8226 regulators
  ...
</content>
</entry>
</feed>
