#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/regulator/consumer.h>
#include <linux/pm_runtime.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/iio/iio.h>
#include "inv_icm42600.h"
#include "inv_icm42600_buffer.h"
static const struct regmap_range_cfg inv_icm42600_regmap_ranges[] = …;
static const struct regmap_range inv_icm42600_regmap_volatile_yes_ranges[] = …;
static const struct regmap_range inv_icm42600_regmap_volatile_no_ranges[] = …;
static const struct regmap_access_table inv_icm42600_regmap_volatile_accesses[] = …;
static const struct regmap_range inv_icm42600_regmap_rd_noinc_no_ranges[] = …;
static const struct regmap_access_table inv_icm42600_regmap_rd_noinc_accesses[] = …;
const struct regmap_config inv_icm42600_regmap_config = …;
EXPORT_SYMBOL_NS_GPL(…);
struct inv_icm42600_hw { … };
static const struct inv_icm42600_conf inv_icm42600_default_conf = …;
static const struct inv_icm42600_conf inv_icm42686_default_conf = …;
static const struct inv_icm42600_hw inv_icm42600_hw[INV_CHIP_NB] = …;
const struct iio_mount_matrix *
inv_icm42600_get_mount_matrix(const struct iio_dev *indio_dev,
const struct iio_chan_spec *chan)
{ … }
uint32_t inv_icm42600_odr_to_period(enum inv_icm42600_odr odr)
{ … }
static int inv_icm42600_set_pwr_mgmt0(struct inv_icm42600_state *st,
enum inv_icm42600_sensor_mode gyro,
enum inv_icm42600_sensor_mode accel,
bool temp, unsigned int *sleep_ms)
{ … }
int inv_icm42600_set_accel_conf(struct inv_icm42600_state *st,
struct inv_icm42600_sensor_conf *conf,
unsigned int *sleep_ms)
{ … }
int inv_icm42600_set_gyro_conf(struct inv_icm42600_state *st,
struct inv_icm42600_sensor_conf *conf,
unsigned int *sleep_ms)
{ … }
int inv_icm42600_set_temp_conf(struct inv_icm42600_state *st, bool enable,
unsigned int *sleep_ms)
{ … }
int inv_icm42600_debugfs_reg(struct iio_dev *indio_dev, unsigned int reg,
unsigned int writeval, unsigned int *readval)
{ … }
static int inv_icm42600_set_conf(struct inv_icm42600_state *st,
const struct inv_icm42600_conf *conf)
{ … }
static int inv_icm42600_setup(struct inv_icm42600_state *st,
inv_icm42600_bus_setup bus_setup)
{ … }
static irqreturn_t inv_icm42600_irq_timestamp(int irq, void *_data)
{ … }
static irqreturn_t inv_icm42600_irq_handler(int irq, void *_data)
{ … }
static int inv_icm42600_irq_init(struct inv_icm42600_state *st, int irq,
int irq_type, bool open_drain)
{ … }
static int inv_icm42600_timestamp_setup(struct inv_icm42600_state *st)
{ … }
static int inv_icm42600_enable_regulator_vddio(struct inv_icm42600_state *st)
{ … }
static void inv_icm42600_disable_vdd_reg(void *_data)
{ … }
static void inv_icm42600_disable_vddio_reg(void *_data)
{ … }
static void inv_icm42600_disable_pm(void *_data)
{ … }
int inv_icm42600_core_probe(struct regmap *regmap, int chip, int irq,
inv_icm42600_bus_setup bus_setup)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
static int inv_icm42600_suspend(struct device *dev)
{ … }
static int inv_icm42600_resume(struct device *dev)
{ … }
static int inv_icm42600_runtime_suspend(struct device *dev)
{ … }
static int inv_icm42600_runtime_resume(struct device *dev)
{ … }
EXPORT_NS_GPL_DEV_PM_OPS(inv_icm42600_pm_ops, IIO_ICM42600) = …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_IMPORT_NS(…);