linux/drivers/iio/trigger/iio-trig-loop.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright 2016 Jonathan Cameron <[email protected]>
 *
 * Based on a mashup of the hrtimer trigger and continuous sampling proposal of
 * Gregor Boirie <[email protected]>
 *
 * Note this is still rather experimental and may eat babies.
 *
 * Todo
 * * Protect against connection of devices that 'need' the top half
 *   handler.
 * * Work out how to run top half handlers in this context if it is
 *   safe to do so (timestamp grabbing for example)
 *
 * Tested against a max1363. Used about 33% cpu for the thread and 20%
 * for generic_buffer piping to /dev/null. Watermark set at 64 on a 128
 * element kfifo buffer.
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/irq_work.h>
#include <linux/kthread.h>
#include <linux/freezer.h>

#include <linux/iio/iio.h>
#include <linux/iio/trigger.h>
#include <linux/iio/sw_trigger.h>

struct iio_loop_info {};

static const struct config_item_type iio_loop_type =;

static int iio_loop_thread(void *data)
{}

static int iio_loop_trigger_set_state(struct iio_trigger *trig, bool state)
{}

static const struct iio_trigger_ops iio_loop_trigger_ops =;

static struct iio_sw_trigger *iio_trig_loop_probe(const char *name)
{}

static int iio_trig_loop_remove(struct iio_sw_trigger *swt)
{}

static const struct iio_sw_trigger_ops iio_trig_loop_ops =;

static struct iio_sw_trigger_type iio_trig_loop =;

module_iio_sw_trigger_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_ALIAS();