linux/drivers/iio/imu/adis_buffer.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Common library for ADIS16XXX devices
 *
 * Copyright 2012 Analog Devices Inc.
 *   Author: Lars-Peter Clausen <[email protected]>
 */

#include <linux/export.h>
#include <linux/interrupt.h>
#include <linux/mutex.h>
#include <linux/kernel.h>
#include <linux/spi/spi.h>
#include <linux/slab.h>

#include <linux/iio/iio.h>
#include <linux/iio/buffer.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/iio/imu/adis.h>

static int adis_update_scan_mode_burst(struct iio_dev *indio_dev,
				       const unsigned long *scan_mask)
{}

int adis_update_scan_mode(struct iio_dev *indio_dev,
			  const unsigned long *scan_mask)
{}
EXPORT_SYMBOL_NS_GPL();

static int adis_paging_trigger_handler(struct adis *adis)
{}

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

static void adis_buffer_cleanup(void *arg)
{}

/**
 * devm_adis_setup_buffer_and_trigger_with_attrs() - Sets up buffer and trigger
 * for the managed adis device with buffer attributes.
 * @adis: The adis device
 * @indio_dev: The IIO device
 * @trigger_handler: Trigger handler: should handle the buffer readings.
 * @ops: Optional buffer setup functions, may be NULL.
 * @buffer_attrs: Extra buffer attributes.
 *
 * Returns 0 on success, a negative error code otherwise.
 *
 * This function sets up the buffer (with buffer setup functions and extra
 * buffer attributes) and trigger for a adis devices with buffer attributes.
 */
int
devm_adis_setup_buffer_and_trigger_with_attrs(struct adis *adis, struct iio_dev *indio_dev,
					      irq_handler_t trigger_handler,
					      const struct iio_buffer_setup_ops *ops,
					      const struct iio_dev_attr **buffer_attrs)
{}
EXPORT_SYMBOL_NS_GPL();