Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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 ADC 100M 14b 4cha - Software
Commits
311e86eb
Commit
311e86eb
authored
Aug 12, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drv: fire sw trig only is FSM is waiting for triggers
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
a907ade6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
fa-core.c
kernel/fa-core.c
+13
-1
No files found.
kernel/fa-core.c
View file @
311e86eb
...
...
@@ -63,6 +63,9 @@ int32_t fa_temperature_read(struct fa_dev *fa)
int
fa_trigger_software
(
struct
fa_dev
*
fa
)
{
struct
zio_ti
*
ti
=
fa
->
zdev
->
cset
->
ti
;
struct
zio_attribute
*
ti_zattr
=
ti
->
zattr_set
.
std_zattr
;
unsigned
int
timeout
;
int
err
;
/* Fire if software trigger is enabled (index 5) */
if
(
!
(
ti
->
zattr_set
.
ext_zattr
[
FA100M14B4C_TATTR_SRC
].
value
&
...
...
@@ -77,9 +80,18 @@ int fa_trigger_software(struct fa_dev *fa)
return
-
EINVAL
;
}
/*
* We can do a software trigger if the FSM is not in
* the WAIT trigger status. Wait for it.
* Remember that: timeout is in us, a sample takes 10ns
*/
timeout
=
ti_zattr
[
ZIO_ATTR_TRIG_PRE_SAMP
].
value
/
10
;
err
=
fa_fsm_wait_state
(
fa
,
FA100M14B4C_STATE_WAIT
,
timeout
);
if
(
err
)
return
err
;
fa_writel
(
fa
,
fa
->
fa_adc_csr_base
,
&
zfad_regs
[
ZFAT_SW
],
1
);
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