linux/drivers/iio/gyro/adxrs290.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * ADXRS290 SPI Gyroscope Driver
 *
 * Copyright (C) 2020 Nishant Malpani <[email protected]>
 * Copyright (C) 2020 Analog Devices, Inc.
 */

#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/spi/spi.h>

#include <linux/iio/buffer.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/trigger.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/iio/trigger_consumer.h>

#define ADXRS290_ADI_ID
#define ADXRS290_MEMS_ID
#define ADXRS290_DEV_ID

#define ADXRS290_REG_ADI_ID
#define ADXRS290_REG_MEMS_ID
#define ADXRS290_REG_DEV_ID
#define ADXRS290_REG_REV_ID
#define ADXRS290_REG_SN0
#define ADXRS290_REG_DATAX0
#define ADXRS290_REG_DATAY0
#define ADXRS290_REG_TEMP0
#define ADXRS290_REG_POWER_CTL
#define ADXRS290_REG_FILTER
#define ADXRS290_REG_DATA_RDY

#define ADXRS290_READ
#define ADXRS290_TSM
#define ADXRS290_MEASUREMENT
#define ADXRS290_DATA_RDY_OUT
#define ADXRS290_SYNC_MASK
#define ADXRS290_SYNC(x)
#define ADXRS290_LPF_MASK
#define ADXRS290_LPF(x)
#define ADXRS290_HPF_MASK
#define ADXRS290_HPF(x)

#define ADXRS290_READ_REG(reg)

#define ADXRS290_MAX_TRANSITION_TIME_MS

enum adxrs290_mode {};

enum adxrs290_scan_index {};

struct adxrs290_state {};

/*
 * Available cut-off frequencies of the low pass filter in Hz.
 * The integer part and fractional part are represented separately.
 */
static const int adxrs290_lpf_3db_freq_hz_table[][2] =;

/*
 * Available cut-off frequencies of the high pass filter in Hz.
 * The integer part and fractional part are represented separately.
 */
static const int adxrs290_hpf_3db_freq_hz_table[][2] =;

static int adxrs290_get_rate_data(struct iio_dev *indio_dev, const u8 cmd, int *val)
{}

static int adxrs290_get_temp_data(struct iio_dev *indio_dev, int *val)
{}

static int adxrs290_get_3db_freq(struct iio_dev *indio_dev, u8 *val, u8 *val2)
{}

static int adxrs290_spi_write_reg(struct spi_device *spi, const u8 reg,
				  const u8 val)
{}

static int adxrs290_find_match(const int (*freq_tbl)[2], const int n,
			       const int val, const int val2)
{}

static int adxrs290_set_filter_freq(struct iio_dev *indio_dev,
				    const unsigned int lpf_idx,
				    const unsigned int hpf_idx)
{}

static int adxrs290_set_mode(struct iio_dev *indio_dev, enum adxrs290_mode mode)
{}

static void adxrs290_chip_off_action(void *data)
{}

static int adxrs290_initial_setup(struct iio_dev *indio_dev)
{}

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

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

static int adxrs290_read_avail(struct iio_dev *indio_dev,
			       struct iio_chan_spec const *chan,
			       const int **vals, int *type, int *length,
			       long mask)
{}

static int adxrs290_reg_access_rw(struct spi_device *spi, unsigned int reg,
				  unsigned int *readval)
{}

static int adxrs290_reg_access(struct iio_dev *indio_dev, unsigned int reg,
			       unsigned int writeval, unsigned int *readval)
{}

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

static void adxrs290_reset_trig(struct iio_trigger *trig)
{}

static const struct iio_trigger_ops adxrs290_trigger_ops =;

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

#define ADXRS290_ANGL_VEL_CHANNEL(reg, axis)

static const struct iio_chan_spec adxrs290_channels[] =;

static const unsigned long adxrs290_avail_scan_masks[] =;

static const struct iio_info adxrs290_info =;

static int adxrs290_probe_trigger(struct iio_dev *indio_dev)
{}

static int adxrs290_probe(struct spi_device *spi)
{}

static const struct of_device_id adxrs290_of_match[] =;
MODULE_DEVICE_TABLE(of, adxrs290_of_match);

static struct spi_driver adxrs290_driver =;
module_spi_driver();

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