* [PATCHv2 1/1] mmc: core: export emmc revision via sysfs
@ 2017-03-23 0:18 Jin Qian
2017-03-23 9:03 ` Ulf Hansson
0 siblings, 1 reply; 3+ messages in thread
From: Jin Qian @ 2017-03-23 0:18 UTC (permalink / raw)
To: Ulf Hansson, Shawn Lin, Adrian Hunter, Jaehoon Chung,
Linus Walleij, Masahiro Yamada, Uri Yanai, Chaotian Jing,
Pratibhasagar V, Gwendal Grignou, Dong Aisheng, linux-mmc,
linux-kernel
Cc: Jin Qian
Extend sysfs to access ext_csd revision information.
Signed-off-by: Jin Qian <jinqian@android.com>
---
drivers/mmc/core/mmc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 7fd722868875..08c62c9bec48 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -779,6 +779,7 @@ MMC_DEV_ATTR(manfid, "0x%06x\n", card->cid.manfid);
MMC_DEV_ATTR(name, "%s\n", card->cid.prod_name);
MMC_DEV_ATTR(oemid, "0x%04x\n", card->cid.oemid);
MMC_DEV_ATTR(prv, "0x%x\n", card->cid.prv);
+MMC_DEV_ATTR(rev, "0x%x\n", card->ext_csd.rev);
MMC_DEV_ATTR(pre_eol_info, "%02x\n", card->ext_csd.pre_eol_info);
MMC_DEV_ATTR(life_time, "0x%02x 0x%02x\n",
card->ext_csd.device_life_time_est_typ_a,
@@ -836,6 +837,7 @@ static struct attribute *mmc_std_attrs[] = {
&dev_attr_name.attr,
&dev_attr_oemid.attr,
&dev_attr_prv.attr,
+ &dev_attr_rev.attr,
&dev_attr_pre_eol_info.attr,
&dev_attr_life_time.attr,
&dev_attr_serial.attr,
--
2.12.1.500.gab5fba24ee-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCHv2 1/1] mmc: core: export emmc revision via sysfs
2017-03-23 0:18 [PATCHv2 1/1] mmc: core: export emmc revision via sysfs Jin Qian
@ 2017-03-23 9:03 ` Ulf Hansson
2017-03-24 0:59 ` Kyungmin Park
0 siblings, 1 reply; 3+ messages in thread
From: Ulf Hansson @ 2017-03-23 9:03 UTC (permalink / raw)
To: Jin Qian
Cc: Shawn Lin, Adrian Hunter, Jaehoon Chung, Linus Walleij,
Masahiro Yamada, Uri Yanai, Chaotian Jing, Pratibhasagar V,
Gwendal Grignou, Dong Aisheng, linux-mmc@vger.kernel.org,
linux-kernel@vger.kernel.org
On 23 March 2017 at 01:18, Jin Qian <jinqian@android.com> wrote:
> Extend sysfs to access ext_csd revision information.
>
> Signed-off-by: Jin Qian <jinqian@android.com>
> ---
> drivers/mmc/core/mmc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 7fd722868875..08c62c9bec48 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -779,6 +779,7 @@ MMC_DEV_ATTR(manfid, "0x%06x\n", card->cid.manfid);
> MMC_DEV_ATTR(name, "%s\n", card->cid.prod_name);
> MMC_DEV_ATTR(oemid, "0x%04x\n", card->cid.oemid);
> MMC_DEV_ATTR(prv, "0x%x\n", card->cid.prv);
> +MMC_DEV_ATTR(rev, "0x%x\n", card->ext_csd.rev);
We have "product revision" in CID, we have "CSD structure/spec
version" in CSD and some other related in EXT_CSD.
To make it clear what "rev" is about, I suggest we follow Jaehoon
suggestions. Let's name it "ext_csd_rev".
> MMC_DEV_ATTR(pre_eol_info, "%02x\n", card->ext_csd.pre_eol_info);
> MMC_DEV_ATTR(life_time, "0x%02x 0x%02x\n",
> card->ext_csd.device_life_time_est_typ_a,
> @@ -836,6 +837,7 @@ static struct attribute *mmc_std_attrs[] = {
> &dev_attr_name.attr,
> &dev_attr_oemid.attr,
> &dev_attr_prv.attr,
> + &dev_attr_rev.attr,
> &dev_attr_pre_eol_info.attr,
> &dev_attr_life_time.attr,
> &dev_attr_serial.attr,
> --
> 2.12.1.500.gab5fba24ee-goog
>
Kind regards
Uffe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCHv2 1/1] mmc: core: export emmc revision via sysfs
2017-03-23 9:03 ` Ulf Hansson
@ 2017-03-24 0:59 ` Kyungmin Park
0 siblings, 0 replies; 3+ messages in thread
From: Kyungmin Park @ 2017-03-24 0:59 UTC (permalink / raw)
To: Ulf Hansson
Cc: Jin Qian, Shawn Lin, Adrian Hunter, Jaehoon Chung, Linus Walleij,
Masahiro Yamada, Uri Yanai, Chaotian Jing, Pratibhasagar V,
Gwendal Grignou, Dong Aisheng, linux-mmc@vger.kernel.org,
linux-kernel@vger.kernel.org
On Thu, Mar 23, 2017 at 6:03 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> On 23 March 2017 at 01:18, Jin Qian <jinqian@android.com> wrote:
>> Extend sysfs to access ext_csd revision information.
it can be used secure erase feature for each revision. so it's helpful
to support at sysfs node.
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
>>
>> Signed-off-by: Jin Qian <jinqian@android.com>
>> ---
>> drivers/mmc/core/mmc.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
>> index 7fd722868875..08c62c9bec48 100644
>> --- a/drivers/mmc/core/mmc.c
>> +++ b/drivers/mmc/core/mmc.c
>> @@ -779,6 +779,7 @@ MMC_DEV_ATTR(manfid, "0x%06x\n", card->cid.manfid);
>> MMC_DEV_ATTR(name, "%s\n", card->cid.prod_name);
>> MMC_DEV_ATTR(oemid, "0x%04x\n", card->cid.oemid);
>> MMC_DEV_ATTR(prv, "0x%x\n", card->cid.prv);
>> +MMC_DEV_ATTR(rev, "0x%x\n", card->ext_csd.rev);
>
> We have "product revision" in CID, we have "CSD structure/spec
> version" in CSD and some other related in EXT_CSD.
>
> To make it clear what "rev" is about, I suggest we follow Jaehoon
> suggestions. Let's name it "ext_csd_rev".
>
>> MMC_DEV_ATTR(pre_eol_info, "%02x\n", card->ext_csd.pre_eol_info);
>> MMC_DEV_ATTR(life_time, "0x%02x 0x%02x\n",
>> card->ext_csd.device_life_time_est_typ_a,
>> @@ -836,6 +837,7 @@ static struct attribute *mmc_std_attrs[] = {
>> &dev_attr_name.attr,
>> &dev_attr_oemid.attr,
>> &dev_attr_prv.attr,
>> + &dev_attr_rev.attr,
>> &dev_attr_pre_eol_info.attr,
>> &dev_attr_life_time.attr,
>> &dev_attr_serial.attr,
>> --
>> 2.12.1.500.gab5fba24ee-goog
>>
>
> Kind regards
> Uffe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-24 0:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-23 0:18 [PATCHv2 1/1] mmc: core: export emmc revision via sysfs Jin Qian
2017-03-23 9:03 ` Ulf Hansson
2017-03-24 0:59 ` Kyungmin Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox