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
8c273216
Commit
8c273216
authored
Aug 13, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drv: pattern data is 14bit, not 12bit
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
f4c1848b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
fa-core.c
kernel/fa-core.c
+1
-1
fa-debug.c
kernel/fa-debug.c
+1
-1
No files found.
kernel/fa-core.c
View file @
8c273216
...
@@ -312,7 +312,7 @@ int fa_adc_data_pattern_get(struct fa_dev *fa, uint16_t *pattern,
...
@@ -312,7 +312,7 @@ int fa_adc_data_pattern_get(struct fa_dev *fa, uint16_t *pattern,
if
(
err
)
if
(
err
)
return
err
;
return
err
;
*
enable
=
!!
(
rx
&
0x80
);
*
enable
=
!!
(
rx
&
0x80
);
*
pattern
=
((
rx
&
0xF
)
<<
8
);
*
pattern
=
((
rx
&
0x
3
F
)
<<
8
);
tx
=
0x8000
|
(
4
<<
8
);
tx
=
0x8000
|
(
4
<<
8
);
err
=
fa_spi_xfer
(
fa
,
FA_SPI_SS_ADC
,
16
,
tx
,
&
rx
);
err
=
fa_spi_xfer
(
fa
,
FA_SPI_SS_ADC
,
16
,
tx
,
&
rx
);
...
...
kernel/fa-debug.c
View file @
8c273216
...
@@ -203,7 +203,7 @@ static int fa_data_pattern_adc_write(struct fa_dev *fa, const char __user *buf,
...
@@ -203,7 +203,7 @@ static int fa_data_pattern_adc_write(struct fa_dev *fa, const char __user *buf,
err
=
kstrtou16
(
buf_l
+
2
,
0
,
&
pattern
);
err
=
kstrtou16
(
buf_l
+
2
,
0
,
&
pattern
);
if
(
err
)
if
(
err
)
return
err
;
return
err
;
err
=
fa_adc_data_pattern_set
(
fa
,
pattern
&
0xFFF
,
1
);
err
=
fa_adc_data_pattern_set
(
fa
,
pattern
&
0x
3
FFF
,
1
);
fa_calib_exit
(
fa
);
fa_calib_exit
(
fa
);
return
err
;
return
err
;
}
else
{
}
else
{
...
...
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