<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/regmap, branch v6.16</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.16</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.16'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-06-29T21:10:36Z</updated>
<entry>
<title>regmap: fix potential memory leak of regmap_bus</title>
<updated>2025-06-29T21:10:36Z</updated>
<author>
<name>Abdun Nihaal</name>
<email>abdun.nihaal@gmail.com</email>
</author>
<published>2025-06-26T17:28:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c871c199accb39d0f4cb941ad0dccabfc21e9214'/>
<id>urn:sha1:c871c199accb39d0f4cb941ad0dccabfc21e9214</id>
<content type='text'>
When __regmap_init() is called from __regmap_init_i2c() and
__regmap_init_spi() (and their devm versions), the bus argument
obtained from regmap_get_i2c_bus() and regmap_get_spi_bus(), may be
allocated using kmemdup() to support quirks. In those cases, the
bus-&gt;free_on_exit field is set to true.

However, inside __regmap_init(), buf is not freed on any error path.
This could lead to a memory leak of regmap_bus when __regmap_init()
fails. Fix that by freeing bus on error path when free_on_exit is set.

Fixes: ea030ca68819 ("regmap-i2c: Set regmap max raw r/w from quirks")
Signed-off-by: Abdun Nihaal &lt;abdun.nihaal@gmail.com&gt;
Link: https://patch.msgid.link/20250626172823.18725-1-abdun.nihaal@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: irq: Add support for chips without separate IRQ status</title>
<updated>2025-05-22T12:11:50Z</updated>
<author>
<name>Mathieu Dubois-Briand</name>
<email>mathieu.dubois-briand@bootlin.com</email>
</author>
<published>2025-05-22T12:06:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1c12fbdf40e17df2efc24bf2009a0c3bfa75bfa7'/>
<id>urn:sha1:1c12fbdf40e17df2efc24bf2009a0c3bfa75bfa7</id>
<content type='text'>
Some GPIO chips allow to rise an IRQ on GPIO level changes but do not
provide an IRQ status for each separate line: only the current gpio
level can be retrieved.

Add support for these chips, emulating IRQ status by comparing GPIO
levels with the levels during the previous interrupt.

Signed-off-by: Mathieu Dubois-Briand &lt;mathieu.dubois-briand@bootlin.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://patch.msgid.link/20250522-mdb-max7360-support-v9-5-74fc03517e41@bootlin.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap-irq: Use dedicated interrupt wake setters</title>
<updated>2025-05-21T15:04:11Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2025-05-21T13:55:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eb4e0298a05684f88fbd2106fc482f859f804aa6'/>
<id>urn:sha1:eb4e0298a05684f88fbd2106fc482f859f804aa6</id>
<content type='text'>
Use enable_irq_wake() and disable_irq_wake() instead of
calling low-level irq_set_irq_wake() with a parameter.

No functional changes.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://patch.msgid.link/20250521135538.1086717-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Move selecting for REGMAP_MDIO and REGMAP_IRQ</title>
<updated>2025-05-20T09:25:08Z</updated>
<author>
<name>Andrew Davis</name>
<email>afd@ti.com</email>
</author>
<published>2025-05-16T14:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c5a219395b4e6312102a505bfe73aac8f8bada8c'/>
<id>urn:sha1:c5a219395b4e6312102a505bfe73aac8f8bada8c</id>
<content type='text'>
If either REGMAP_IRQ or REGMAP_MDIO are set then REGMAP is also set.
This then enables the selecting of IRQ_DOMAIN or MDIO_BUS from REGMAP
based on the above two symbols respectively. This makes it very easy
to end up with "circular dependencies".

Instead select the IRQ_DOMAIN or MDIO_BUS from the symbols that make
use of them. This is almost equivalent to before but makes it less
likely to end up with false circular dependency detections.

Signed-off-by: Andrew Davis &lt;afd@ti.com&gt;
Reported-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Closes: https://lore.kernel.org/r/bfe991fa-f54c-4d58-b2e0-34c4e4eb48f4@linaro.org/
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Link: https://patch.msgid.link/20250516141722.13772-1-afd@ti.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regcache: Use sort()'s default swap() implementation</title>
<updated>2025-04-30T00:38:31Z</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2025-04-28T06:13:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d30e845b0ae63400738709ca624a4a7bb69c4ba2'/>
<id>urn:sha1:d30e845b0ae63400738709ca624a4a7bb69c4ba2</id>
<content type='text'>
Use sort()'s default swap() implementation and remove the custom
regcache_defaults_swap() function.

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Link: https://patch.msgid.link/20250428061318.88859-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'regmap-v6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap</title>
<updated>2025-03-29T21:31:39Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-03-29T21:31:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=054b7477e3bfdd562b723ce5e227bd3fd2621f51'/>
<id>urn:sha1:054b7477e3bfdd562b723ce5e227bd3fd2621f51</id>
<content type='text'>
Pull regmap updates from Mark Brown:
 "Only a couple of small patches this release, one refactoring struct
  regmap to pack it more efficiently and another which makes our way of
  setting all bits consistent in the regmap-irq code"

* tag 'regmap-v6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: irq: Use one way of setting all bits in the register
  regmap: Reorder 'struct regmap'
</content>
</entry>
<entry>
<title>regcache: Add support for sorting defaults arrays</title>
<updated>2025-02-27T13:09:11Z</updated>
<author>
<name>Charles Keepax</name>
<email>ckeepax@opensource.cirrus.com</email>
</author>
<published>2025-02-17T14:01:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fd80df352ba1884ce2b62dd8d9495582308101b7'/>
<id>urn:sha1:fd80df352ba1884ce2b62dd8d9495582308101b7</id>
<content type='text'>
The defaults array in regcache must be sorted into ascending register
address order, because binary search is used to locate values in
the array. Add a helper to sort the register defaults array which
can be useful for systems that dynamically create a defaults array
based on external information.

Signed-off-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.dev&gt;
Link: https://patch.msgid.link/20250217140159.2288784-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: irq: Use one way of setting all bits in the register</title>
<updated>2025-02-06T20:46:09Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2025-02-06T19:16:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=153dbf4adad0082d030c30d20541df2b1af52db6'/>
<id>urn:sha1:153dbf4adad0082d030c30d20541df2b1af52db6</id>
<content type='text'>
Currently there are two ways of how we represent all bits set, i.e.
UINT_MAX and GENMASK(31, 0). Use the former as the single way of
doing that, which is crystal clear on how we fill the unsigned int
value.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://patch.msgid.link/20250206191644.1132869-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap-irq: Add missing kfree()</title>
<updated>2025-02-05T11:55:42Z</updated>
<author>
<name>Jiasheng Jiang</name>
<email>jiashengjiangcool@gmail.com</email>
</author>
<published>2025-02-05T00:43:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=32ffed055dcee17f6705f545b069e44a66067808'/>
<id>urn:sha1:32ffed055dcee17f6705f545b069e44a66067808</id>
<content type='text'>
Add kfree() for "d-&gt;main_status_buf" to the error-handling path to prevent
a memory leak.

Fixes: a2d21848d921 ("regmap: regmap-irq: Add main status register support")
Cc: stable@vger.kernel.org  # v5.1+
Signed-off-by: Jiasheng Jiang &lt;jiashengjiangcool@gmail.com&gt;
Link: https://patch.msgid.link/20250205004343.14413-1-jiashengjiangcool@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Reorder 'struct regmap'</title>
<updated>2025-02-03T00:38:32Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2025-01-24T13:37:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=995cf0e014b0144edf1125668a97c252c5ab775e'/>
<id>urn:sha1:995cf0e014b0144edf1125668a97c252c5ab775e</id>
<content type='text'>
On a x86_64, with configured with allmodconfig, pahole states that the
regmap structure is:

	/* size: 1048, cachelines: 17, members: 78 */
	/* sum members: 1006, holes: 9, sum holes: 35 */
	/* padding: 7 */
	/* member types with holes: 2, total: 2 */
	/* last cacheline: 24 bytes */

So, when such a struct is allocated, 2048 bytes are allocated, with most of
this space being wasted.

Move a few bools so that the size is reduced to 1024.

After this change, pahole gives:

	/* size: 1024, cachelines: 16, members: 78 */
	/* sum members: 1006, holes: 6, sum holes: 18 */
	/* member types with holes: 2, total: 2 */

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Link: https://patch.msgid.link/f01f900d15633d5cda5f27763723acb307c0d22f.1737725820.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
