Skip to contentSkip to conversation

mmc: sd: Extend sysfs with OCR register

PATCH In review Bojan Prtvar 2 participants 2 messages Jul 13, 2016 – Jul 18, 2016 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: sd: Extend sysfs with OCR register

We already exported OCR for mmc cards. Let's export it for sd cards as well.

---
 drivers/mmc/core/sd.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mmc/core/sd.c +2 -0
index b95bd24..3dd0861 100644
@@ -675,6 +675,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(serial, "0x%08x\n", card->cid.serial);
+MMC_DEV_ATTR(ocr, "%08x\n", card->ocr);
 
 
 static struct attribute *sd_std_attrs[] = {
@@ -690,6 +691,7 @@ static struct attribute *sd_std_attrs[] = {
 	&dev_attr_name.attr,
 	&dev_attr_oemid.attr,
 	&dev_attr_serial.attr,
+	&dev_attr_ocr.attr,
 	NULL,
 };
 ATTRIBUTE_GROUPS(sd_std);
Signature · 1 line
2.8.0.GIT
#1 lore raw
Quoted 4 lines · Bojan Prtvar

We already exported OCR for mmc cards. Let's export it for sd cards as well.

I decided to squash this change into the earlier applied: "mmc: core:
Extend sysfs with OCR register".

Thanks and kind regards
Uffe

Quoted 27 lines
---
 drivers/mmc/core/sd.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mmc/core/sd.c +2 -1
index b95bd24..3dd0861 100644
@@ -675,6 +675,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(serial, "0x%08x\n", card->cid.serial);
+MMC_DEV_ATTR(ocr, "%08x\n", card->ocr);
 
 
 static struct attribute *sd_std_attrs[] = {
@@ -690,6 +691,7 @@ static struct attribute *sd_std_attrs[] = {
        &dev_attr_name.attr,
        &dev_attr_oemid.attr,
        &dev_attr_serial.attr,
+       &dev_attr_ocr.attr,
        NULL,
 };
 ATTRIBUTE_GROUPS(sd_std);
--

2.8.0.GIT