<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/regmap/regmap.c, branch v4.19</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=v4.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-08-09T10:00:15Z</updated>
<entry>
<title>regmap: Add regmap_noinc_read API</title>
<updated>2018-08-09T10:00:15Z</updated>
<author>
<name>Crestez Dan Leonard</name>
<email>leonard.crestez@intel.com</email>
</author>
<published>2018-08-07T14:52:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=74fe7b551f3385fa585d92616c85b3a575b2b2cb'/>
<id>urn:sha1:74fe7b551f3385fa585d92616c85b3a575b2b2cb</id>
<content type='text'>
The regmap API usually assumes that bulk read operations will read a
range of registers but some I2C/SPI devices have certain registers for
which a such a read operation will return data from an internal FIFO
instead. Add an explicit API to support bulk read without range semantics.

Some linux drivers use regmap_bulk_read or regmap_raw_read for such
registers, for example mpu6050 or bmi150 from IIO. This only happens to
work because when caching is disabled a single regmap read op will map
to a single bus read op (as desired). This breaks if caching is enabled and
reg+1 happens to be a cacheable register.

Without regmap support refactoring a driver to enable regmap caching
requires separate I2C and SPI paths. This is exactly what regmap is
supposed to help avoid.

Suggested-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Signed-off-by: Crestez Dan Leonard &lt;leonard.crestez@intel.com&gt;
Signed-off-by: Stefan Popa &lt;stefan.popa@analog.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branches 'regmap/topic/debugfs' and 'regmap/topic/mmio-clk' into regmap-next</title>
<updated>2018-03-12T16:50:42Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2018-03-12T16:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2889312616aecf1a1153be0fab19206a6b1f768f'/>
<id>urn:sha1:2889312616aecf1a1153be0fab19206a6b1f768f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'regmap/topic/bulk' into regmap-next</title>
<updated>2018-03-12T16:50:40Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2018-03-12T16:50:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=493ea0c8a6bdcdd014a5c586b91953960c7c9260'/>
<id>urn:sha1:493ea0c8a6bdcdd014a5c586b91953960c7c9260</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge remote-tracking branches 'regmap/fix/i2c' and 'regmap/fix/volatile' into regmap-linus</title>
<updated>2018-03-12T16:50:35Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2018-03-12T16:50:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f981c6cc14aa1c6cfd4154d2f93846bf83a4725a'/>
<id>urn:sha1:f981c6cc14aa1c6cfd4154d2f93846bf83a4725a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'regmap/fix/core' into regmap-linus</title>
<updated>2018-03-12T16:50:32Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2018-03-12T16:50:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aa584bada6c2114371a415d134f09fc376c8e07b'/>
<id>urn:sha1:aa584bada6c2114371a415d134f09fc376c8e07b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>regmap: Merge redundant handling in regmap_bulk_write</title>
<updated>2018-02-26T11:00:34Z</updated>
<author>
<name>Charles Keepax</name>
<email>ckeepax@opensource.cirrus.com</email>
</author>
<published>2018-02-22T12:59:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fb44f3cec35c6e71865012fa281ba6d4ff50a99a'/>
<id>urn:sha1:fb44f3cec35c6e71865012fa281ba6d4ff50a99a</id>
<content type='text'>
The handling for the first two cases in regmap_bulk_write is
essentially identical. The first case is just a better implementation of
the second, supporting 8 byte registers and doing the locking manually to
avoid bouncing the lock for each register. Drop some redundant code by
removing the second of these cases and allowing both situations to be
handled by the same code.

Signed-off-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Tidy up regmap_raw_write chunking code</title>
<updated>2018-02-26T11:00:33Z</updated>
<author>
<name>Charles Keepax</name>
<email>ckeepax@opensource.cirrus.com</email>
</author>
<published>2018-02-22T12:59:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=364e378b8d1679f91a29a9537a881bba17931cfb'/>
<id>urn:sha1:364e378b8d1679f91a29a9537a881bba17931cfb</id>
<content type='text'>
Raw writes may need to be split into small chunks if max_raw_write is
set. Tidy up the code implementing this, the new code is slightly
clearer, slightly shorter and slightly more efficient.

Signed-off-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Move the handling for max_raw_write into regmap_raw_write</title>
<updated>2018-02-26T11:00:32Z</updated>
<author>
<name>Charles Keepax</name>
<email>ckeepax@opensource.cirrus.com</email>
</author>
<published>2018-02-22T12:59:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7ef2c6b8689a084954cffbd102ee49c2fb72cbd4'/>
<id>urn:sha1:7ef2c6b8689a084954cffbd102ee49c2fb72cbd4</id>
<content type='text'>
Currently regmap_bulk_write will split a write into chunks before
calling regmap_raw_write if max_raw_write is set. It is more logical
for this handling to be inside regmap_raw_write itself, as this
removes the need to keep re-implementing the chunking code, which
would be the same for all users of regmap_raw_write.

Signed-off-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Remove unnecessary printk for failed allocation</title>
<updated>2018-02-26T11:00:31Z</updated>
<author>
<name>Charles Keepax</name>
<email>ckeepax@opensource.cirrus.com</email>
</author>
<published>2018-02-22T12:59:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b4ecfec5ee3f282a4ac0876de332876fec9b488c'/>
<id>urn:sha1:b4ecfec5ee3f282a4ac0876de332876fec9b488c</id>
<content type='text'>
Signed-off-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Format data for raw write in regmap_bulk_write</title>
<updated>2018-02-26T11:00:30Z</updated>
<author>
<name>Charles Keepax</name>
<email>ckeepax@opensource.cirrus.com</email>
</author>
<published>2018-02-22T12:59:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0812d8ffa9955251ba0077488d4408d8987ec091'/>
<id>urn:sha1:0812d8ffa9955251ba0077488d4408d8987ec091</id>
<content type='text'>
In the case were the bulk transaction is split up into smaller chunks
data is passed directly to regmap_raw_write. However regmap_bulk_write
uses data in host endian and regmap_raw_write expects data in device
endian. As such if the host and device differ in endian the wrong data
will be written to the device. Correct this issue using a similar
approach to the single raw write case below it, duplicate the data
into a new buffer and use parse_inplace to format the data correctly.

Fixes: adaac459759d ("regmap: Introduce max_raw_read/write for regmap_bulk_read/write")
Signed-off-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
