Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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
Commits
b8be5834
Commit
b8be5834
authored
May 15, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gpio.c: fix white space breakage of
f523e511
parent
e57731fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
gpio.c
gpio.c
+13
-12
No files found.
gpio.c
View file @
b8be5834
...
...
@@ -37,18 +37,19 @@ static int gpio_readl(struct spec_fd *fd, int reg)
static
int
gpio_writel_with_retry
(
struct
spec_fd
*
fd
,
int
val
,
int
reg
)
{
int
retries
=
SPI_RETRIES
,
rv
;
while
(
retries
--
)
{
gpio_writel
(
fd
,
val
,
reg
);
rv
=
gpio_readl
(
fd
,
reg
);
if
(
rv
>=
0
&&
(
rv
==
val
))
{
if
(
SPI_RETRIES
-
1
-
retries
>
0
)
printk
(
"gpio_writel_with_retry: succeded after %d retries
\n
"
,
SPI_RETRIES
-
1
-
retries
);
return
0
;
}
}
return
-
EIO
;
while
(
retries
--
)
{
gpio_writel
(
fd
,
val
,
reg
);
rv
=
gpio_readl
(
fd
,
reg
);
if
(
rv
>=
0
&&
(
rv
==
val
))
{
if
(
SPI_RETRIES
-
1
-
retries
>
0
)
printk
(
"%s: succeded after %d retries
\n
"
,
__func__
,
SPI_RETRIES
-
1
-
retries
);
return
0
;
}
}
return
-
EIO
;
}
void
fd_gpio_dir
(
struct
spec_fd
*
fd
,
int
mask
,
int
dir
)
...
...
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