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
8511552a
Commit
8511552a
authored
Apr 13, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
function to reset USB
parent
4511f63c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
elphel393-init.c
src/drivers/elphel/elphel393-init.c
+12
-4
No files found.
src/drivers/elphel/elphel393-init.c
View file @
8511552a
...
...
@@ -195,16 +195,24 @@ static ssize_t set_boardinfo(struct device *dev, struct device_attribute *attr,
return
count
;
}
static
ssize_t
perform_usbreset
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
const
char
*
buf
,
size_t
count
){
pr_info
(
"EMIO pin 49: USB reset
\n
"
);
setup_mio_pin_and_reset_usb
();
return
count
;
}
static
DEVICE_ATTR
(
bootargs
,
SYSFS_PERMISSIONS
&
SYSFS_READONLY
,
get_bootargs
,
NULL
);
static
DEVICE_ATTR
(
boardinfo
,
SYSFS_PERMISSIONS
,
get_boardinfo
,
set_boardinfo
);
static
DEVICE_ATTR
(
revision
,
SYSFS_PERMISSIONS
&
SYSFS_READONLY
,
get_revision
,
NULL
);
static
DEVICE_ATTR
(
serial
,
SYSFS_PERMISSIONS
&
SYSFS_READONLY
,
get_serial
,
NULL
);
static
DEVICE_ATTR
(
usbreset
,
SYSFS_PERMISSIONS
,
NULL
,
perform_usbreset
);
static
struct
attribute
*
root_dev_attrs
[]
=
{
&
dev_attr_bootargs
.
attr
,
&
dev_attr_boardinfo
.
attr
,
&
dev_attr_revision
.
attr
,
&
dev_attr_serial
.
attr
,
&
dev_attr_usbreset
.
attr
,
NULL
};
...
...
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