<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/regulator, branch v6.3-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Merge tag 'regulator-fix-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator</title>
<updated>2023-03-02T17:21:25+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-03-02T17:21:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fd7ee8de984efcd31b8f5dce9e340ccd59eb436f'/>
<id>fd7ee8de984efcd31b8f5dce9e340ccd59eb436f</id>
<content type='text'>
Pull regulator fixes from Mark Brown:
 "Two fixes here, one driver fix for incorrect error codes and a fix in
  the core to use ktime_get_boottime() in order to fix accounting of the
  time regulators have been powered down over suspend. ktime_get()
  pauses over suspend which is not what we want"

* tag 'regulator-fix-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: core: Use ktime_get_boottime() to determine how long a regulator was off
  regulator: max597x: Fix error return code in max597x_get_status
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull regulator fixes from Mark Brown:
 "Two fixes here, one driver fix for incorrect error codes and a fix in
  the core to use ktime_get_boottime() in order to fix accounting of the
  time regulators have been powered down over suspend. ktime_get()
  pauses over suspend which is not what we want"

* tag 'regulator-fix-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: core: Use ktime_get_boottime() to determine how long a regulator was off
  regulator: max597x: Fix error return code in max597x_get_status
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: core: Use ktime_get_boottime() to determine how long a regulator was off</title>
<updated>2023-02-23T11:40:14+00:00</updated>
<author>
<name>Matthias Kaehlcke</name>
<email>mka@chromium.org</email>
</author>
<published>2023-02-23T00:33:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=80d2c29e09e663761c2778167a625b25ffe01b6f'/>
<id>80d2c29e09e663761c2778167a625b25ffe01b6f</id>
<content type='text'>
For regulators with 'off-on-delay-us' the regulator framework currently
uses ktime_get() to determine how long the regulator has been off
before re-enabling it (after a delay if needed). A problem with using
ktime_get() is that it doesn't account for the time the system is
suspended. As a result a regulator with a longer 'off-on-delay' (e.g.
500ms) that was switched off during suspend might still incurr in a
delay on resume before it is re-enabled, even though the regulator
might have been off for hours. ktime_get_boottime() accounts for
suspend time, use it instead of ktime_get().

Fixes: a8ce7bd89689 ("regulator: core: Fix off_on_delay handling")
Cc: stable@vger.kernel.org    # 5.13+
Signed-off-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Link: https://lore.kernel.org/r/20230223003301.v2.1.I9719661b8eb0a73b8c416f9c26cf5bd8c0563f99@changeid
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For regulators with 'off-on-delay-us' the regulator framework currently
uses ktime_get() to determine how long the regulator has been off
before re-enabling it (after a delay if needed). A problem with using
ktime_get() is that it doesn't account for the time the system is
suspended. As a result a regulator with a longer 'off-on-delay' (e.g.
500ms) that was switched off during suspend might still incurr in a
delay on resume before it is re-enabled, even though the regulator
might have been off for hours. ktime_get_boottime() accounts for
suspend time, use it instead of ktime_get().

Fixes: a8ce7bd89689 ("regulator: core: Fix off_on_delay handling")
Cc: stable@vger.kernel.org    # 5.13+
Signed-off-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Link: https://lore.kernel.org/r/20230223003301.v2.1.I9719661b8eb0a73b8c416f9c26cf5bd8c0563f99@changeid
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'regulator-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator</title>
<updated>2023-02-22T18:49:32+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-02-22T18:49:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0175ec3a28c695562a08fdccf73f2ec5ed744e2f'/>
<id>0175ec3a28c695562a08fdccf73f2ec5ed744e2f</id>
<content type='text'>
Pull regulator updates from Mark Brown:
 "This has been a very quiet release for the regulator API: there's one
  new driver for the Maxim MAX20411, some DT schema conversions and some
  small tweaks and improvements but really nothing major at all"

* tag 'regulator-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (22 commits)
  regulator: max597x: Align for simple_mfd_i2c driver
  regulator: max20411: Fix off-by-one for n_voltages setting
  regulator: max597x: Remove unused variable
  regulator: tps65219: use generic set_bypass()
  regulator: s5m8767: Bounds check id indexing into arrays
  regulator: max77802: Bounds check regulator id against opmode
  regulator: max20411: Convert to i2c's .probe_new()
  regulator: scmi: Allow for zero voltage domains
  regulator: max20411: Directly include bitfield.h
  regulator: Introduce Maxim MAX20411 Step-Down converter
  regulator: dt-bindings: Describe Maxim MAX20411
  regulator: dt-bindings: qcom-labibb: Allow regulator-common properties
  regulator: dt-bindings: fixed-regulator: allow gpios property
  regulator: tps65219: use IS_ERR() to detect an error pointer
  regulator: mcp16502: add enum MCP16502_REG_HPM description
  regulator: fixed-helper: use the correct function name in comment
  regulator: act8945a: fix non-kernel-doc comments
  dt-bindings: regulators: convert non-smd RPM Regulators bindings to dt-schema
  regulator: dt-bindings: Convert Fairchild FAN53555 to DT schema
  regulator: dt-bindings: qcom,usb-vbus-regulator: change node name
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull regulator updates from Mark Brown:
 "This has been a very quiet release for the regulator API: there's one
  new driver for the Maxim MAX20411, some DT schema conversions and some
  small tweaks and improvements but really nothing major at all"

* tag 'regulator-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (22 commits)
  regulator: max597x: Align for simple_mfd_i2c driver
  regulator: max20411: Fix off-by-one for n_voltages setting
  regulator: max597x: Remove unused variable
  regulator: tps65219: use generic set_bypass()
  regulator: s5m8767: Bounds check id indexing into arrays
  regulator: max77802: Bounds check regulator id against opmode
  regulator: max20411: Convert to i2c's .probe_new()
  regulator: scmi: Allow for zero voltage domains
  regulator: max20411: Directly include bitfield.h
  regulator: Introduce Maxim MAX20411 Step-Down converter
  regulator: dt-bindings: Describe Maxim MAX20411
  regulator: dt-bindings: qcom-labibb: Allow regulator-common properties
  regulator: dt-bindings: fixed-regulator: allow gpios property
  regulator: tps65219: use IS_ERR() to detect an error pointer
  regulator: mcp16502: add enum MCP16502_REG_HPM description
  regulator: fixed-helper: use the correct function name in comment
  regulator: act8945a: fix non-kernel-doc comments
  dt-bindings: regulators: convert non-smd RPM Regulators bindings to dt-schema
  regulator: dt-bindings: Convert Fairchild FAN53555 to DT schema
  regulator: dt-bindings: qcom,usb-vbus-regulator: change node name
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: max597x: Fix error return code in max597x_get_status</title>
<updated>2023-02-20T14:32:21+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2023-02-20T10:56:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d0566564d483e6576868224286632fd95aafd4ac'/>
<id>d0566564d483e6576868224286632fd95aafd4ac</id>
<content type='text'>
REGULATOR_FAILED_RETRY should not be used in max597x_get_status error path.
Othewise, the regulator core will treat it as REGULATOR_STATUS_ON.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Link: https://lore.kernel.org/r/20230220105614.356187-1-axel.lin@ingics.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
REGULATOR_FAILED_RETRY should not be used in max597x_get_status error path.
Othewise, the regulator core will treat it as REGULATOR_STATUS_ON.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Link: https://lore.kernel.org/r/20230220105614.356187-1-axel.lin@ingics.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: max597x: Align for simple_mfd_i2c driver</title>
<updated>2023-02-16T15:54:02+00:00</updated>
<author>
<name>Naresh Solanki</name>
<email>naresh.solanki@9elements.com</email>
</author>
<published>2023-02-16T07:53:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7f62cb8861190e7cc1018ff37597fc49b2eaafa8'/>
<id>7f62cb8861190e7cc1018ff37597fc49b2eaafa8</id>
<content type='text'>
Use regmap provided by simple_mfd_i2c driver and remove unused variable.
Identify device variant by checking compatible property in DT.

Signed-off-by: Naresh Solanki &lt;Naresh.Solanki@9elements.com&gt;
Link: https://lore.kernel.org/r/20230216075302.68935-1-Naresh.Solanki@9elements.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use regmap provided by simple_mfd_i2c driver and remove unused variable.
Identify device variant by checking compatible property in DT.

Signed-off-by: Naresh Solanki &lt;Naresh.Solanki@9elements.com&gt;
Link: https://lore.kernel.org/r/20230216075302.68935-1-Naresh.Solanki@9elements.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: max20411: Fix off-by-one for n_voltages setting</title>
<updated>2023-02-13T12:45:00+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2023-02-11T15:00:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9d1c73191f94c79076b5f46a31b8a1e12b18bc79'/>
<id>9d1c73191f94c79076b5f46a31b8a1e12b18bc79</id>
<content type='text'>
Otherwise regulator_list_voltage returns -EINVAL for MAX20411_MAX_SEL.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Link: https://lore.kernel.org/r/20230211150019.1545542-1-axel.lin@ingics.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise regulator_list_voltage returns -EINVAL for MAX20411_MAX_SEL.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Link: https://lore.kernel.org/r/20230211150019.1545542-1-axel.lin@ingics.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: max597x: Remove unused variable</title>
<updated>2023-02-10T16:45:30+00:00</updated>
<author>
<name>Naresh Solanki</name>
<email>naresh.solanki@9elements.com</email>
</author>
<published>2023-02-10T16:32:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6caacd82f09c183a91951776cd8d326e46ef84b4'/>
<id>6caacd82f09c183a91951776cd8d326e46ef84b4</id>
<content type='text'>
max597x_regmap_config isn't used &amp; hence remove the same.

Signed-off-by: Naresh Solanki &lt;Naresh.Solanki@9elements.com&gt;
Link: https://lore.kernel.org/r/20230210163225.1208035-1-Naresh.Solanki@9elements.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
max597x_regmap_config isn't used &amp; hence remove the same.

Signed-off-by: Naresh Solanki &lt;Naresh.Solanki@9elements.com&gt;
Link: https://lore.kernel.org/r/20230210163225.1208035-1-Naresh.Solanki@9elements.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: tps65219: use generic set_bypass()</title>
<updated>2023-02-03T14:10:53+00:00</updated>
<author>
<name>Jerome Neanne</name>
<email>jneanne@baylibre.com</email>
</author>
<published>2023-02-03T14:01:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0365df81145a4cfaae5f4da896160de512256e6d'/>
<id>0365df81145a4cfaae5f4da896160de512256e6d</id>
<content type='text'>
Due to wrong interpretation of the specification,
custom implementation was used instead of standard regmap helper.
LINK: https://lore.kernel.org/all/c2014039-f1e8-6976-33d6-52e2dd4e7b66@baylibre.com/

Fixes: c12ac5fc3e0a ("regulator: drivers: Add TI TPS65219 PMIC regulators support")

Regulator does NOT require to be off to be switched to bypass mode.

Signed-off-by: Jerome Neanne &lt;jneanne@baylibre.com&gt;
Link: https://lore.kernel.org/r/20230203140119.13029-1-jneanne@baylibre.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Due to wrong interpretation of the specification,
custom implementation was used instead of standard regmap helper.
LINK: https://lore.kernel.org/all/c2014039-f1e8-6976-33d6-52e2dd4e7b66@baylibre.com/

Fixes: c12ac5fc3e0a ("regulator: drivers: Add TI TPS65219 PMIC regulators support")

Regulator does NOT require to be off to be switched to bypass mode.

Signed-off-by: Jerome Neanne &lt;jneanne@baylibre.com&gt;
Link: https://lore.kernel.org/r/20230203140119.13029-1-jneanne@baylibre.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: s5m8767: Bounds check id indexing into arrays</title>
<updated>2023-01-28T17:19:11+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2023-01-28T00:53:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e314e15a0b58f9d051c00b25951073bcdae61953'/>
<id>e314e15a0b58f9d051c00b25951073bcdae61953</id>
<content type='text'>
The compiler has no way to know if "id" is within the array bounds of
the regulators array. Add a check for this and a build-time check that
the regulators and reg_voltage_map arrays are sized the same. Seen with
GCC 13:

../drivers/regulator/s5m8767.c: In function 's5m8767_pmic_probe':
../drivers/regulator/s5m8767.c:936:35: warning: array subscript [0, 36] is outside array bounds of 'struct regulator_desc[37]' [-Warray-bounds=]
  936 |                         regulators[id].vsel_reg =
      |                         ~~~~~~~~~~^~~~

Cc: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Cc: Liam Girdwood &lt;lgirdwood@gmail.com&gt;
Cc: Mark Brown &lt;broonie@kernel.org&gt;
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Link: https://lore.kernel.org/r/20230128005358.never.313-kees@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The compiler has no way to know if "id" is within the array bounds of
the regulators array. Add a check for this and a build-time check that
the regulators and reg_voltage_map arrays are sized the same. Seen with
GCC 13:

../drivers/regulator/s5m8767.c: In function 's5m8767_pmic_probe':
../drivers/regulator/s5m8767.c:936:35: warning: array subscript [0, 36] is outside array bounds of 'struct regulator_desc[37]' [-Warray-bounds=]
  936 |                         regulators[id].vsel_reg =
      |                         ~~~~~~~~~~^~~~

Cc: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Cc: Liam Girdwood &lt;lgirdwood@gmail.com&gt;
Cc: Mark Brown &lt;broonie@kernel.org&gt;
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Link: https://lore.kernel.org/r/20230128005358.never.313-kees@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: max77802: Bounds check regulator id against opmode</title>
<updated>2023-01-28T11:27:57+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2023-01-27T22:52:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4fd8bcec5fd7c0d586206fa2f42bd67b06cdaa7e'/>
<id>4fd8bcec5fd7c0d586206fa2f42bd67b06cdaa7e</id>
<content type='text'>
Explicitly bounds-check the id before accessing the opmode array. Seen
with GCC 13:

../drivers/regulator/max77802-regulator.c: In function 'max77802_enable':
../drivers/regulator/max77802-regulator.c:217:29: warning: array subscript [0, 41] is outside array bounds of 'unsigned int[42]' [-Warray-bounds=]
  217 |         if (max77802-&gt;opmode[id] == MAX77802_OFF_PWRREQ)
      |             ~~~~~~~~~~~~~~~~^~~~
../drivers/regulator/max77802-regulator.c:62:22: note: while referencing 'opmode'
   62 |         unsigned int opmode[MAX77802_REG_MAX];
      |                      ^~~~~~

Cc: Javier Martinez Canillas &lt;javier@dowhile0.org&gt;
Cc: Liam Girdwood &lt;lgirdwood@gmail.com&gt;
Cc: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://lore.kernel.org/r/20230127225203.never.864-kees@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Explicitly bounds-check the id before accessing the opmode array. Seen
with GCC 13:

../drivers/regulator/max77802-regulator.c: In function 'max77802_enable':
../drivers/regulator/max77802-regulator.c:217:29: warning: array subscript [0, 41] is outside array bounds of 'unsigned int[42]' [-Warray-bounds=]
  217 |         if (max77802-&gt;opmode[id] == MAX77802_OFF_PWRREQ)
      |             ~~~~~~~~~~~~~~~~^~~~
../drivers/regulator/max77802-regulator.c:62:22: note: while referencing 'opmode'
   62 |         unsigned int opmode[MAX77802_REG_MAX];
      |                      ^~~~~~

Cc: Javier Martinez Canillas &lt;javier@dowhile0.org&gt;
Cc: Liam Girdwood &lt;lgirdwood@gmail.com&gt;
Cc: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://lore.kernel.org/r/20230127225203.never.864-kees@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
