+++ /dev/null
-/*++\r
-\r
- Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
- \r\r
- SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
- \r\r
-\r
-\r
-**/\r
-\r
-#ifndef __I2C_ACPI_H__\r
-#define __I2C_ACPI_H__\r
-\r
-#include <Protocol/DevicePath.h>\r
-\r
-//\r
-// I2C ACPI protocol\r
-//\r
-typedef struct _EFI_I2C_ACPI_PROTOCOL EFI_I2C_ACPI_PROTOCOL;\r
-\r
-//\r
-// I2C device description\r
-//\r
-// This structure provides the platform specific information which\r
-// describes an I2C device.\r
-//\r
-typedef struct {\r
- //\r
- // Hardware revision - ACPI _HRV value\r
- //\r
- UINT32 HardwareRevision;\r
-\r
- //\r
- // Device path node for the I2C device.\r
- //\r
- CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
-\r
- //\r
- // I2C bus configuration for the I2C device.\r
- //\r
- UINT32 I2cBusConfiguration;\r
-\r
- //\r
- // Number of slave addresses for the I2C device.\r
- //\r
- UINT32 SlaveAddressCount;\r
-\r
- //\r
- // Address of the array of slave addresses for the I2C device.\r
- //\r
- CONST UINT32 *SlaveAddressArray;\r
-}EFI_I2C_DEVICE;\r
-\r
-\r
-/**\r
- Enumerate the I2C devices\r
-\r
- This routine must be called at or below TPL_NOTIFY.\r
-\r
- This function walks the platform specific data to enumerates the\r
- I2C devices on an I2C bus.\r
-\r
- @param[in] This Address of an EFI_I2C_ENUM_PROTOCOL\r
- structure.\r
- @param[in, out] Device Buffer containing the address of an\r
- EFI_I2C_DEVICE structure. Enumeration\r
- is started by setting the initial\r
- EFI_I2C_DEVICE structure address to NULL.\r
- The buffer receives an EFI_I2C_DEVICE\r
- structure address for the next I2C device.\r
-\r
- @retval EFI_SUCCESS The platform data for the next device\r
- on the I2C bus was returned successfully.\r
- @retval EFI_INVALID_PARAMETER NextDevice was NULL\r
- @retval EFI_NO_MAPPING PreviousDevice does not point to a valid\r
- EFI_I2C_DEVICE structure.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_I2C_ACPI_ENUMERATE) (\r
- IN CONST EFI_I2C_ACPI_PROTOCOL *This,\r
- IN OUT CONST EFI_I2C_DEVICE **Device\r
- );\r
-\r
-//\r
-// I2C device description\r
-//\r
-// This structure provides the platform specific information which\r
-// describes an I2C device.\r
-//\r
-struct _EFI_I2C_ACPI_PROTOCOL {\r
- //\r
- // Walk the platform's list of I2C devices on the bus. This\r
- // routine returns the next I2C device in the platform's list\r
- // for this I2C bus.\r
- //\r
- EFI_I2C_ACPI_ENUMERATE Enumerate;\r
-};\r
-\r
-//\r
-// Variable containing the GUID for the I2C device enumeration protocol\r
-//\r
-extern EFI_GUID gEfiI2cAcpiProtocolGuid;\r
-\r
-#endif // __I2C_ACPI_H__\r