Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC TDC 1ns 5cha
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
1
Merge Requests
1
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
Commits
3322f47b
Commit
3322f47b
authored
Oct 04, 2012
by
Miguel Gómez Sexto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new zio trigger file
Signed-off-by:
Miguel Gomez
<
magomez@igalia.com
>
parent
6b163dea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
1 deletion
+74
-1
Makefile
drivers/Makefile
+1
-1
zio-trig-tdc.c
drivers/zio-trig-tdc.c
+73
-0
No files found.
drivers/Makefile
View file @
3322f47b
...
...
@@ -11,7 +11,7 @@ ccflags-y = -I$(ZIO)/include -I$(SPEC_SW)/kernel -I$M -I$(SPEC_SW)/kernel/includ
subdirs-ccflags-y
=
$
(
ccflags-y
)
obj-m
:=
spec-tdc.o
obj-m
:=
spec-tdc.o
zio-trig-tdc.o
spec-tdc-objs
=
tdc-core.o tdc-zio.o tdc-fmc.o tdc-acam.o tdc-dma.o
...
...
drivers/zio-trig-tdc.c
0 → 100644
View file @
3322f47b
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/zio.h>
#include <linux/zio-sysfs.h>
#include <linux/zio-buffer.h>
#include <linux/zio-trigger.h>
#define ZTT_DEFAULT_BLOCK_SIZE 16
static
DEFINE_ZATTR_STD
(
TRIG
,
ztt_std_attr
)
=
{
ZATTR_REG
(
trig
,
ZATTR_TRIG_NSAMPLES
,
S_IRUGO
|
S_IWUGO
,
0
/* no addr needed */
,
ZTT_DEFAULT_BLOCK_SIZE
),
};
int
ztt_conf_set
(
struct
device
*
dev
,
struct
zio_attribute
*
zattr
,
uint32_t
usr_val
)
{
zattr
->
value
=
usr_val
;
return
0
;
}
struct
zio_sysfs_operations
ztt_s_ops
=
{
.
conf_set
=
ztt_conf_set
,
};
static
struct
zio_ti
*
ztt_create
(
struct
zio_trigger_type
*
trig
,
struct
zio_cset
*
cset
,
struct
zio_control
*
ctrl
,
fmode_t
flags
)
{
struct
zio_ti
*
ti
;
ti
=
kzalloc
(
sizeof
(
*
ti
),
GFP_KERNEL
);
if
(
!
ti
)
return
ERR_PTR
(
-
ENOMEM
);
return
ti
;
}
static
void
ztt_destroy
(
struct
zio_ti
*
ti
)
{
kfree
(
ti
);
}
static
const
struct
zio_trigger_operations
ztt_trigger_ops
=
{
.
create
=
ztt_create
,
.
destroy
=
ztt_destroy
,
};
static
struct
zio_trigger_type
ztt_trigger
=
{
.
owner
=
THIS_MODULE
,
.
zattr_set
=
{
.
std_zattr
=
ztt_std_attr
,
},
.
s_op
=
&
ztt_s_ops
,
.
t_op
=
&
ztt_trigger_ops
,
};
static
int
zio_trig_tdc_init
(
void
)
{
return
zio_register_trig
(
&
ztt_trigger
,
"tdc"
);
}
static
void
zio_trig_tdc_exit
(
void
)
{
zio_unregister_trig
(
&
ztt_trigger
);
}
module_init
(
zio_trig_tdc_init
);
module_exit
(
zio_trig_tdc_exit
);
MODULE_LICENSE
(
"GPL"
);
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