<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/regmap/regmap.c, branch v5.8</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=v5.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-07-03T14:02:46Z</updated>
<entry>
<title>regmap: dev_get_regmap_match(): fix string comparison</title>
<updated>2020-07-03T14:02:46Z</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2020-07-03T10:33:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e84861fec32dee8a2e62bbaa52cded6b05a2a456'/>
<id>urn:sha1:e84861fec32dee8a2e62bbaa52cded6b05a2a456</id>
<content type='text'>
This function is used by dev_get_regmap() to retrieve a regmap for the
specified device. If the device has more than one regmap, the name parameter
can be used to specify one.

The code here uses a pointer comparison to check for equal strings. This
however will probably always fail, as the regmap-&gt;name is allocated via
kstrdup_const() from the regmap's config-&gt;name.

Fix this by using strcmp() instead.

Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20200703103315.267996-1-mkl@pengutronix.de
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Fix memory leak from regmap_register_patch</title>
<updated>2020-06-17T16:12:11Z</updated>
<author>
<name>Charles Keepax</name>
<email>ckeepax@opensource.cirrus.com</email>
</author>
<published>2020-06-17T15:21:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=95b2c3ec4cb1689db2389c251d39f64490ba641c'/>
<id>urn:sha1:95b2c3ec4cb1689db2389c251d39f64490ba641c</id>
<content type='text'>
When a register patch is registered the reg_sequence is copied but the
memory allocated is never freed. Add a kfree in regmap_exit to clean it
up.

Fixes: 22f0d90a3482 ("regmap: Support register patch sets")
Signed-off-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Link: https://lore.kernel.org/r/20200617152129.19655-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: fix the kerneldoc for regmap_test_bits()</title>
<updated>2020-06-08T12:21:07Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2020-06-07T09:34:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e680a4098f6404191e0e438a9758715b0bff6d7f'/>
<id>urn:sha1:e680a4098f6404191e0e438a9758715b0bff6d7f</id>
<content type='text'>
The kerneldoc comment for regmap_test_bits() says that it returns -1 on
regmap_read() failure. This is not true - it will propagate the error
code returned by regmap_read(). Fix it.

Fixes: aa2ff9dbaedd ("regmap: provide helpers for simple bit operations")
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Link: https://lore.kernel.org/r/20200607093421.22209-1-brgl@bgdev.pl
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: fix alignment issue</title>
<updated>2020-06-01T11:31:36Z</updated>
<author>
<name>Jens Thoms Toerring</name>
<email>jt@toerring.de</email>
</author>
<published>2020-05-31T09:53:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=53d860952c8215cf9ae1ea33409c8cb71ad6ad3d'/>
<id>urn:sha1:53d860952c8215cf9ae1ea33409c8cb71ad6ad3d</id>
<content type='text'>
The assembly and disassembly of data to be sent to or received from
a device invoke functions regmap_format_XX() and regmap_parse_XX()
that extract or insert data items from or into a buffer, using
assignments. In some cases the functions are called with a buffer
pointer with an odd address. On architectures with strict alignment
requirements this can result in a kernel crash. The assignments
have been replaced by functions that take alignment into account.

Signed-off-by: Jens Thoms Toerring &lt;jt@toerring.de&gt;
Link: https://lore.kernel.org/r/20200531095300.GA27570@toerring.de
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge series "regmap: provide simple bitops and use them in a driver" from Bartosz Golaszewski &lt;brgl@bgdev.pl&gt;</title>
<updated>2020-05-29T13:00:44Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2020-05-29T13:00:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=93b929922dba3a42b0439ef13144c6032b7733c8'/>
<id>urn:sha1:93b929922dba3a42b0439ef13144c6032b7733c8</id>
<content type='text'>
Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;:

From: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;

I noticed that oftentimes I use regmap_update_bits() for simple bit
setting or clearing. In this case the fourth argument is superfluous as
it's always 0 or equal to the mask argument.

This series proposes to add simple bit operations for setting, clearing
and testing specific bits with regmap.

The second patch uses all three in a driver that got recently picked into
the net-next tree.

The patches obviously target different trees so - if you're ok with
the change itself - I propose you pick the first one into your regmap
tree for v5.8 and then I'll resend the second patch to add the first
user for these macros for v5.9.

v1 -&gt; v2:
- convert the new macros to static inline functions

v2 -&gt; v3:
- drop unneeded ternary operator

Bartosz Golaszewski (2):
  regmap: provide helpers for simple bit operations
  net: ethernet: mtk-star-emac: use regmap bitops

 drivers/base/regmap/regmap.c                  | 22 +++++
 drivers/net/ethernet/mediatek/mtk_star_emac.c | 80 ++++++++-----------
 include/linux/regmap.h                        | 36 +++++++++
 3 files changed, 93 insertions(+), 45 deletions(-)

base-commit: 8f3d9f354286745c751374f5f1fcafee6b3f3136

--
2.26.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
</content>
</entry>
<entry>
<title>regmap: provide helpers for simple bit operations</title>
<updated>2020-05-29T13:00:42Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2020-05-28T15:45:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aa2ff9dbaeddabb5ad166db5f9f1a0580a8bbba8'/>
<id>urn:sha1:aa2ff9dbaeddabb5ad166db5f9f1a0580a8bbba8</id>
<content type='text'>
In many instances regmap_update_bits() is used for simple bit setting
and clearing. In these cases the last argument is redundant and we can
hide it with a static inline function.

This adds three new helpers for simple bit operations: set_bits,
clear_bits and test_bits (the last one defined as a regular function).

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Link: https://lore.kernel.org/r/20200528154503.26304-2-brgl@bgdev.pl
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Add bus reg_update_bits() support</title>
<updated>2020-04-14T15:05:35Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang7@gmail.com</email>
</author>
<published>2020-04-13T06:13:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=80215f133d59310fdfce5ee4398aeb7076c2e99f'/>
<id>urn:sha1:80215f133d59310fdfce5ee4398aeb7076c2e99f</id>
<content type='text'>
Add reg_update_bits() support in case some platforms use a special method
to update bits of registers.

Signed-off-by: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Link: https://lore.kernel.org/r/df32fd0529957d1e7e26ba1465723f16cfbe92c8.1586757922.git.baolin.wang7@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: fix writes to non incrementing registers</title>
<updated>2020-01-21T17:16:26Z</updated>
<author>
<name>Ben Whitten</name>
<email>ben.whitten@gmail.com</email>
</author>
<published>2020-01-18T20:56:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2e31aab08bad0d4ee3d3d890a7b74cb6293e0a41'/>
<id>urn:sha1:2e31aab08bad0d4ee3d3d890a7b74cb6293e0a41</id>
<content type='text'>
When checking if a register block is writable we must ensure that the
block does not start with or contain a non incrementing register.

Fixes: 8b9f9d4dc511 ("regmap: verify if register is writeable before writing operations")
Signed-off-by: Ben Whitten &lt;ben.whitten@gmail.com&gt;
Link: https://lore.kernel.org/r/20200118205625.14532-1-ben.whitten@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: fix bulk writes on paged registers</title>
<updated>2019-06-12T12:56:06Z</updated>
<author>
<name>Srinivas Kandagatla</name>
<email>srinivas.kandagatla@linaro.org</email>
</author>
<published>2019-06-12T11:03:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=db057679de3e9e6a03c1bcd5aee09b0d25fd9f5b'/>
<id>urn:sha1:db057679de3e9e6a03c1bcd5aee09b0d25fd9f5b</id>
<content type='text'>
On buses like SlimBus and SoundWire which does not support
gather_writes yet in regmap, A bulk write on paged register
would be silently ignored after programming page.
This is because local variable 'ret' value in regmap_raw_write_impl()
gets reset to 0 once page register is written successfully and the
code below checks for 'ret' value to be -ENOTSUPP before linearising
the write buffer to send to bus-&gt;write().

Fix this by resetting the 'ret' value to -ENOTSUPP in cases where
gather_writes() is not supported or single register write is
not possible.

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: add proper SPDX identifiers on files that did not have them.</title>
<updated>2019-04-25T19:22:15Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-04-25T18:06:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37613fa5b762a73073de3c2e23baa4a1da337e71'/>
<id>urn:sha1:37613fa5b762a73073de3c2e23baa4a1da337e71</id>
<content type='text'>
There were a few files in the regmap code that did not have SPDX
identifiers on them, so fix that up.  At the same time, remove the "free
form" text that specified the license of the file, as that is impossible
for any tool to properly parse.

Also, as Mark loves // comment markers, convert all of the headers to be
the same to make things look consistent :)

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
