1 /*
2  * Copyright (c) 2016 Intel Corporation
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef ZEPHYR_DRIVERS_SENSOR_MAX44009_MAX44009_H_
8 #define ZEPHYR_DRIVERS_SENSOR_MAX44009_MAX44009_H_
9 
10 #include <zephyr/sys/util.h>
11 #include <zephyr/drivers/i2c.h>
12 
13 #define MAX44009_SAMPLING_CONTROL_BIT	BIT(7)
14 #define MAX44009_CONTINUOUS_SAMPLING	BIT(7)
15 #define MAX44009_SAMPLE_EXPONENT_SHIFT	12
16 #define MAX44009_MANTISSA_HIGH_NIBBLE_MASK	0xf00
17 #define MAX44009_MANTISSA_LOW_NIBBLE_MASK	0xf
18 
19 #define MAX44009_REG_CONFIG		0x02
20 #define MAX44009_REG_LUX_HIGH_BYTE	0x03
21 #define MAX44009_REG_LUX_LOW_BYTE	0x04
22 
23 struct max44009_data {
24 	uint16_t sample;
25 };
26 
27 struct max44009_config {
28 	struct i2c_dt_spec i2c;
29 };
30 
31 #endif /* _SENSOR_MAX44009_ */
32