Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
linux-elphel
Commits
b9f26a29
Commit
b9f26a29
authored
May 06, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comments and todo
parent
8b238de5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
elphel393-pwr.c
src/drivers/elphel/elphel393-pwr.c
+1
-4
No files found.
src/drivers/elphel/elphel393-pwr.c
View file @
b9f26a29
...
@@ -649,11 +649,10 @@ int gpio_shutdown(struct device *dev)
...
@@ -649,11 +649,10 @@ int gpio_shutdown(struct device *dev)
return
gpio_conf_by_index
(
dev
,
gpio_shutdown_index
,
1
,
0
);
return
gpio_conf_by_index
(
dev
,
gpio_shutdown_index
,
1
,
0
);
}
}
//TODO: test mutex_lock/unlock works
int
gpio_10389_ctrl
(
struct
device
*
dev
,
int
value
){
int
gpio_10389_ctrl
(
struct
device
*
dev
,
int
value
){
int
i
,
res
;
int
i
,
res
;
int
val
=
0
;
int
val
=
0
;
//lock here
//doesn't work
mutex_lock
(
&
gpio_10389_lock
);
mutex_lock
(
&
gpio_10389_lock
);
for
(
i
=
16
;
i
<
20
;
i
++
){
for
(
i
=
16
;
i
<
20
;
i
++
){
if
((
value
>>
(
i
-
8
))
&
0x1
){
if
((
value
>>
(
i
-
8
))
&
0x1
){
...
@@ -664,8 +663,6 @@ int gpio_10389_ctrl(struct device *dev, int value){
...
@@ -664,8 +663,6 @@ int gpio_10389_ctrl(struct device *dev, int value){
if
(
res
<
0
)
return
res
;
if
(
res
<
0
)
return
res
;
}
}
}
}
//unlock somewhere here
//doesn't work
mutex_unlock
(
&
gpio_10389_lock
);
mutex_unlock
(
&
gpio_10389_lock
);
return
0
;
return
0
;
}
}
...
...
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