Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * Copyright (C) 2020 Invensense, Inc.
0004  */
0005 
0006 #ifndef INV_ICM42600_TEMP_H_
0007 #define INV_ICM42600_TEMP_H_
0008 
0009 #include <linux/iio/iio.h>
0010 
0011 #define INV_ICM42600_TEMP_CHAN(_index)                  \
0012     {                               \
0013         .type = IIO_TEMP,                   \
0014         .info_mask_separate =                   \
0015             BIT(IIO_CHAN_INFO_RAW) |            \
0016             BIT(IIO_CHAN_INFO_OFFSET) |         \
0017             BIT(IIO_CHAN_INFO_SCALE),           \
0018         .scan_index = _index,                   \
0019         .scan_type = {                      \
0020             .sign = 's',                    \
0021             .realbits = 16,                 \
0022             .storagebits = 16,              \
0023         },                          \
0024     }
0025 
0026 int inv_icm42600_temp_read_raw(struct iio_dev *indio_dev,
0027                    struct iio_chan_spec const *chan,
0028                    int *val, int *val2, long mask);
0029 
0030 #endif