Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
6284454c
Commit
6284454c
authored
Sep 18, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MMC] Export raw MMC card CID and CSD registers via device model.
parent
a7f2eef8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
drivers/mmc/mmc_sysfs.c
drivers/mmc/mmc_sysfs.c
+8
-2
No files found.
drivers/mmc/mmc_sysfs.c
View file @
6284454c
...
@@ -157,20 +157,26 @@ static ssize_t mmc_dev_show_##name (struct device *dev, char *buf) \
...
@@ -157,20 +157,26 @@ static ssize_t mmc_dev_show_##name (struct device *dev, char *buf) \
} \
} \
static DEVICE_ATTR(name, S_IRUGO, mmc_dev_show_##name, NULL)
static DEVICE_ATTR(name, S_IRUGO, mmc_dev_show_##name, NULL)
MMC_ATTR
(
cid
,
"%08x%08x%08x%08x
\n
"
,
card
->
raw_cid
[
0
],
card
->
raw_cid
[
1
],
card
->
raw_cid
[
2
],
card
->
raw_cid
[
3
]);
MMC_ATTR
(
csd
,
"%08x%08x%08x%08x
\n
"
,
card
->
raw_csd
[
0
],
card
->
raw_csd
[
1
],
card
->
raw_csd
[
2
],
card
->
raw_csd
[
3
]);
MMC_ATTR
(
date
,
"%02d/%04d
\n
"
,
card
->
cid
.
month
,
1997
+
card
->
cid
.
year
);
MMC_ATTR
(
date
,
"%02d/%04d
\n
"
,
card
->
cid
.
month
,
1997
+
card
->
cid
.
year
);
MMC_ATTR
(
fwrev
,
"0x%x
\n
"
,
card
->
cid
.
fwrev
);
MMC_ATTR
(
fwrev
,
"0x%x
\n
"
,
card
->
cid
.
fwrev
);
MMC_ATTR
(
hwrev
,
"0x%x
\n
"
,
card
->
cid
.
hwrev
);
MMC_ATTR
(
hwrev
,
"0x%x
\n
"
,
card
->
cid
.
hwrev
);
MMC_ATTR
(
manfid
,
"0x%03x
\n
"
,
card
->
cid
.
manfid
);
MMC_ATTR
(
manfid
,
"0x%03x
\n
"
,
card
->
cid
.
manfid
);
MMC_ATTR
(
serial
,
"0x%06x
\n
"
,
card
->
cid
.
serial
);
MMC_ATTR
(
name
,
"%s
\n
"
,
card
->
cid
.
prod_name
);
MMC_ATTR
(
name
,
"%s
\n
"
,
card
->
cid
.
prod_name
);
MMC_ATTR
(
serial
,
"0x%06x
\n
"
,
card
->
cid
.
serial
);
static
struct
device_attribute
*
mmc_dev_attributes
[]
=
{
static
struct
device_attribute
*
mmc_dev_attributes
[]
=
{
&
dev_attr_cid
,
&
dev_attr_csd
,
&
dev_attr_date
,
&
dev_attr_date
,
&
dev_attr_fwrev
,
&
dev_attr_fwrev
,
&
dev_attr_hwrev
,
&
dev_attr_hwrev
,
&
dev_attr_manfid
,
&
dev_attr_manfid
,
&
dev_attr_serial
,
&
dev_attr_name
,
&
dev_attr_name
,
&
dev_attr_serial
,
};
};
/*
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment