]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2TbltDevicePkg/Include/Protocol/I2cAcpi.h
ArmPkg/CompilerIntrinsicsLib: Add uread, uwrite GCC assembly sources
[mirror_edk2.git] / Vlv2TbltDevicePkg / Include / Protocol / I2cAcpi.h
CommitLineData
3cbfba02
DW
1/*++\r
2\r
3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
4 \r\r
9dc8036d
MK
5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
3cbfba02
DW
7 \r\r
8\r
9\r
10**/\r
11\r
12#ifndef __I2C_ACPI_H__\r
13#define __I2C_ACPI_H__\r
14\r
15#include <Protocol/DevicePath.h>\r
16\r
17//\r
18// I2C ACPI protocol\r
19//\r
20typedef struct _EFI_I2C_ACPI_PROTOCOL EFI_I2C_ACPI_PROTOCOL;\r
21\r
22//\r
23// I2C device description\r
24//\r
25// This structure provides the platform specific information which\r
26// describes an I2C device.\r
27//\r
28typedef struct {\r
29 //\r
30 // Hardware revision - ACPI _HRV value\r
31 //\r
32 UINT32 HardwareRevision;\r
33\r
34 //\r
35 // Device path node for the I2C device.\r
36 //\r
37 CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
38\r
39 //\r
40 // I2C bus configuration for the I2C device.\r
41 //\r
42 UINT32 I2cBusConfiguration;\r
43\r
44 //\r
45 // Number of slave addresses for the I2C device.\r
46 //\r
47 UINT32 SlaveAddressCount;\r
48\r
49 //\r
50 // Address of the array of slave addresses for the I2C device.\r
51 //\r
52 CONST UINT32 *SlaveAddressArray;\r
53}EFI_I2C_DEVICE;\r
54\r
55\r
56/**\r
57 Enumerate the I2C devices\r
58\r
59 This routine must be called at or below TPL_NOTIFY.\r
60\r
61 This function walks the platform specific data to enumerates the\r
62 I2C devices on an I2C bus.\r
63\r
64 @param[in] This Address of an EFI_I2C_ENUM_PROTOCOL\r
65 structure.\r
66 @param[in, out] Device Buffer containing the address of an\r
67 EFI_I2C_DEVICE structure. Enumeration\r
68 is started by setting the initial\r
69 EFI_I2C_DEVICE structure address to NULL.\r
70 The buffer receives an EFI_I2C_DEVICE\r
71 structure address for the next I2C device.\r
72\r
73 @retval EFI_SUCCESS The platform data for the next device\r
74 on the I2C bus was returned successfully.\r
75 @retval EFI_INVALID_PARAMETER NextDevice was NULL\r
76 @retval EFI_NO_MAPPING PreviousDevice does not point to a valid\r
77 EFI_I2C_DEVICE structure.\r
78\r
79**/\r
80typedef\r
81EFI_STATUS\r
82(EFIAPI *EFI_I2C_ACPI_ENUMERATE) (\r
83 IN CONST EFI_I2C_ACPI_PROTOCOL *This,\r
84 IN OUT CONST EFI_I2C_DEVICE **Device\r
85 );\r
86\r
87//\r
88// I2C device description\r
89//\r
90// This structure provides the platform specific information which\r
91// describes an I2C device.\r
92//\r
93struct _EFI_I2C_ACPI_PROTOCOL {\r
94 //\r
95 // Walk the platform's list of I2C devices on the bus. This\r
96 // routine returns the next I2C device in the platform's list\r
97 // for this I2C bus.\r
98 //\r
99 EFI_I2C_ACPI_ENUMERATE Enumerate;\r
100};\r
101\r
102//\r
103// Variable containing the GUID for the I2C device enumeration protocol\r
104//\r
105extern EFI_GUID gEfiI2cAcpiProtocolGuid;\r
106\r
107#endif // __I2C_ACPI_H__\r