linux/drivers/iio/accel/bmi088-accel-core.c

// SPDX-License-Identifier: GPL-2.0
/*
 * 3-axis accelerometer driver supporting following Bosch-Sensortec chips:
 *  - BMI088
 *  - BMI085
 *  - BMI090L
 *
 * Copyright (c) 2018-2021, Topic Embedded Products
 */

#include <linux/bitfield.h>
#include <linux/delay.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <asm/unaligned.h>

#include "bmi088-accel.h"

#define BMI088_ACCEL_REG_CHIP_ID
#define BMI088_ACCEL_REG_ERROR

#define BMI088_ACCEL_REG_INT_STATUS
#define BMI088_ACCEL_INT_STATUS_BIT_DRDY

#define BMI088_ACCEL_REG_RESET
#define BMI088_ACCEL_RESET_VAL

#define BMI088_ACCEL_REG_PWR_CTRL
#define BMI088_ACCEL_REG_PWR_CONF

#define BMI088_ACCEL_REG_INT_MAP_DATA
#define BMI088_ACCEL_INT_MAP_DATA_BIT_INT1_DRDY
#define BMI088_ACCEL_INT_MAP_DATA_BIT_INT2_FWM

#define BMI088_ACCEL_REG_INT1_IO_CONF
#define BMI088_ACCEL_INT1_IO_CONF_BIT_ENABLE_OUT
#define BMI088_ACCEL_INT1_IO_CONF_BIT_LVL

#define BMI088_ACCEL_REG_INT2_IO_CONF
#define BMI088_ACCEL_INT2_IO_CONF_BIT_ENABLE_OUT
#define BMI088_ACCEL_INT2_IO_CONF_BIT_LVL

#define BMI088_ACCEL_REG_ACC_CONF
#define BMI088_ACCEL_MODE_ODR_MASK

#define BMI088_ACCEL_REG_ACC_RANGE
#define BMI088_ACCEL_RANGE_3G
#define BMI088_ACCEL_RANGE_6G
#define BMI088_ACCEL_RANGE_12G
#define BMI088_ACCEL_RANGE_24G

#define BMI088_ACCEL_REG_TEMP
#define BMI088_ACCEL_REG_TEMP_SHIFT
#define BMI088_ACCEL_TEMP_UNIT
#define BMI088_ACCEL_TEMP_OFFSET

#define BMI088_ACCEL_REG_XOUT_L
#define BMI088_ACCEL_AXIS_TO_REG(axis)

#define BMI088_ACCEL_MAX_STARTUP_TIME_US
#define BMI088_AUTO_SUSPEND_DELAY_MS

#define BMI088_ACCEL_REG_FIFO_STATUS
#define BMI088_ACCEL_REG_FIFO_CONFIG0
#define BMI088_ACCEL_REG_FIFO_CONFIG1
#define BMI088_ACCEL_REG_FIFO_DATA
#define BMI088_ACCEL_FIFO_LENGTH

#define BMI088_ACCEL_FIFO_MODE_FIFO
#define BMI088_ACCEL_FIFO_MODE_STREAM

#define BMIO088_ACCEL_ACC_RANGE_MSK

enum bmi088_accel_axis {};

static const int bmi088_sample_freqs[] =;

/* Available OSR (over sampling rate) sets the 3dB cut-off frequency */
enum bmi088_osr_modes {};

/* Available ODR (output data rates) in Hz */
enum bmi088_odr_modes {};

struct bmi088_accel_chip_info {};

struct bmi088_accel_data {};

static const struct regmap_range bmi088_volatile_ranges[] =;

static const struct regmap_access_table bmi088_volatile_table =;

const struct regmap_config bmi088_regmap_conf =;
EXPORT_SYMBOL_NS_GPL();

static int bmi088_accel_power_up(struct bmi088_accel_data *data)
{}

static int bmi088_accel_power_down(struct bmi088_accel_data *data)
{}

static int bmi088_accel_get_sample_freq(struct bmi088_accel_data *data,
					int *val, int *val2)
{}

static int bmi088_accel_set_sample_freq(struct bmi088_accel_data *data, int val)
{}

static int bmi088_accel_set_scale(struct bmi088_accel_data *data, int val, int val2)
{}

static int bmi088_accel_get_temp(struct bmi088_accel_data *data, int *val)
{}

static int bmi088_accel_get_axis(struct bmi088_accel_data *data,
				 struct iio_chan_spec const *chan,
				 int *val)
{}

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

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

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

#define BMI088_ACCEL_CHANNEL(_axis)

static const struct iio_chan_spec bmi088_accel_channels[] =;

static const struct bmi088_accel_chip_info bmi088_accel_chip_info_tbl[] =;

static const struct iio_info bmi088_accel_info =;

static const unsigned long bmi088_accel_scan_masks[] =;

static int bmi088_accel_chip_init(struct bmi088_accel_data *data, enum bmi_device_type type)
{}

int bmi088_accel_core_probe(struct device *dev, struct regmap *regmap,
	int irq, enum bmi_device_type type)
{}
EXPORT_SYMBOL_NS_GPL();


void bmi088_accel_core_remove(struct device *dev)
{}
EXPORT_SYMBOL_NS_GPL();

static int bmi088_accel_runtime_suspend(struct device *dev)
{}

static int bmi088_accel_runtime_resume(struct device *dev)
{}

EXPORT_NS_GPL_RUNTIME_DEV_PM_OPS(bmi088_accel_pm_ops,
				 bmi088_accel_runtime_suspend,
				 bmi088_accel_runtime_resume, NULL,
				 IIO_BMI088);

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