1bc3eb020SJean-Baptiste Maneyrol /* SPDX-License-Identifier: GPL-2.0-or-later */ 2bc3eb020SJean-Baptiste Maneyrol /* 3bc3eb020SJean-Baptiste Maneyrol * Copyright (C) 2020 Invensense, Inc. 4bc3eb020SJean-Baptiste Maneyrol */ 5bc3eb020SJean-Baptiste Maneyrol 6bc3eb020SJean-Baptiste Maneyrol #ifndef INV_ICM42600_TEMP_H_ 7bc3eb020SJean-Baptiste Maneyrol #define INV_ICM42600_TEMP_H_ 8bc3eb020SJean-Baptiste Maneyrol 9bc3eb020SJean-Baptiste Maneyrol #include <linux/iio/iio.h> 10bc3eb020SJean-Baptiste Maneyrol 11bc3eb020SJean-Baptiste Maneyrol #define INV_ICM42600_TEMP_CHAN(_index) \ 12bc3eb020SJean-Baptiste Maneyrol { \ 13bc3eb020SJean-Baptiste Maneyrol .type = IIO_TEMP, \ 14bc3eb020SJean-Baptiste Maneyrol .info_mask_separate = \ 15bc3eb020SJean-Baptiste Maneyrol BIT(IIO_CHAN_INFO_RAW) | \ 16bc3eb020SJean-Baptiste Maneyrol BIT(IIO_CHAN_INFO_OFFSET) | \ 17bc3eb020SJean-Baptiste Maneyrol BIT(IIO_CHAN_INFO_SCALE), \ 18bc3eb020SJean-Baptiste Maneyrol .scan_index = _index, \ 19bc3eb020SJean-Baptiste Maneyrol .scan_type = { \ 20bc3eb020SJean-Baptiste Maneyrol .sign = 's', \ 21bc3eb020SJean-Baptiste Maneyrol .realbits = 16, \ 22bc3eb020SJean-Baptiste Maneyrol .storagebits = 16, \ 23bc3eb020SJean-Baptiste Maneyrol }, \ 24bc3eb020SJean-Baptiste Maneyrol } 25bc3eb020SJean-Baptiste Maneyrol 26bc3eb020SJean-Baptiste Maneyrol int inv_icm42600_temp_read_raw(struct iio_dev *indio_dev, 27bc3eb020SJean-Baptiste Maneyrol struct iio_chan_spec const *chan, 28bc3eb020SJean-Baptiste Maneyrol int *val, int *val2, long mask); 29bc3eb020SJean-Baptiste Maneyrol 30bc3eb020SJean-Baptiste Maneyrol #endif 31