linux/drivers/media/pci/mgb4/mgb4_trigger.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2021-2023 Digiteq Automotive
 *     author: Martin Tuma <[email protected]>
 *
 * This module handles the IIO trigger device. The card has two signal inputs
 * for event triggers that can be used to record events related to the video
 * stream. A standard linux IIO device with triggered buffer capability is
 * created and configured that can be used to fetch the events with the same
 * clock source as the video frames.
 */

#include <linux/iio/iio.h>
#include <linux/iio/buffer.h>
#include <linux/iio/trigger.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/pci.h>
#include <linux/dma/amd_xdma.h>
#include "mgb4_core.h"
#include "mgb4_trigger.h"

struct trigger_data {};

static int trigger_read_raw(struct iio_dev *indio_dev,
			    struct iio_chan_spec const *chan, int *val,
			    int *val2, long mask)
{}

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

static const struct iio_trigger_ops trigger_ops =;

static const struct iio_info trigger_info =;

#define TRIGGER_CHANNEL(_si)

static const struct iio_chan_spec trigger_channels[] =;

static irqreturn_t trigger_handler(int irq, void *p)
{}

static int probe_trigger(struct iio_dev *indio_dev, int irq)
{}

static void remove_trigger(struct iio_dev *indio_dev, int irq)
{}

struct iio_dev *mgb4_trigger_create(struct mgb4_dev *mgbdev)
{}

void mgb4_trigger_free(struct iio_dev *indio_dev)
{}