1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 /* 3 * Copyright (C) 2026 InvenSense, Inc. 4 */ 5 6 #ifndef INV_ICM42607_TEMP_H_ 7 #define INV_ICM42607_TEMP_H_ 8 9 #include <linux/bitops.h> 10 11 struct iio_dev; 12 struct iio_chan_spec; 13 14 #define INV_ICM42607_TEMP_CHAN(_index) \ 15 { \ 16 .type = IIO_TEMP, \ 17 .info_mask_separate = \ 18 BIT(IIO_CHAN_INFO_RAW) | \ 19 BIT(IIO_CHAN_INFO_OFFSET) | \ 20 BIT(IIO_CHAN_INFO_SCALE), \ 21 .info_mask_shared_by_all = \ 22 BIT(IIO_CHAN_INFO_SAMP_FREQ), \ 23 .info_mask_shared_by_all_available = \ 24 BIT(IIO_CHAN_INFO_SAMP_FREQ), \ 25 .scan_index = _index, \ 26 .scan_type = { \ 27 .sign = 's', \ 28 .realbits = 16, \ 29 .storagebits = 16, \ 30 .endianness = IIO_BE, \ 31 }, \ 32 } 33 34 int inv_icm42607_temp_read_raw(struct iio_dev *indio_dev, 35 struct iio_chan_spec const *chan, 36 int *val, int *val2, long mask); 37 38 #endif 39