linux/drivers/iio/gyro/adis16080.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * ADIS16080/100 Yaw Rate Gyroscope with SPI driver
 *
 * Copyright 2010 Analog Devices Inc.
 */
#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/spi/spi.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/module.h>

#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>

#define ADIS16080_DIN_GYRO
#define ADIS16080_DIN_TEMP
#define ADIS16080_DIN_AIN1
#define ADIS16080_DIN_AIN2

/*
 * 1: Write contents on DIN to control register.
 * 0: No changes to control register.
 */

#define ADIS16080_DIN_WRITE

struct adis16080_chip_info {};

/**
 * struct adis16080_state - device instance specific data
 * @us:			actual spi_device to write data
 * @info:		chip specific parameters
 * @buf:		transmit or receive buffer
 * @lock:		lock to protect buffer during reads
 **/
struct adis16080_state {};

static int adis16080_read_sample(struct iio_dev *indio_dev,
		u16 addr, int *val)
{}

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

static const struct iio_chan_spec adis16080_channels[] =;

static const struct iio_info adis16080_info =;

enum {};

static const struct adis16080_chip_info adis16080_chip_info[] =;

static int adis16080_probe(struct spi_device *spi)
{}

static const struct spi_device_id adis16080_ids[] =;
MODULE_DEVICE_TABLE(spi, adis16080_ids);

static struct spi_driver adis16080_driver =;
module_spi_driver();

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