mmc: core: export emmc revision
PATCH v3 1/1 mmc: core: export emmc revision
From: Jin Qian <[email protected]>
Expose emmc revision as part of device attributes.
Signed-off-by Jin Qian <[email protected]>
--- Documentation/ABI/testing/sysfs-bus-mmc | 4 ++++ drivers/mmc/core/mmc.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-mmc
Documentation/ABI/testing/sysfs-bus-mmc new file +4 -0
@@ -0,0 +1,4 @@ +What: /sys/bus/mmc/devices/.../rev +Date: October 2017 +Contact: Jin Qian <[email protected]> +Description: Extended CSD revision number
drivers/mmc/core/mmc.c +2 -0
@@ -780,6 +780,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,
@@ -838,6 +839,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,
Signature · 1 line
2.15.0.rc0.271.g36b669edcc-goog
Quoted 6 lines · On Thu, 12 Oct 2017 10:46:59 -0700 Jin Qian wrote:
From: Jin Qian <[email protected]>
Expose emmc revision as part of device attributes.
Signed-off-by Jin Qian <[email protected]>---
A trivial point: when you send newer version, could you add change log so that it's clearly expressed what's updated/addressed.
Quoted 35 lines
Documentation/ABI/testing/sysfs-bus-mmc | 4 ++++ drivers/mmc/core/mmc.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-mmcDocumentation/ABI/testing/sysfs-bus-mmc new file +4
-0@@ -0,0 +1,4 @@ +What: /sys/bus/mmc/devices/.../rev +Date: October 2017 +Contact: Jin Qian <[email protected]> +Description: Extended CSD revision numberdrivers/mmc/core/mmc.c +2
-0@@ -780,6 +780,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,@@ -838,6 +839,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,
Quoted 5 lines · Jin Qian
From: Jin Qian <[email protected]>
Expose emmc revision as part of device attributes.
Signed-off-by Jin Qian <[email protected]>
(...)
Quoted 1 line
+MMC_DEV_ATTR(rev, "0x%x\n",
card->ext_csd.rev);
This will be 0x0000 on ordinary MMC cards right?
Have you tested it?
Yours,
Linus Walleij
Ulf Hansson
AppliedQuoted 5 lines · Jin Qian
From: Jin Qian <[email protected]>
Expose emmc revision as part of device attributes.
Signed-off-by Jin Qian <[email protected]>
Thanks, applied for next!
Kind regards
Uffe
Quoted 39 lines
--- Documentation/ABI/testing/sysfs-bus-mmc | 4 ++++ drivers/mmc/core/mmc.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-mmcDocumentation/ABI/testing/sysfs-bus-mmc new file +4
-0@@ -0,0 +1,4 @@ +What: /sys/bus/mmc/devices/.../rev +Date: October 2017 +Contact: Jin Qian <[email protected]> +Description: Extended CSD revision numberdrivers/mmc/core/mmc.c +2
-1@@ -780,6 +780,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,@@ -838,6 +839,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.15.0.rc0.271.g36b669edcc-goog