1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2015-2021, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  *
7  * Description:
8  *     DesignWare DW_apb_i2c I2C controller
9  */
10 
11 #ifndef MOD_DW_APB_I2C_H
12 #define MOD_DW_APB_I2C_H
13 
14 #include <fwk_id.h>
15 #include <fwk_module_idx.h>
16 
17 #include <stdint.h>
18 
19 /*!
20  * \addtogroup GroupModules Modules
21  * \{
22  */
23 
24 /*!
25  * \defgroup GroupModuleI2CController I2C Controller
26  *
27  * \brief Driver for I2C device.
28  * \{
29  */
30 
31 /*!
32  * \brief Element configuration
33  */
34 struct mod_dw_apb_i2c_dev_config {
35     /*!
36      * \brief Identifier of the timer
37      *
38      * \details The timer is used to wait on the I2C bus status.
39      */
40     fwk_id_t timer_id;
41     /*! Interrupt number of the I2C device */
42     unsigned int i2c_irq;
43     /*! Base address of the I2C device registers */
44     uintptr_t reg;
45 };
46 
47 /*! API indices */
48 enum mod_dw_apb_i2c_api_idx {
49     MOD_DW_APB_I2C_API_IDX_DRIVER,
50     MOD_DW_APB_I2C_API_IDX_COUNT,
51 };
52 
53 /*! Identifier for the I2C driver API */
54 static const fwk_id_t mod_dw_apb_i2c_api_id_driver = FWK_ID_API_INIT(
55     FWK_MODULE_IDX_DW_APB_I2C, MOD_DW_APB_I2C_API_IDX_DRIVER);
56 
57 /*!
58  * \}
59  */
60 
61 /*!
62  * \}
63  */
64 
65 #endif /* MOD_DW_APB_I2C_H */
66