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
2a4eb326
Commit
2a4eb326
authored
Mar 06, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fa-core.c: trivial details
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
bb852ee1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
fa-core.c
kernel/fa-core.c
+5
-7
No files found.
kernel/fa-core.c
View file @
2a4eb326
...
...
@@ -17,6 +17,7 @@
static
struct
fmc_driver
fa_dev_drv
;
FMC_PARAM_BUSID
(
fa_dev_drv
);
FMC_PARAM_GATEWARE
(
fa_dev_drv
);
static
char
*
fa_binary
=
FA_GATEWARE_DEFAULT_NAME
;
module_param_named
(
file
,
fa_binary
,
charp
,
0444
);
...
...
@@ -45,9 +46,8 @@ int zfad_convert_hw_range(uint32_t bitmask)
return
-
EINVAL
;
}
/* Calculate correct index for channel from CHx indexes */
int
zfad_get_chx_index
(
unsigned
long
addr
,
struct
zio_channel
*
chan
)
/* Calculate correct index in fa_regfield array for channel from CHx indexes */
int
zfad_get_chx_index
(
unsigned
long
addr
,
struct
zio_channel
*
chan
)
{
int
offset
;
...
...
@@ -92,7 +92,8 @@ int zfad_apply_user_offset(struct fa_dev *fa, struct zio_channel *chan,
}
hwval
=
uval
*
0x8000
/
5000
;
if
(
hwval
==
0x8000
)
hwval
=
0x7fff
;
/* -32768 .. 32767 */
if
(
hwval
==
0x8000
)
hwval
=
0x7fff
;
/* -32768 .. 32767 */
hwval
=
((
hwval
+
offset
)
*
gain
)
>>
15
;
/* signed */
hwval
+=
0x8000
;
/* offset binary */
...
...
@@ -335,8 +336,6 @@ static int fa_init(void)
{
int
ret
;
pr_debug
(
"%s
\n
"
,
__func__
);
/* First trigger and zio driver */
ret
=
fa_trig_init
();
if
(
ret
)
...
...
@@ -350,7 +349,6 @@ static int fa_init(void)
/* Finally the fmc driver, whose probe instantiates zio devices */
ret
=
fmc_driver_register
(
&
fa_dev_drv
);
if
(
ret
)
{
fmc_driver_unregister
(
&
fa_dev_drv
);
fa_trig_exit
();
fa_zio_unregister
();
return
ret
;
...
...
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