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
58e8396d
Commit
58e8396d
authored
Aug 10, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drv: temperature value is signed
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
c58bcaae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
fa-calibration.c
kernel/fa-calibration.c
+5
-5
fmc-adc-100m14b4cha.h
kernel/fmc-adc-100m14b4cha.h
+2
-2
No files found.
kernel/fa-calibration.c
View file @
58e8396d
...
...
@@ -128,7 +128,7 @@ static int fa_calib_dac_gain_fix(int range, int gain_c, int32_t delta_temp)
}
static
void
fa_calib_adc_config_chan
(
struct
fa_dev
*
fa
,
unsigned
int
chan
,
u
int32_t
temperature
)
int32_t
temperature
)
{
int
range
=
fa
->
range
[
chan
];
struct
fa_calib_stanza
*
cal
=
&
fa
->
calib
.
adc
[
range
];
...
...
@@ -202,7 +202,7 @@ static int fa_dac_offset_get(struct fa_dev *fa, unsigned int chan)
}
static
int
fa_calib_dac_config_chan
(
struct
fa_dev
*
fa
,
unsigned
int
chan
,
u
int32_t
temperature
)
int32_t
temperature
)
{
int
range
=
fa
->
range
[
chan
];
int32_t
off_uv
=
fa_dac_offset_get
(
fa
,
chan
);
...
...
@@ -220,7 +220,7 @@ static int fa_calib_dac_config_chan(struct fa_dev *fa, unsigned int chan,
return
fa_dac_offset_set
(
fa
,
chan
,
hwval
);
}
void
fa_calib_dac_config
(
struct
fa_dev
*
fa
,
u
int32_t
temperature
)
void
fa_calib_dac_config
(
struct
fa_dev
*
fa
,
int32_t
temperature
)
{
int
i
;
...
...
@@ -235,7 +235,7 @@ void fa_calib_dac_config(struct fa_dev *fa, uint32_t temperature)
spin_unlock
(
&
fa
->
zdev
->
cset
->
lock
);
}
static
void
fa_calib_adc_config
(
struct
fa_dev
*
fa
,
u
int32_t
temperature
)
static
void
fa_calib_adc_config
(
struct
fa_dev
*
fa
,
int32_t
temperature
)
{
int
err
;
int
i
;
...
...
@@ -257,7 +257,7 @@ static void fa_calib_adc_config(struct fa_dev *fa, uint32_t temperature)
void
fa_calib_config
(
struct
fa_dev
*
fa
)
{
u
int32_t
temperature
;
int32_t
temperature
;
temperature
=
fa_temperature_read
(
fa
);
fa_calib_adc_config
(
fa
,
temperature
);
...
...
kernel/fmc-adc-100m14b4cha.h
View file @
58e8396d
...
...
@@ -605,7 +605,7 @@ extern const struct zfa_field_desc zfad_regs[];
extern
int
zfad_fsm_command
(
struct
fa_dev
*
fa
,
uint32_t
command
);
extern
void
zfad_reset_offset
(
struct
fa_dev
*
fa
);
extern
int
zfad_convert_hw_range
(
uint32_t
bitmask
);
extern
u
int32_t
fa_temperature_read
(
struct
fa_dev
*
fa
);
extern
int32_t
fa_temperature_read
(
struct
fa_dev
*
fa
);
/* Temporarily, user values are the same as hardware values */
extern
int
zfad_convert_user_range
(
uint32_t
user_val
);
...
...
@@ -646,7 +646,7 @@ extern void fa_spi_exit(struct fa_dev *fd);
extern
int
fa_calib_init
(
struct
fa_dev
*
fa
);
extern
void
fa_calib_exit
(
struct
fa_dev
*
fa
);
extern
void
fa_calib_config
(
struct
fa_dev
*
fa
);
extern
void
fa_calib_dac_config
(
struct
fa_dev
*
fa
,
u
int32_t
temperature
);
extern
void
fa_calib_dac_config
(
struct
fa_dev
*
fa
,
int32_t
temperature
);
/* functions exported by fa-debug.c */
extern
int
fa_debug_init
(
struct
fa_dev
*
fa
);
...
...
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