Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FMC TDC 1ns 5cha - Software
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
FMC TDC 1ns 5cha - Software
Commits
3322f47b
Commit
3322f47b
authored
12 years ago
by
Miguel Gómez Sexto
Browse files
Options
Downloads
Patches
Plain Diff
Added new zio trigger file
Signed-off-by:
Miguel Gomez
<
magomez@igalia.com
>
parent
6b163dea
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
drivers/Makefile
+1
-1
1 addition, 1 deletion
drivers/Makefile
drivers/zio-trig-tdc.c
+73
-0
73 additions, 0 deletions
drivers/zio-trig-tdc.c
with
74 additions
and
1 deletion
drivers/Makefile
+
1
−
1
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
...
...
This diff is collapsed.
Click to expand it.
drivers/zio-trig-tdc.c
0 → 100644
+
73
−
0
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"
);
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment