1 /*
2  * Copyright (c) 2023 Intel Corporation.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef ZEPHYR_INCLUDE_SPHY_3D_SENSOR_H_
8 #define ZEPHYR_INCLUDE_SPHY_3D_SENSOR_H_
9 
10 #include <zephyr/device.h>
11 #include <zephyr/drivers/sensor.h>
12 
13 #define PHY_3D_SENSOR_CHANNEL_NUM 3
14 
15 struct phy_3d_sensor_custom {
16 	const enum sensor_channel chan_all;
17 	const int8_t shift;
18 	void (*q31_to_sensor_value)(q31_t q31, struct sensor_value *val);
19 	q31_t (*sensor_value_to_q31)(struct sensor_value *val);
20 };
21 
22 struct phy_3d_sensor_data {
23 	struct sensor_value sensitivities[PHY_3D_SENSOR_CHANNEL_NUM];
24 	const struct phy_3d_sensor_custom **customs;
25 	struct rtio_iodev_sqe *sqes;
26 };
27 
28 struct phy_3d_sensor_config {
29 	const struct device *hw_dev;
30 	const int sensor_num;
31 	const int32_t sensor_types[];
32 };
33 
34 #endif
35