<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/base/regmap/regmap.c, branch linux-5.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-10-01T15:36:30Z</updated>
<entry>
<title>regmap: fix page selection for noinc writes</title>
<updated>2020-10-01T15:36:30Z</updated>
<author>
<name>Dmitry Baryshkov</name>
</author>
<published>2020-09-17T15:34:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=93e864762dcb718892803f67f824b2646403a436'/>
<id>urn:sha1:93e864762dcb718892803f67f824b2646403a436</id>
<content type='text'>
[ Upstream commit 05669b63170771d554854c0e465b76dc98fc7c84 ]

Non-incrementing writes can fail if register + length crosses page
border. However for non-incrementing writes we should not check for page
border crossing. Fix this by passing additional flag to _regmap_raw_write
and passing length to _regmap_select_page basing on the flag.

Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Fixes: cdf6b11daa77 ("regmap: Add regmap_noinc_write API")
Link: https://lore.kernel.org/r/20200917153405.3139200-2-dmitry.baryshkov@linaro.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: fix page selection for noinc reads</title>
<updated>2020-10-01T15:36:30Z</updated>
<author>
<name>Dmitry Baryshkov</name>
</author>
<published>2020-09-17T15:34:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de74a520081f1bab78ae7e017d59ea30078bc630'/>
<id>urn:sha1:de74a520081f1bab78ae7e017d59ea30078bc630</id>
<content type='text'>
[ Upstream commit 4003324856311faebb46cbd56a1616bd3f3b67c2 ]

Non-incrementing reads can fail if register + length crosses page
border. However for non-incrementing reads we should not check for page
border crossing. Fix this by passing additional flag to _regmap_raw_read
and passing length to _regmap_select_page basing on the flag.

Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Fixes: 74fe7b551f33 ("regmap: Add regmap_noinc_read API")
Link: https://lore.kernel.org/r/20200917153405.3139200-1-dmitry.baryshkov@linaro.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: dev_get_regmap_match(): fix string comparison</title>
<updated>2020-07-03T14:02:46Z</updated>
<author>
<name>Marc Kleine-Budde</name>
</author>
<published>2020-07-03T10:33:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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>
</author>
<published>2020-06-17T15:21:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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>
</author>
<published>2020-06-07T09:34:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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>
</author>
<published>2020-05-31T09:53:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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>
</author>
<published>2020-05-29T13:00:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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>
</author>
<published>2020-05-28T15:45:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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>
</author>
<published>2020-04-13T06:13:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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>
</author>
<published>2020-01-18T20:56:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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>
</feed>
