<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/base/regmap/regmap-debugfs.c, branch v4.19.7</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.19.7</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.19.7'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-03-06T14:49:28Z</updated>
<entry>
<title>regmap: debugfs: Improve warning message on debugfs_create_dir() failure</title>
<updated>2018-03-06T14:49:28Z</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@nxp.com</email>
</author>
<published>2018-03-06T02:13:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=59dd2a85040103e95b1c87b1b920d357ee91dada'/>
<id>urn:sha1:59dd2a85040103e95b1c87b1b920d357ee91dada</id>
<content type='text'>
Currently when debugfs_create_dir() fails we receive a warning message
that provides no indication as to what was the directory entry that
failed to be created.

Improve the warning message by printing the directory name that failed
in order to help debugging.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: debugfs: Free map-&gt;debugfs_name when debugfs_create_dir() failed</title>
<updated>2018-03-06T14:20:50Z</updated>
<author>
<name>Jeffy Chen</name>
<email>jeffy.chen@rock-chips.com</email>
</author>
<published>2018-03-06T11:04:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=17cf46cfe975f1dd04db6bd38398923846512d49'/>
<id>urn:sha1:17cf46cfe975f1dd04db6bd38398923846512d49</id>
<content type='text'>
Free map-&gt;debugfs_name when debugfs_create_dir() failed to avoid memory
leak.

Signed-off-by: Jeffy Chen &lt;jeffy.chen@rock-chips.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: debugfs: Don't leak dummy names</title>
<updated>2018-03-05T20:26:51Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2018-03-05T20:26:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=46589e9c753b7c905e8671a89cbb9728f3b99855'/>
<id>urn:sha1:46589e9c753b7c905e8671a89cbb9728f3b99855</id>
<content type='text'>
When allocating dummy names we need to store a pointer to the string we
allocate so that we don't leak it on free.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: debugfs: Disambiguate dummy debugfs file name</title>
<updated>2018-03-05T19:23:26Z</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@nxp.com</email>
</author>
<published>2018-03-05T18:52:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a430ab205d29e7d1537b220fcf989b8080d8267f'/>
<id>urn:sha1:a430ab205d29e7d1537b220fcf989b8080d8267f</id>
<content type='text'>
Since commit 9b947a13e7f6 ("regmap: use debugfs even when no device")
allows the usage of regmap debugfs even when there is no device
associated, which causes several warnings like this:

(NULL device *): Failed to create debugfs directory

This happens when the debugfs file name is 'dummy'.

The first dummy debugfs creation works fine, but subsequent creations
fail as they have all the same name.

Disambiguate the 'dummy' debugfs file name by adding a suffix entry,
so that the names become dummy0, dummy1, dummy2, etc.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Allow missing device in regmap_name_read_file()</title>
<updated>2018-02-20T12:07:43Z</updated>
<author>
<name>David Lechner</name>
<email>david@lechnology.com</email>
</author>
<published>2018-02-19T21:43:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=12ae3808c160b7be0de3c633ac4cbe8c5f2937bf'/>
<id>urn:sha1:12ae3808c160b7be0de3c633ac4cbe8c5f2937bf</id>
<content type='text'>
This fixes a possible NULL pointer dereference oops in
regmap_name_read_file() when the regmap does not have a device
associated with it. For example syscon regmaps retrieved with
syscon_regmap_lookup_by_compatible() don't have a device.

Signed-off-by: David Lechner &lt;david@lechnology.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: debugfs: document why we don't create the debugfs entries</title>
<updated>2017-12-27T10:33:24Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>brgl@bgdev.pl</email>
</author>
<published>2017-12-22T17:42:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=078711d7f88d33b0adebb402a1bcb2aa89afe68b'/>
<id>urn:sha1:078711d7f88d33b0adebb402a1bcb2aa89afe68b</id>
<content type='text'>
This is a follow-up to commit a5ba91c380b8 ("regmap: debugfs: emit a
debug message when locking is disabled"). I figured that a user may
see this message, grep the code, come to this place and he still won't
know why we actually disabled debugfs.

Add a comment explaining the reason.

Signed-off-by: Bartosz Golaszewski &lt;brgl@bgdev.pl&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: debugfs: emit a debug message when locking is disabled</title>
<updated>2017-12-21T12:27:25Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>brgl@bgdev.pl</email>
</author>
<published>2017-12-21T11:12:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a5ba91c380b8bcca21e6166fc71c5e5ac9f0db68'/>
<id>urn:sha1:a5ba91c380b8bcca21e6166fc71c5e5ac9f0db68</id>
<content type='text'>
We currently silently omit creating the debugfs entries when regmap
locking is disabled. Users may not be aware of the reason for which
regmap files don't show up in debugfs. Add a dev_dbg() message
explaining that.

Signed-off-by: Bartosz Golaszewski &lt;brgl@bgdev.pl&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Disable debugfs when locking is disabled</title>
<updated>2017-12-13T16:22:31Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2017-12-12T16:56:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=72465736adf2aade263a9475a1d42007fd49e703'/>
<id>urn:sha1:72465736adf2aade263a9475a1d42007fd49e703</id>
<content type='text'>
The recently added support for disabling the regmap internal locking left
debugfs enabled for devices with the locking disabled. This is a problem
since debugfs allows userspace to do things like initiate reads from the
hardware which will use the scratch buffers protected by the regmap locking
so could cause data corruption.

For safety address this by just disabling debugfs for these devices. That
is overly conservative since some of the debugfs files just read internal
data structures but it's much simpler to implmement and less likely to
lead to problems with tooling that works with debugfs.

Reported-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: debugfs: Add support for dumping write only device registers</title>
<updated>2016-08-09T12:43:33Z</updated>
<author>
<name>Cristian Birsan</name>
<email>cristian.birsan@microchip.com</email>
</author>
<published>2016-08-08T15:44:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=359a2f17604e2c1c8938be2bba32a8cef9cf6303'/>
<id>urn:sha1:359a2f17604e2c1c8938be2bba32a8cef9cf6303</id>
<content type='text'>
Add support for dumping write only device registers in debugfs. This is
useful for audio codecs that have write only registers (like WM8731).
The logic that decides if a value can be printed is moved to
regmap_printable() function to allow for easier future updates.

Signed-off-by: Cristian Birsan &lt;cristian.birsan@microchip.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: debugfs: Use seq_file for the access map</title>
<updated>2016-01-05T18:32:22Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2015-10-20T14:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8da61f24cc4a4a66ecae69aa9b9aa8fd989a8969'/>
<id>urn:sha1:8da61f24cc4a4a66ecae69aa9b9aa8fd989a8969</id>
<content type='text'>
Unlike the registers file we don't have any substantial performance
concerns rendering the entire file (it involves no device accesses) so
just use seq_printf() to simplify the code.

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