2018-03-05 04:29:22

by Harish Jenny K N

[permalink] [raw]
Subject: [PATCH v2] mmc: Export host capabilities to debugfs.

From: Abbas Raza <[email protected]>

This patch exports the host capabilities to debugfs

Signed-off-by: Abbas Raza <[email protected]>
Signed-off-by: Andrew Gabbasov <[email protected]>
Signed-off-by: Harish Jenny K N <[email protected]>
---

Changes in v2:
- Changed Author

drivers/mmc/core/debugfs.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c
index c51e0c0..fa2df7f 100644
--- a/drivers/mmc/core/debugfs.c
+++ b/drivers/mmc/core/debugfs.c
@@ -289,6 +289,9 @@ void mmc_add_card_debugfs(struct mmc_card *card)

card->debugfs_root = root;

+ if (!debugfs_create_x32("host_caps", S_IRUSR, root, (u32 *)&host->caps))
+ goto err;
+
if (!debugfs_create_x32("state", S_IRUSR, root, &card->state))
goto err;

--
1.9.1



2018-03-05 07:54:30

by Shawn Lin

[permalink] [raw]
Subject: Re: [PATCH v2] mmc: Export host capabilities to debugfs.

On 2018/3/5 12:24, Harish Jenny K N wrote:
> From: Abbas Raza <[email protected]>
>
> This patch exports the host capabilities to debugfs
>
> Signed-off-by: Abbas Raza <[email protected]>
> Signed-off-by: Andrew Gabbasov <[email protected]>
> Signed-off-by: Harish Jenny K N <[email protected]>
> ---
>
> Changes in v2:
> - Changed Author
>
> drivers/mmc/core/debugfs.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c
> index c51e0c0..fa2df7f 100644
> --- a/drivers/mmc/core/debugfs.c
> +++ b/drivers/mmc/core/debugfs.c
> @@ -289,6 +289,9 @@ void mmc_add_card_debugfs(struct mmc_card *card)
>
> card->debugfs_root = root;
>
> + if (!debugfs_create_x32("host_caps", S_IRUSR, root, (u32 *)&host->caps))

Perhaps you don't need cast, and '&host->caps' should be fine?
And you don't need to export host->caps2?

> + goto err;
> +
> if (!debugfs_create_x32("state", S_IRUSR, root, &card->state))
> goto err;
>
>


2018-03-05 09:32:02

by Harish Jenny K N

[permalink] [raw]
Subject: Re: [PATCH v2] mmc: Export host capabilities to debugfs.



On Monday 05 March 2018 01:21 PM, Shawn Lin wrote:
> On 2018/3/5 12:24, Harish Jenny K N wrote:
>> From: Abbas Raza <[email protected]>
>>
>> This patch exports the host capabilities to debugfs
>>
>> Signed-off-by: Abbas Raza <[email protected]>
>> Signed-off-by: Andrew Gabbasov <[email protected]>
>> Signed-off-by: Harish Jenny K N <[email protected]>
>> ---
>>
>> Changes in v2:
>> - Changed Author
>>
>>   drivers/mmc/core/debugfs.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c
>> index c51e0c0..fa2df7f 100644
>> --- a/drivers/mmc/core/debugfs.c
>> +++ b/drivers/mmc/core/debugfs.c
>> @@ -289,6 +289,9 @@ void mmc_add_card_debugfs(struct mmc_card *card)
>>         card->debugfs_root = root;
>>   +    if (!debugfs_create_x32("host_caps", S_IRUSR, root, (u32 *)&host->caps))
>
> Perhaps you don't need cast, and '&host->caps' should be fine?

Yes. I will send updated patch.
> And you don't need to export host->caps2?

I will send this is as a separate patch, as this also requires changes in mmc-utils sample application to parse the value.


Thanks,
Harish Jenny K N