Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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 - Software
Commits
303b79c6
Commit
303b79c6
authored
Mar 21, 2014
by
Tomasz Wlostowski
Committed by
Alessandro Rubini
Mar 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel/fd-zio.c: read output mode from hardware when reading MODE ZIO attribute
parent
2b2401fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
fd-zio.c
kernel/fd-zio.c
+11
-3
No files found.
kernel/fd-zio.c
View file @
303b79c6
...
...
@@ -154,10 +154,18 @@ static int fd_zio_info_output(struct device *dev, struct zio_attribute *zattr,
*
usr_val
=
fd
->
ch_user_offset
[
ch
];
return
0
;
}
/* Reading the mode tells
w
ether it triggered or not */
/* Reading the mode tells
the current mode and wh
ether it triggered or not */
if
(
zattr
->
id
==
FD_ATTR_OUT_MODE
)
{
int
t
=
fd_ch_readl
(
fd
,
ch
,
FD_REG_DCR
)
&
FD_DCR_PG_TRIG
;
*
usr_val
=
t
?
0x80
:
0
;
/* low bits will return mode */
uint32_t
dcr
=
fd_ch_readl
(
fd
,
ch
,
FD_REG_DCR
);
if
(
!
(
dcr
&
FD_DCR_ENABLE
))
*
usr_val
=
FD_OUT_MODE_DISABLED
;
else
if
(
dcr
&
FD_DCR_MODE
)
*
usr_val
=
FD_OUT_MODE_PULSE
;
else
*
usr_val
=
FD_OUT_MODE_DELAY
;
if
(
dcr
&
FD_DCR_PG_TRIG
)
*
usr_val
|=
0x80
;
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