<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/regulator/ad5398.c, branch linux-7.1.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-02-06T11:27:24+00:00</updated>
<entry>
<title>regulator: ad5398: Fix incorrect power down bit mask</title>
<updated>2025-02-06T11:27:24+00:00</updated>
<author>
<name>Dheeraj Reddy Jonnalagadda</name>
<email>dheeraj.linuxdev@gmail.com</email>
</author>
<published>2025-02-06T10:31:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0a7c85b516830c0bb088b0bdb2f2c50c76fc531a'/>
<id>urn:sha1:0a7c85b516830c0bb088b0bdb2f2c50c76fc531a</id>
<content type='text'>
AD5398_SW_POWER_DOWN was defined with a bit position outside the valid
range of the device's 16-bit register. The bitwise operation with an
unsigned short would always evaluate to 0, making the power down check
ineffective.

Update AD5398_SW_POWER_DOWN to use a valid bit position within the
16-bit range of the register.

Fixes: 19d022d67d73 ("regulator: ad5398: change enable bit name to improve readibility")
Signed-off-by: Dheeraj Reddy Jonnalagadda &lt;dheeraj.linuxdev@gmail.com&gt;
Link: https://patch.msgid.link/20250206103153.59114-1-dheeraj.linuxdev@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: ad5398: Add device tree support</title>
<updated>2025-02-03T00:38:47+00:00</updated>
<author>
<name>Isaac Scott</name>
<email>isaac.scott@ideasonboard.com</email>
</author>
<published>2025-01-28T17:31:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5a6a461079decea452fdcae955bccecf92e07e97'/>
<id>urn:sha1:5a6a461079decea452fdcae955bccecf92e07e97</id>
<content type='text'>
Previously, the ad5398 driver used only platform_data, which is
deprecated in favour of device tree. This caused the AD5398 to fail to
probe as it could not load its init_data. If the AD5398 has a device
tree node, pull the init_data from there using
of_get_regulator_init_data.

Signed-off-by: Isaac Scott &lt;isaac.scott@ideasonboard.com&gt;
Acked-by: Michael Hennerich &lt;michael.hennerich@analog.com&gt;
Link: https://patch.msgid.link/20250128173143.959600-4-isaac.scott@ideasonboard.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: ad5398: change enable bit name to improve readibility</title>
<updated>2025-02-03T00:38:46+00:00</updated>
<author>
<name>Isaac Scott</name>
<email>isaac.scott@ideasonboard.com</email>
</author>
<published>2025-01-28T17:31:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=19d022d67d7353f0e6e9ba255435d3de93862ac4'/>
<id>urn:sha1:19d022d67d7353f0e6e9ba255435d3de93862ac4</id>
<content type='text'>
The mask name AD5398_CURRENT_EN_MASK is misleading, as it implies that
setting bit 16 of the AD5398 enables current flow. In fact, setting this
bit prevents current flow, due to this bit being a software power down
control. This bit is referred to as "soft power down" in the datasheet.
As such, change the name of the bit and modify its use in the driver to
make the regulator more intuitively usable.

(When calling ad5398_enable, current will start flowing, and vice
versa).

Signed-off-by: Isaac Scott &lt;isaac.scott@ideasonboard.com&gt;
Acked-by: Michael Hennerich &lt;michael.hennerich@analog.com&gt;
Link: https://patch.msgid.link/20250128173143.959600-2-isaac.scott@ideasonboard.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: Switch i2c drivers back to use .probe()</title>
<updated>2023-05-07T23:50:11+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-05-05T22:02:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=964e186547b22b9c3b23fee49eb993391aa73ea8'/>
<id>urn:sha1:964e186547b22b9c3b23fee49eb993391aa73ea8</id>
<content type='text'>
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de
Link: https://lore.kernel.org/r/20230505220218.1239542-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown &lt;broonie@kernel.org
</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: ad5398: Convert to i2c's .probe_new()</title>
<updated>2022-11-23T14:17:40+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2022-11-18T22:44:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7f69edba960bbdcbc829d8d0995b1117ce29e8b1'/>
<id>urn:sha1:7f69edba960bbdcbc829d8d0995b1117ce29e8b1</id>
<content type='text'>
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Michael Hennerich &lt;michael.hennerich@analog.com&gt;
Acked-for-MFD-by: Lee Jones &lt;lee@kernel.org&gt;
Acked-for-Backlight-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20221118224540.619276-540-uwe@kleine-koenig.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 149</title>
<updated>2019-05-30T18:25:18+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-24T10:04:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=80503b23b23b5b2228d8750b786eb182f2fa28d2'/>
<id>urn:sha1:80503b23b23b5b2228d8750b786eb182f2fa28d2</id>
<content type='text'>
Based on 1 normalized pattern(s):

  licensed under the gpl 2 or later

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

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

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190524100845.150836982@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>regulator: ad5398: constify regulator_ops structure</title>
<updated>2017-01-31T20:38:27+00:00</updated>
<author>
<name>Bhumika Goyal</name>
<email>bhumirks@gmail.com</email>
</author>
<published>2017-01-28T13:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb24b9df7c2c75d1876ebcdcfe239fd76cf4e3e0'/>
<id>urn:sha1:bb24b9df7c2c75d1876ebcdcfe239fd76cf4e3e0</id>
<content type='text'>
Declare regulator_ops structure as const as it is only stored in the ops
field of a regulator_desc structure. This field is of type const, so
regulator_ops structures having this property can be made const too.

File size before: drivers/regulator/ad5398.o
   text	   data	    bss	    dec	    hex	filename
   1707	    672	      0	   2379	    94b	drivers/regulator/ad5398.o

File size after: drivers/regulator/ad5398.o
   text	   data	    bss	    dec	    hex	filename
   1963	    416	      0	   2379	    94b	drivers/regulator/ad5398.o

Signed-off-by: Bhumika Goyal &lt;bhumirks@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: ad5398: Fix return value of ad5398_write_reg</title>
<updated>2016-02-19T16:02:34+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2016-02-11T10:17:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4434cee9b6e9d70c8afea0d46bb211f132039d19'/>
<id>urn:sha1:4434cee9b6e9d70c8afea0d46bb211f132039d19</id>
<content type='text'>
i2c_master_send() returns the number of bytes written on success.
So current code returns 2 if ad5398_write_reg() success.
This return value is propagated to .set_current_limit, .enable and .disable
callbacks of regulator_ops. This can be a problem, for example, if the
users test if the return value of regulator_set_current_limit() is 0.
Fix it by making ad5398_write_reg() return 0 on success.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Michael Hennerich &lt;michael.hennerich@analog.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regulator: ad5398: Remove unnecessary MODULE_ALIAS()</title>
<updated>2015-08-30T11:21:01+00:00</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier@osg.samsung.com</email>
</author>
<published>2015-08-29T11:56:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ce317515b43f3e0b789b41df9b54e1608c783c5d'/>
<id>urn:sha1:ce317515b43f3e0b789b41df9b54e1608c783c5d</id>
<content type='text'>
The driver has a I2C device id table that is used to create the modaliases
and also "ad5398-regulator" is not a supported I2C id, so it's never used.

Signed-off-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
