#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/sysfs.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/trigger.h>
#include <linux/iio/common/st_sensors.h>
#include "st_magn.h"
#define ST_MAGN_NUMBER_DATA_CHANNELS …
#define ST_MAGN_DEFAULT_OUT_X_H_ADDR …
#define ST_MAGN_DEFAULT_OUT_Y_H_ADDR …
#define ST_MAGN_DEFAULT_OUT_Z_H_ADDR …
#define ST_MAGN_FS_AVL_1300MG …
#define ST_MAGN_FS_AVL_1900MG …
#define ST_MAGN_FS_AVL_2000MG …
#define ST_MAGN_FS_AVL_2500MG …
#define ST_MAGN_FS_AVL_4000MG …
#define ST_MAGN_FS_AVL_4700MG …
#define ST_MAGN_FS_AVL_5600MG …
#define ST_MAGN_FS_AVL_8000MG …
#define ST_MAGN_FS_AVL_8100MG …
#define ST_MAGN_FS_AVL_12000MG …
#define ST_MAGN_FS_AVL_15000MG …
#define ST_MAGN_FS_AVL_16000MG …
#define ST_MAGN_2_OUT_X_L_ADDR …
#define ST_MAGN_2_OUT_Y_L_ADDR …
#define ST_MAGN_2_OUT_Z_L_ADDR …
#define ST_MAGN_3_OUT_X_L_ADDR …
#define ST_MAGN_3_OUT_Y_L_ADDR …
#define ST_MAGN_3_OUT_Z_L_ADDR …
#define ST_MAGN_4_OUT_X_L_ADDR …
#define ST_MAGN_4_OUT_Y_L_ADDR …
#define ST_MAGN_4_OUT_Z_L_ADDR …
static const struct iio_mount_matrix *
st_magn_get_mount_matrix(const struct iio_dev *indio_dev,
const struct iio_chan_spec *chan)
{ … }
static const struct iio_chan_spec_ext_info st_magn_mount_matrix_ext_info[] = …;
static const struct iio_chan_spec st_magn_16bit_channels[] = …;
static const struct iio_chan_spec st_magn_2_16bit_channels[] = …;
static const struct iio_chan_spec st_magn_3_16bit_channels[] = …;
static const struct iio_chan_spec st_magn_4_16bit_channels[] = …;
static const struct st_sensor_settings st_magn_sensors_settings[] = …;
static const struct st_sensors_platform_data default_magn_pdata = …;
static int st_magn_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *ch, int *val,
int *val2, long mask)
{ … }
static int st_magn_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int val, int val2, long mask)
{ … }
static ST_SENSORS_DEV_ATTR_SAMP_FREQ_AVAIL();
static ST_SENSORS_DEV_ATTR_SCALE_AVAIL(in_magn_scale_available);
static struct attribute *st_magn_attributes[] = …;
static const struct attribute_group st_magn_attribute_group = …;
static const struct iio_info magn_info = …;
#ifdef CONFIG_IIO_TRIGGER
static const struct iio_trigger_ops st_magn_trigger_ops = …;
#define ST_MAGN_TRIGGER_OPS …
#else
#define ST_MAGN_TRIGGER_OPS …
#endif
const struct st_sensor_settings *st_magn_get_settings(const char *name)
{ … }
EXPORT_SYMBOL_NS(…);
int st_magn_common_probe(struct iio_dev *indio_dev)
{ … }
EXPORT_SYMBOL_NS(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_IMPORT_NS(…);