Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC TDC 1ns 5cha - 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 TDC 1ns 5cha - Software
Commits
a814a6f0
Commit
a814a6f0
authored
Oct 07, 2014
by
Federico Vaga
Committed by
Federico Vaga
Jan 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: read temp when necessary
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
0800471f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
26 deletions
+4
-26
fmc-tdc.h
kernel/fmc-tdc.h
+0
-2
ft-core.c
kernel/ft-core.c
+0
-15
ft-zio.c
kernel/ft-zio.c
+4
-9
No files found.
kernel/fmc-tdc.h
View file @
a814a6f0
...
...
@@ -146,8 +146,6 @@ struct fmctdc_dev {
struct
zio_device
*
zdev
,
*
hwzdev
;
/* is acquisition mode active? */
int
acquisition_on
;
/* temperature readout timer */
struct
timer_list
temp_timer
;
/* carrier specific functions (init/exit/reset/readout/irq handling) */
struct
ft_carrier_specific
*
carrier_specific
;
/* carrier private data */
...
...
kernel/ft-core.c
View file @
a814a6f0
...
...
@@ -47,15 +47,6 @@ module_param_named(buffer_size, ft_buffer_size, int, 0444);
MODULE_PARM_DESC
(
verbose
,
"Number of timestamps in each channel's software FIFO buffer."
);
static
void
ft_temp_timer_handler
(
unsigned
long
arg
)
{
struct
fmctdc_dev
*
ft
=
(
struct
fmctdc_dev
*
)
arg
;
ft_read_temp
(
ft
,
ft
->
verbose
);
mod_timer
(
&
ft
->
temp_timer
,
jiffies
+
5
*
HZ
);
}
static
int
ft_init_channel
(
struct
fmctdc_dev
*
ft
,
int
channel
)
{
struct
ft_channel_state
*
st
=
&
ft
->
channels
[
channel
-
1
];
...
...
@@ -305,10 +296,6 @@ int ft_probe(struct fmc_device *fmc)
ft_enable_acquisition
(
ft
,
1
);
/* start temperature polling timer */
setup_timer
(
&
ft
->
temp_timer
,
ft_temp_timer_handler
,
(
unsigned
long
)
ft
);
mod_timer
(
&
ft
->
temp_timer
,
jiffies
+
5
*
HZ
);
ft
->
initialized
=
1
;
return
0
;
...
...
@@ -329,8 +316,6 @@ int ft_remove(struct fmc_device *fmc)
if
(
!
ft
->
initialized
)
return
0
;
/* No init, no exit */
del_timer_sync
(
&
ft
->
temp_timer
);
ft_enable_acquisition
(
ft
,
0
);
ft_irq_exit
(
ft
);
...
...
kernel/ft-zio.c
View file @
a814a6f0
...
...
@@ -42,7 +42,7 @@ static struct zio_attribute ft_zattr_dev[] = {
ZIO_ATTR_EXT
(
"coarse"
,
_RW_
,
FT_ATTR_DEV_COARSE
,
0
),
ZIO_ATTR_EXT
(
"command"
,
S_IWUGO
,
FT_ATTR_DEV_COMMAND
,
0
),
ZIO_ATTR_EXT
(
"enable_inputs"
,
_RW_
,
FT_ATTR_DEV_ENABLE_INPUTS
,
0
),
ZIO_
ATTR
_EXT
(
"temperature"
,
S_IRUGO
,
FT_ATTR_DEV_TEMP
,
0
)
ZIO_
PARAM
_EXT
(
"temperature"
,
S_IRUGO
,
FT_ATTR_DEV_TEMP
,
0
)
};
/* Extended attributes for the TDC (== input) cset */
...
...
@@ -125,14 +125,9 @@ static int ft_zio_info_get(struct device *dev, struct zio_attribute *zattr,
return
0
;
case
FT_ATTR_DEV_TEMP
:
if
(
ft
->
temp_ready
)
{
attr
[
FT_ATTR_DEV_TEMP
].
value
=
ft
->
temp
;
*
usr_val
=
ft
->
temp
;
return
0
;
}
else
return
-
EAGAIN
;
ft_read_temp
(
ft
,
ft
->
verbose
);
*
usr_val
=
ft
->
temp
;
return
0
;
case
FT_ATTR_DEV_COARSE
:
case
FT_ATTR_DEV_SECONDS
:
{
...
...
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