1 /*
2  * Copyright (c) 2023 Google, LLC
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 
6 #ifndef ZEPHYR_INCLUDE_DRIVERS_MFD_NCT38XX_H_
7 #define ZEPHYR_INCLUDE_DRIVERS_MFD_NCT38XX_H_
8 
9 #include <zephyr/device.h>
10 #include <zephyr/drivers/i2c.h>
11 #include <zephyr/kernel.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 /**
18  * @brief Get the semaphore reference for a NCT38xx instance. Callers
19  * should pass the return value to k_sem_take/k_sem_give
20  *
21  * @param[in] dev     Pointer to device struct of the driver instance
22  *
23  * @return Address of the semaphore
24  */
25 struct k_sem *mfd_nct38xx_get_lock_reference(const struct device *dev);
26 
27 /**
28  * @brief Get the I2C DT spec reference for a NCT38xx instance.
29  *
30  * @param[in] dev     Pointer to device struct of the driver instance
31  *
32  * @return Address of the I2C DT spec
33  */
34 const struct i2c_dt_spec *mfd_nct38xx_get_i2c_dt_spec(const struct device *dev);
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 
40 #endif /* ZEPHYR_INCLUDE_DRIVERS_MFD_NCT38XX_H_ */
41