Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC DEL 1ns 4cha - Software
Commits
d52abcd9
Commit
d52abcd9
authored
Apr 17, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fd-core: change init and rename the init macro
parent
3b08ccca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
10 deletions
+25
-10
fd-core.c
fd-core.c
+25
-10
No files found.
fd-core.c
View file @
d52abcd9
...
...
@@ -47,7 +47,19 @@ static void fd_do_reset(struct spec_fd *fd, int hw_reset)
udelay
(
1000
);
}
/* Some init procedures to be intermixed with subsystems */
int
fd_gpio_defaults
(
struct
spec_fd
*
fd
)
{
/* FIXME */
return
0
;
}
int
fd_reset_again
(
struct
spec_fd
*
fd
)
{
/* FIXME */
return
0
;
}
/* This structure lists the various subsystems */
struct
modlist
{
...
...
@@ -57,17 +69,19 @@ struct modlist {
};
#define
M
(x) { #x, fd_ ## x ## _init, fd_ ## x ## _exit }
#define
SUBSYS
(x) { #x, fd_ ## x ## _init, fd_ ## x ## _exit }
static
struct
modlist
mods
[]
=
{
M
(
spi
),
M
(
gpio
),
M
(
pll
),
//M(w1),
//M(i2c),
//M(acam),
//M(zio),
SUBSYS
(
spi
),
SUBSYS
(
gpio
),
SUBSYS
(
pll
),
//SUBSYS(w1),
{
"gpio-default"
,
fd_gpio_defaults
},
{
"reset-again"
,
fd_reset_again
},
//SUBSYS(acam),
//SUBSYS(time),
//SUBSYS(i2c),
//SUBSYS(zio),
};
#undef M
/* probe and remove are called by fd-spec.c */
int
fd_probe
(
struct
spec_dev
*
dev
)
...
...
@@ -115,7 +129,8 @@ void fd_remove(struct spec_dev *dev)
pr_debug
(
"%s
\n
"
,
__func__
);
while
(
--
i
>=
0
)
{
m
=
mods
+
i
;
m
->
exit
(
dev
->
sub_priv
);
if
(
m
->
exit
)
m
->
exit
(
dev
->
sub_priv
);
}
}
...
...
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