Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple PCIe FMC carrier SPEC - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
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
Simple PCIe FMC carrier SPEC - Software
Commits
6ce1b9d2
Commit
6ce1b9d2
authored
Sep 05, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel/spec-i2c: added static where needed, less verbose
parent
a30d9715
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
spec-i2c.c
kernel/spec-i2c.c
+4
-7
No files found.
kernel/spec-i2c.c
View file @
6ce1b9d2
...
...
@@ -73,7 +73,7 @@ static void mi2c_stop(struct fmc_device *fmc)
set_sda
(
fmc
,
1
);
}
int
mi2c_put_byte
(
struct
fmc_device
*
fmc
,
int
data
)
static
int
mi2c_put_byte
(
struct
fmc_device
*
fmc
,
int
data
)
{
int
i
;
int
ack
;
...
...
@@ -95,7 +95,7 @@ int mi2c_put_byte(struct fmc_device *fmc, int data)
return
ack
?
-
EIO
:
0
;
/* ack low == success */
}
int
mi2c_get_byte
(
struct
fmc_device
*
fmc
,
unsigned
char
*
data
,
int
send
ack
)
static
int
mi2c_get_byte
(
struct
fmc_device
*
fmc
,
unsigned
char
*
data
,
int
ack
)
{
int
i
;
int
indata
=
0
;
...
...
@@ -111,7 +111,7 @@ int mi2c_get_byte(struct fmc_device *fmc, unsigned char *data, int sendack)
set_scl
(
fmc
,
0
);
}
set_sda
(
fmc
,
(
send
ack
?
0
:
1
));
set_sda
(
fmc
,
(
ack
?
0
:
1
));
set_scl
(
fmc
,
1
);
set_scl
(
fmc
,
0
);
set_sda
(
fmc
,
0
);
...
...
@@ -131,11 +131,8 @@ int mi2c_scan(struct fmc_device *fmc)
int
i
,
found
=
0
;
for
(
i
=
0
;
i
<
256
;
i
+=
2
)
{
mi2c_start
(
fmc
);
if
(
!
mi2c_put_byte
(
fmc
,
i
))
{
pr_info
(
"%s: Found i2c device at 0x%x
\n
"
,
KBUILD_MODNAME
,
i
>>
1
);
if
(
!
mi2c_put_byte
(
fmc
,
i
))
found
++
;
}
mi2c_stop
(
fmc
);
}
return
found
;
...
...
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