tdc: remove zio-trig-tdc

It is not needed anymore as we have SELF_TIMED triggers
Signed-off-by: Samuel Iglesias Gonsálvez's avatarSamuel Iglesias Gonsalvez <siglesias@igalia.com>
parent f4dfef31
......@@ -10,7 +10,7 @@ ccflags-y = -I$(ZIO)/include -I$(SPEC_SW)/kernel -I$M -I$(SPEC_SW)/kernel -I$(SP
subdirs-ccflags-y = $(ccflags-y)
obj-m := spec-tdc.o zio-trig-tdc.o
obj-m := spec-tdc.o
spec-tdc-objs = tdc-core.o tdc-zio.o tdc-fmc.o tdc-acam.o tdc-dma.o
......
......@@ -190,8 +190,7 @@ static void tdc_fmc_irq_work(struct work_struct *work)
/* Check pulse width using the falling edge event */
if(tdc_is_valid_pulse_width(tdc->event[chan].data,
*tmp_data)) {
// /* Valid pulse width -> Fire ZIO trigger */
// zio_fire_trigger(tdc->zdev->cset[chan].ti);
/* Valid pulse width */
ctrl = tdc->zdev->cset[chan].chan->current_ctrl;
ti = tdc->zdev->cset[chan].ti;
ctrl->ssize = 1; /* one event */
......
......@@ -233,7 +233,6 @@ static const struct zio_sysfs_operations tdc_zio_s_op = {
static struct zio_device tdc_tmpl = {
.owner = THIS_MODULE,
// .preferred_trigger = "tdc", /* XXX: user trigger??? */
.s_op = &tdc_zio_s_op,
.cset = tdc_cset,
.n_cset = ARRAY_SIZE(tdc_cset),
......
#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 ZIO_ATTR_DEFINE_STD(ZIO_TRG, ztt_std_attr) = {
ZIO_ATTR(trig, ZIO_ATTR_TRIG_POST_SAMP, 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);
ti->flags = ZIO_DISABLED;
ti->cset = cset;
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");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment