<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/base/regmap/regcache.c, branch v7.3-rc1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.3-rc1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.3-rc1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-08-19T16:32:57+00:00</updated>
<entry>
<title>Merge tag 'regmap-v7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap</title>
<updated>2026-08-19T16:32:57+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-19T16:32:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=259c4f8e775cf25069c30e806b037b154147720d'/>
<id>urn:sha1:259c4f8e775cf25069c30e806b037b154147720d</id>
<content type='text'>
Pull regmap updates from Mark Brown:
 "This is a relatively busy release, though it's mostly cleanup work. We
  did add some new hooks for regmap-irq to support some driver work,
  that should also come in as part of a shared branch with the relevant
  driver work in the GPIO subsystem"

* tag 'regmap-v7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: clean up kernel-doc comments
  regcache: Validate cache_only state in regcache_sync_region()
  regcache: Warn if regcache_sync() is called in cache_only mode
  regcache: Mark cache dirty if selector register rewrite fails
  regcache: Preserve cache synchronization errors in regcache_sync()
  regmap: maple: Workaround for another false-positive compiler warning
  regcache: Make -&gt;exit() callback return void
</content>
</entry>
<entry>
<title>regcache: Sort the local copy of an unsorted reg_defaults array</title>
<updated>2026-08-06T12:01:39+00:00</updated>
<author>
<name>Peter Ujfalusi</name>
<email>peter.ujfalusi@linux.intel.com</email>
</author>
<published>2026-08-05T13:22:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4b05ccb17f92268384d483221a577fccfc291c7a'/>
<id>urn:sha1:4b05ccb17f92268384d483221a577fccfc291c7a</id>
<content type='text'>
regcache_lookup_reg() bsearch()es the reg_defaults array, which requires
it to be sorted by ascending register address.  Entries following a
descending step are never found, so regcache_reg_needs_sync() reports
that they need a sync and they are written to the device on every
regcache_sync() even when they were never touched.

Detect the misordering while reg_defaults is validated against the
register stride and sort the local copy.  The check needs no new loop
and sort() only runs for the affected drivers, which are also warned
about.

Note that sort() is not stable, so for arrays with duplicated register
addresses it remains unspecified which entry is found.

Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Reviewed-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Tested-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Link: https://patch.msgid.link/20260805132250.2637-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regcache: Use a consistent sort for defaults table</title>
<updated>2026-08-06T11:59:47+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-08-05T17:51:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9ed3d974a26644ad57b3d4d067e279188b2038b6'/>
<id>urn:sha1:9ed3d974a26644ad57b3d4d067e279188b2038b6</id>
<content type='text'>
When we look up registers in the defaults table we use a binary search,
and we have a regcache_sort_defaults() API to help drivers that constuct
their defaults tables on the fly.  Unfortunately the lookup and the sort
don't use the same comparison function, and to make matters worse the
comparison function used during lookups is written for signed register
numbers rather than the unsigned ones we actually have so can produce
suprising results when some of the addresses have the top bit set.

Standardise on the more explicitly coded function to ensure consistent
results.

Reviewed-by: Peter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Reviewed-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Tested-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Link: https://patch.msgid.link/20260805-regmap-regcache-sort-v1-1-162186aad8b9@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regcache: Warn if regcache_sync() is called in cache_only mode</title>
<updated>2026-07-20T17:45:15+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-07-20T17:45:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aba0c1ad728d20a8d345a6550ed3401d10421766'/>
<id>urn:sha1:aba0c1ad728d20a8d345a6550ed3401d10421766</id>
<content type='text'>
phucduc.bui@gmail.com &lt;phucduc.bui@gmail.com&gt; did a bit of work to help
people avoid running into silly errors.

Link: https://patch.msgid.link/20260720033238.52479-1-phucduc.bui@gmail.com
</content>
</entry>
<entry>
<title>regcache: Validate cache_only state in regcache_sync_region()</title>
<updated>2026-07-20T17:45:14+00:00</updated>
<author>
<name>bui duc phuc</name>
<email>phucduc.bui@gmail.com</email>
</author>
<published>2026-07-20T03:32:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=afc8e3ee83078eb5dab5a9ea561cdb0008f64f5d'/>
<id>urn:sha1:afc8e3ee83078eb5dab5a9ea561cdb0008f64f5d</id>
<content type='text'>
Add a WARN_ON() check to ensure regcache_sync_region() is not called
while cache_only is enabled.

Signed-off-by: bui duc phuc &lt;phucduc.bui@gmail.com&gt;
Link: https://patch.msgid.link/20260720033238.52479-2-phucduc.bui@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regcache: Warn if regcache_sync() is called in cache_only mode</title>
<updated>2026-07-20T17:45:13+00:00</updated>
<author>
<name>bui duc phuc</name>
<email>phucduc.bui@gmail.com</email>
</author>
<published>2026-07-20T03:32:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=86fc3483a4d60f575533d1d5542bacca2a25ddc7'/>
<id>urn:sha1:86fc3483a4d60f575533d1d5542bacca2a25ddc7</id>
<content type='text'>
Calling regcache_sync() while cache_only is enabled is invalid API
usage, since writes are intentionally kept in the cache and cannot
be synchronized to hardware.
Document that callers must disable cache_only before calling
regcache_sync(), and reject incorrect usage with a WARN_ON() and
-EINVAL.

Signed-off-by: bui duc phuc &lt;phucduc.bui@gmail.com&gt;
Link: https://patch.msgid.link/20260720033238.52479-1-phucduc.bui@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regcache: Mark cache dirty if selector register rewrite fails</title>
<updated>2026-07-13T17:52:43+00:00</updated>
<author>
<name>bui duc phuc</name>
<email>phucduc.bui@gmail.com</email>
</author>
<published>2026-07-13T05:03:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a7d168db6bb7a5be2616a4828f491e412fe57a6d'/>
<id>urn:sha1:a7d168db6bb7a5be2616a4828f491e412fe57a6d</id>
<content type='text'>
After a successful cache synchronization, regcache_sync() clears
cache_dirty. If rewriting a selector register later fails, the cache
and hardware become inconsistent while the cache still appears clean.

Update cache_dirty to reflect the cache and hardware state when
selector register rewriting fails.

Signed-off-by: bui duc phuc &lt;phucduc.bui@gmail.com&gt;
Link: https://patch.msgid.link/20260713050312.38729-3-phucduc.bui@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regcache: Preserve cache synchronization errors in regcache_sync()</title>
<updated>2026-07-13T17:52:42+00:00</updated>
<author>
<name>bui duc phuc</name>
<email>phucduc.bui@gmail.com</email>
</author>
<published>2026-07-13T05:03:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=85da24aac16ab70c77a763e42e52fc3a782fb21c'/>
<id>urn:sha1:85da24aac16ab70c77a763e42e52fc3a782fb21c</id>
<content type='text'>
regcache_sync() currently stores the return value from both cache
synchronization and selector register rewriting in the same variable.
As a result, a successful selector register rewrite can overwrite an
earlier cache synchronization error, causing regcache_sync() to return
success even though synchronization failed.

Track the two operations with separate return variables and preserve the
cache synchronization error. Errors from rewriting selector registers are
returned only if cache synchronization completed successfully.

Signed-off-by: bui duc phuc &lt;phucduc.bui@gmail.com&gt;
Link: https://patch.msgid.link/20260713050312.38729-2-phucduc.bui@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regcache: Do not overwrite error code when finalizing cache after error</title>
<updated>2026-06-16T13:13:48+00:00</updated>
<author>
<name>Francesco Lavra</name>
<email>flavra@baylibre.com</email>
</author>
<published>2026-06-16T11:44:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9108f7fa493b4c88cbc09503e0c164244456bad5'/>
<id>urn:sha1:9108f7fa493b4c88cbc09503e0c164244456bad5</id>
<content type='text'>
During regcache initialization, if an error occurs in the
cache_ops-&gt;populate callback, and if cache operations include an exit
callback, the error code from populate() is overwritten with the return
value from exit(). This hides the error condition from the caller of
regcache_init(), and can cause NULL pointer dereferences when the regcache
is later accessed.

Fixes: 94a3a95f0315 ("regcache: Add -&gt;populate() callback to separate from -&gt;init()")
Signed-off-by: Francesco Lavra &lt;flavra@baylibre.com&gt;
Link: https://patch.msgid.link/20260616114429.1852456-1-flavra@baylibre.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regcache: Move HW readback after cache initialisation</title>
<updated>2026-03-05T15:23:01+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2026-03-05T08:53:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e7662bced2e98ffa2c572126677deb9cf55d43b3'/>
<id>urn:sha1:e7662bced2e98ffa2c572126677deb9cf55d43b3</id>
<content type='text'>
Make sure that cache is initialised before calling any IO
using regmap, this makes sure that we won't access NULL or
invalid pointers in the cache which hasn't been initialised.

As a side effect it also makes the ordering of cleaning up
the resources in regcache_exit() to be the same (and correct)
as in the error path of regcache_init(). This is not a problem
right now as they do not have dependencies, but it makes code
robust against potential changes in the future.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://patch.msgid.link/20260305085449.3184020-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
