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
1250929c
Commit
1250929c
authored
May 20, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel/spec-i2c: only 'scan' for our address
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
5739ab6b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
spec-i2c.c
kernel/spec-i2c.c
+11
-7
No files found.
kernel/spec-i2c.c
View file @
1250929c
...
...
@@ -131,13 +131,17 @@ void mi2c_init(struct fmc_device *fmc)
int
mi2c_scan
(
struct
fmc_device
*
fmc
)
{
int
i
,
found
=
0
;
for
(
i
=
0
;
i
<
256
;
i
+=
2
)
{
int
found
=
0
;
/* ensure the bus is reset */
mi2c_start
(
fmc
);
if
(
!
mi2c_put_byte
(
fmc
,
i
))
mi2c_stop
(
fmc
);
/* only look for our own device */
mi2c_start
(
fmc
);
if
(
mi2c_put_byte
(
fmc
,
fmc
->
eeprom_addr
<<
1
)
==
0
)
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