linux/drivers/iio/imu/inv_mpu6050/inv_mpu_aux.h
Jean-Baptiste Maneyrol 16ef433769 iio: imu: inv_mpu6050: helpers for using i2c master on auxiliary bus
Add helper functions to use the i2c auxiliary bus with the MPU i2c
master block.

Support only register based chip, reading and 1 byte writing. These
will be useful for initializing magnetometers inside MPU9x50 chips.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-10-05 12:06:16 +01:00

20 lines
479 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2019 TDK-InvenSense, Inc.
*/
#ifndef INV_MPU_AUX_H_
#define INV_MPU_AUX_H_
#include "inv_mpu_iio.h"
int inv_mpu_aux_init(const struct inv_mpu6050_state *st);
int inv_mpu_aux_read(const struct inv_mpu6050_state *st, uint8_t addr,
uint8_t reg, uint8_t *val, size_t size);
int inv_mpu_aux_write(const struct inv_mpu6050_state *st, uint8_t addr,
uint8_t reg, uint8_t val);
#endif /* INV_MPU_AUX_H_ */