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
1bd3a40f
Commit
1bd3a40f
authored
May 18, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed 10389 missing detection
parent
9bbe1dd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
elphel393-pwr.c
src/drivers/elphel/elphel393-pwr.c
+5
-3
No files found.
src/drivers/elphel/elphel393-pwr.c
View file @
1bd3a40f
...
@@ -289,6 +289,7 @@ static int set_enable(struct device *dev, int chn, int enable);
...
@@ -289,6 +289,7 @@ static int set_enable(struct device *dev, int chn, int enable);
static
int
get_pgood
(
struct
device
*
dev
,
int
chn
);
static
int
get_pgood
(
struct
device
*
dev
,
int
chn
);
static
struct
device
*
find_device_by_i2c_addr
(
int
address
);
static
struct
device
*
find_device_by_i2c_addr
(
int
address
);
static
int
i2c_addr_gpiochip_match
(
struct
gpio_chip
*
chip
,
void
*
data
);
int
gpio_10389_ctrl
(
struct
device
*
dev
,
int
value
);
int
gpio_10389_ctrl
(
struct
device
*
dev
,
int
value
);
/*
/*
...
@@ -656,9 +657,10 @@ int gpio_10389_ctrl(struct device *dev, int value){
...
@@ -656,9 +657,10 @@ int gpio_10389_ctrl(struct device *dev, int value){
int
i
,
res
;
int
i
,
res
;
int
val
=
0
;
int
val
=
0
;
struct
device
*
tmp_dev
;
struct
gpio_chip
*
chip
;
tmp_dev
=
find_device_by_i2c_addr
(
GPIO_10389_U4_ADDR
);
int
tmp_addr
=
GPIO_10389_U4_ADDR
;
if
(
!
tmp_dev
)
{
chip
=
gpiochip_find
(
&
tmp_addr
,
i2c_addr_gpiochip_match
);
if
(
chip
==
NULL
)
{
pr_err
(
"10389 is not connected
\n
"
);
pr_err
(
"10389 is not connected
\n
"
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
...
...
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