1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2019 TDK-InvenSense, Inc.
6 #ifndef INV_MPU_MAGN_H_
7 #define INV_MPU_MAGN_H_
9 #include <linux/kernel.h>
11 #include "inv_mpu_iio.h"
13 int inv_mpu_magn_probe(struct inv_mpu6050_state
*st
);
16 * inv_mpu_magn_get_scale() - get magnetometer scale value
17 * @st: driver internal state
19 * Returns IIO data format.
21 static inline int inv_mpu_magn_get_scale(const struct inv_mpu6050_state
*st
,
22 const struct iio_chan_spec
*chan
,
26 *val2
= st
->magn_raw_to_gauss
[chan
->address
];
27 return IIO_VAL_INT_PLUS_MICRO
;
30 int inv_mpu_magn_set_rate(const struct inv_mpu6050_state
*st
, int fifo_rate
);
32 int inv_mpu_magn_set_orient(struct inv_mpu6050_state
*st
);
34 int inv_mpu_magn_read(const struct inv_mpu6050_state
*st
, int axis
, int *val
);
36 #endif /* INV_MPU_MAGN_H_ */