<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/mmc/core/debugfs.c, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-11-11T16:59:17+00:00</updated>
<entry>
<title>mmc: core: Allow more host caps to be modified through debugfs</title>
<updated>2025-11-11T16:59:17+00:00</updated>
<author>
<name>Shawn Lin</name>
<email>shawn.lin@rock-chips.com</email>
</author>
<published>2025-11-04T08:41:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5f87aaf5b62e30539dae41371f15730db549bc9b'/>
<id>urn:sha1:5f87aaf5b62e30539dae41371f15730db549bc9b</id>
<content type='text'>
This makes various signal and function tests more convenient
without the need to modify the DTB.

/sys/kernel/debug/mmc0# echo $(($(cat caps) | (1 &lt;&lt; 7))) &gt; caps
/sys/kernel/debug/mmc0# echo on &gt; /sys/bus/mmc/devices/mmc0\:0001/power/control
/sys/kernel/debug/mmc0# echo auto &gt; /sys/bus/mmc/devices/mmc0\:0001/power/control

// Disable 8-bit support
echo $(($(cat caps) &amp; ~(1 &lt;&lt; 6))) &gt; caps
// Enable 8-bit support
echo $(($(cat caps) | (1 &lt;&lt; 6))) &gt; caps
// Disable 4-bit support
echo $(($(cat caps) &amp; ~(1 &lt;&lt; 0))) &gt; caps
// Enable 4-bit support
echo $(($(cat caps) | (1 &lt;&lt; 0))) &gt; caps
// Disable CMD23 support
echo $(($(cat caps) &amp; ~(1 &lt;&lt; 30))) &gt; caps
// Enable CMD23 support
echo $(($(cat caps) | (1 &lt;&lt; 30))) &gt; caps
// Disable CMD23 support
echo $(($(cat caps) &amp; ~(1 &lt;&lt; 30))) &gt; caps
// Enable CMD23 support
echo $(($(cat caps) | (1 &lt;&lt; 30))) &gt; caps
// Disable CQE support
echo $(($(cat caps2) &amp; ~(1 &lt;&lt; 23))) &gt; caps2
// Enable CQE support
echo $(($(cat caps2) | (1 &lt;&lt; 23))) &gt; caps2
// Disable CQE DCMD support
echo $(($(cat caps2) &amp; ~(1 &lt;&lt; 24))) &gt; caps2
// Enable CQE DCMD support
echo $(($(cat caps2) | (1 &lt;&lt; 24))) &gt; caps2

/sys/kernel/debug/mmc0# echo on &gt; /sys/bus/mmc/devices/mmc0\:0001/power/control
/sys/kernel/debug/mmc0# cat ios

Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: debugfs: add card entry for quirks</title>
<updated>2024-04-02T10:25:08+00:00</updated>
<author>
<name>Rouven Czerwinski</name>
<email>r.czerwinski@pengutronix.de</email>
</author>
<published>2024-03-26T09:42:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a18a70389f03b4f7286ccda52c3e78bdf8b800a8'/>
<id>urn:sha1:a18a70389f03b4f7286ccda52c3e78bdf8b800a8</id>
<content type='text'>
This is useful to check if a quirk has been applied for the connected
mmc card.

Signed-off-by: Rouven Czerwinski &lt;r.czerwinski@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20240326094215.212930-2-r.czerwinski@pengutronix.de
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: debugfs: convert permissions to octal</title>
<updated>2024-04-02T10:25:08+00:00</updated>
<author>
<name>Rouven Czerwinski</name>
<email>r.czerwinski@pengutronix.de</email>
</author>
<published>2024-03-26T09:42:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a575e778b344eab33d39ec7213a884805b74d81d'/>
<id>urn:sha1:a575e778b344eab33d39ec7213a884805b74d81d</id>
<content type='text'>
Convert the existing symbolic permissions to the octal presentation as
this is the preferred representation for debugfs permissions.

Signed-off-by: Rouven Czerwinski &lt;r.czerwinski@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20240326094215.212930-1-r.czerwinski@pengutronix.de
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: debugfs: Allow host caps to be modified</title>
<updated>2023-10-10T11:44:49+00:00</updated>
<author>
<name>Vincent Whitchurch</name>
<email>vincent.whitchurch@axis.com</email>
</author>
<published>2023-09-29T07:45:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ff369d7b98426abf7bccb0722253f5d4490f3c17'/>
<id>urn:sha1:ff369d7b98426abf7bccb0722253f5d4490f3c17</id>
<content type='text'>
During board verification, there is a need to test the various supported
eMMC/SD speed modes.  However, since the framework chooses the best mode
supported by the card and the host controller's caps, this currently
necessitates changing the devicetree for every iteration.

Allow the various speed mode host capabilities to be modified via
debugfs in order to allow easier hardware verification.  The values to
be written are the raw MMC_CAP* values from include/linux/mmc/host.h.
This is rather low-level, and these defines are not guaranteed to be
stable, but it is perhaps good enough for the intended use case.

MMC_CAP_AGGRESSIVE_PM can also be set, in order to be able to
re-initialize the card without having to physically remove and re-insert
it.

 /sys/kernel/debug/mmc0# grep timing ios
 timing spec:	9 (mmc HS200)

 // Turn on MMC_CAP_AGGRESSIVE_PM and re-trigger runtime suspend
 /sys/kernel/debug/mmc0# echo $(($(cat caps) | (1 &lt;&lt; 7))) &gt; caps
 /sys/kernel/debug/mmc0# echo on &gt; /sys/bus/mmc/devices/mmc0\:0001/power/control
 /sys/kernel/debug/mmc0# echo auto &gt; /sys/bus/mmc/devices/mmc0\:0001/power/control

 // MMC_CAP2_HS200_1_8V_SDR
 /sys/kernel/debug/mmc0# echo $(($(cat caps2) &amp; ~(1 &lt;&lt; 5))) &gt; caps2
 /sys/kernel/debug/mmc0# echo on &gt; /sys/bus/mmc/devices/mmc0\:0001/power/control
 /sys/kernel/debug/mmc0# grep timing ios
 timing spec:	8 (mmc DDR52)

Signed-off-by: Vincent Whitchurch &lt;vincent.whitchurch@axis.com&gt;
Link: https://lore.kernel.org/r/20230929-mmc-caps-v2-2-11a4c2d94f15@axis.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: remove unnecessary (void*) conversions</title>
<updated>2023-04-03T12:36:12+00:00</updated>
<author>
<name>Yu Zhe</name>
<email>yuzhe@nfschina.com</email>
</author>
<published>2023-03-28T03:10:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5762451d647cda7aa12c2c001330802f03a161a9'/>
<id>urn:sha1:5762451d647cda7aa12c2c001330802f03a161a9</id>
<content type='text'>
Pointer variables of void * type do not require type cast.

Signed-off-by: Yu Zhe &lt;yuzhe@nfschina.com&gt;
Link: https://lore.kernel.org/r/20230328031049.22749-1-yuzhe@nfschina.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: debugfs: Fix file release memory leak</title>
<updated>2022-07-12T10:25:36+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2022-06-08T09:01:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ba1de43768aa27865169af00ee0c2a4a165690b6'/>
<id>urn:sha1:ba1de43768aa27865169af00ee0c2a4a165690b6</id>
<content type='text'>
When using single_open() for opening, single_release() should be
used instead of seq_release(), otherwise there is a memory leak.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Link: https://lore.kernel.org/r/20220608090152.179395-1-weiyongjun1@huawei.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: debugfs: Add debug fs error state entry for mmc driver</title>
<updated>2022-07-12T10:25:35+00:00</updated>
<author>
<name>Shaik Sajida Bhanu</name>
<email>quic_c_sbhanu@quicinc.com</email>
</author>
<published>2022-05-27T17:53:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fadf344e6d69a94efa17619120132516f56b582c'/>
<id>urn:sha1:fadf344e6d69a94efa17619120132516f56b582c</id>
<content type='text'>
Add debug fs entry error state to query eMMC and SD card errors statistics.
If any errors occurred in eMMC and SD card driver level then
err_state value will be set to 1.

Signed-off-by: Liangliang Lu &lt;quic_luliang@quicinc.com&gt;
Signed-off-by: Sayali Lokhande &lt;quic_sayalil@quicinc.com&gt;
Signed-off-by: Bao D. Nguyen &lt;quic_nguyenb@quicinc.com&gt;
Signed-off-by: Shaik Sajida Bhanu &lt;quic_c_sbhanu@quicinc.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Link: https://lore.kernel.org/r/1653674036-21829-5-git-send-email-quic_c_sbhanu@quicinc.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: debugfs: Add debug fs entry for mmc driver</title>
<updated>2022-07-12T10:25:34+00:00</updated>
<author>
<name>Shaik Sajida Bhanu</name>
<email>quic_c_sbhanu@quicinc.com</email>
</author>
<published>2022-05-27T17:53:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7ae20fa3552a619694c2894b09e19332fe0d007f'/>
<id>urn:sha1:7ae20fa3552a619694c2894b09e19332fe0d007f</id>
<content type='text'>
Add debug fs entry to query eMMC and SD card errors statistics

Signed-off-by: Liangliang Lu &lt;quic_luliang@quicinc.com&gt;
Signed-off-by: Sayali Lokhande &lt;quic_sayalil@quicinc.com&gt;
Signed-off-by: Bao D. Nguyen &lt;quic_nguyenb@quicinc.com&gt;
Signed-off-by: Shaik Sajida Bhanu &lt;quic_c_sbhanu@quicinc.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Link: https://lore.kernel.org/r/1653674036-21829-4-git-send-email-quic_c_sbhanu@quicinc.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: debugfs: add description for module parameter</title>
<updated>2021-06-14T11:57:43+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2021-06-04T10:44:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=039259156b3bbe62bff3492f007f0dd247013fa6'/>
<id>urn:sha1:039259156b3bbe62bff3492f007f0dd247013fa6</id>
<content type='text'>
Make it obvious what this is for.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Link: https://lore.kernel.org/r/20210604104459.7574-1-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: Use DEFINE_DEBUGFS_ATTRIBUTE instead of DEFINE_SIMPLE_ATTRIBUTE</title>
<updated>2020-05-28T09:21:01+00:00</updated>
<author>
<name>Zou Wei</name>
<email>zou_wei@huawei.com</email>
</author>
<published>2020-04-23T09:15:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=43170255321f83d8e8a3964f70040c49b3d19df0'/>
<id>urn:sha1:43170255321f83d8e8a3964f70040c49b3d19df0</id>
<content type='text'>
Fixes coccicheck warning:

drivers/mmc/core/debugfs.c:222:0-23: WARNING: mmc_clock_fops should be
defined with DEFINE_DEBUGFS_ATTRIBUTE

Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE
for debugfs files

Fixes: 703aae3d09a4b ("mmc: add a file to debugfs for changing host clock at runtime")
Fixes: a04c50aaa916f ("mmc: core: no need to check return value of debugfs_create functions")
Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Zou Wei &lt;zou_wei@huawei.com&gt;
Link: https://lore.kernel.org/r/1587633319-19835-1-git-send-email-zou_wei@huawei.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
</feed>
