]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/SmbusHc.h
Code Scrub for Protocol and Ppi Definition
[mirror_edk2.git] / MdePkg / Include / Protocol / SmbusHc.h
index 019d226aea7f3cc34c914ed2c14024fd9a43aa73..59826b7e9bb81d0ad149ae3789ee14a92b65baac 100644 (file)
@@ -2,7 +2,7 @@
   The file provides basic SMBus host controller management \r
   and basic data transactions over the SMBus.\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
+  Copyright (c) 2006 - 2008, Intel Corporation                                                          \r
   All rights reserved. This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
@@ -34,12 +34,12 @@ typedef struct _EFI_SMBUS_HC_PROTOCOL EFI_SMBUS_HC_PROTOCOL;
   the SMBus slave devices accept this transaction or that this\r
   function returns with error. Status Codes Returned\r
   \r
-  @param This A pointer to the EFI_SMBUS_HC_PROTOCOL instance.\r
-              SlaveAddress The SMBus slave address of the device\r
-              with which to communicate. Type\r
-              EFI_SMBUS_DEVICE_ADDRESS is defined in\r
-              EFI_PEI_SMBUS_PPI.Execute() in the Platform\r
-              Initialization SMBus PPI Specification.\r
+  @param This     A pointer to the EFI_SMBUS_HC_PROTOCOL instance.\r
+                  SlaveAddress The SMBus slave address of the device\r
+                  with which to communicate. Type\r
+                  EFI_SMBUS_DEVICE_ADDRESS is defined in\r
+                  EFI_PEI_SMBUS_PPI.Execute() in the Platform\r
+                  Initialization SMBus PPI Specification.\r
 \r
   @param Command  This command is transmitted by the SMBus host\r
                   controller to the SMBus slave device and the\r
@@ -61,16 +61,16 @@ typedef struct _EFI_SMBUS_HC_PROTOCOL EFI_SMBUS_HC_PROTOCOL;
                   Platform Initialization SMBus PPI\r
                   Specification.\r
 \r
-  @param PecCheck   Defines if Packet Error Code (PEC) checking\r
-                    is required for this operation. SMBus Host\r
-                    Controller Code Definitions Version 1.0\r
-                    August 21, 2006 13 Length Signifies the\r
-                    number of bytes that this operation will do.\r
-                    The maximum number of bytes can be revision\r
-                    specific and operation specific. This field\r
-                    will contain the actual number of bytes that\r
-                    are executed for this operation. Not all\r
-                    operations require this argument.\r
+  @param PecCheck Defines if Packet Error Code (PEC) checking\r
+                  is required for this operation. SMBus Host\r
+                  Controller Code Definitions Version 1.0\r
+                  August 21, 2006 13 Length Signifies the\r
+                  number of bytes that this operation will do.\r
+                  The maximum number of bytes can be revision\r
+                  specific and operation specific. This field\r
+                  will contain the actual number of bytes that\r
+                  are executed for this operation. Not all\r
+                  operations require this argument.\r
 \r
   @param Buffer   Contains the value of data to execute to the\r
                   SMBus slave device. Not all operations require\r
@@ -78,28 +78,27 @@ typedef struct _EFI_SMBUS_HC_PROTOCOL EFI_SMBUS_HC_PROTOCOL;
                   identified by Length.\r
   \r
   \r
-  @retval EFI_SUCCESS   The last data that was returned from the\r
-                        access matched the poll exit criteria.\r
+  @retval EFI_SUCCESS           The last data that was returned from the\r
+                                access matched the poll exit criteria.\r
 \r
-  @retval EFI_CRC_ERROR Checksum is not correct (PEC is\r
-                        incorrect).\r
+  @retval EFI_CRC_ERROR         Checksum is not correct (PEC is incorrect).\r
 \r
-  @retval EFI_TIMEOUT   Timeout expired before the operation was\r
-                        completed. Timeout is determined by the\r
-                        SMBus host controller device.\r
+  @retval EFI_TIMEOUT           Timeout expired before the operation was\r
+                                completed. Timeout is determined by the\r
+                                SMBus host controller device.\r
 \r
   @retval EFI_OUT_OF_RESOURCES  The request could not be\r
                                 completed due to a lack of\r
                                 resources.\r
 \r
-  @retval EFI_DEVICE_ERROR  The request was not completed\r
-                            because a failure that was reflected\r
-                            in the Host Status Register bit.\r
-                            Device errors are a result of a\r
-                            transaction collision, illegal\r
-                            command field, unclaimed cycle (host\r
-                            initiated), or bus errors\r
-                            (collisions).\r
+  @retval EFI_DEVICE_ERROR      The request was not completed\r
+                                because a failure that was reflected\r
+                                in the Host Status Register bit.\r
+                                Device errors are a result of a\r
+                                transaction collision, illegal\r
+                                command field, unclaimed cycle (host\r
+                                initiated), or bus errors\r
+                                (collisions).\r
 \r
   @retval EFI_INVALID_PARAMETER Operation is not defined in\r
                                 EFI_SMBUS_OPERATION.\r
@@ -111,8 +110,8 @@ typedef struct _EFI_SMBUS_HC_PROTOCOL EFI_SMBUS_HC_PROTOCOL;
                                 outside the range of valid\r
                                 values.\r
 \r
-  @retval EFI_UNSUPPORTED   The SMBus operation or PEC is not\r
-                            supported. \r
+  @retval EFI_UNSUPPORTED       The SMBus operation or PEC is not\r
+                                supported. \r
 \r
   @retval EFI_BUFFER_TOO_SMALL  Buffer is not sufficient for\r
                                 this operation.\r
@@ -134,57 +133,54 @@ EFI_STATUS
 \r
 /**\r
    \r
-  The ArpDevice() function provides a standard way for a device driver to enumerate the entire\r
-  SMBus or specific devices on the bus.\r
-  \r
+  The ArpDevice() function provides a standard way for a device driver to \r
+  enumerate the entire SMBus or specific devices on the bus.\r
   \r
-  @param This A pointer to the EFI_SMBUS_HC_PROTOCOL instance.\r
-\r
-  @param ArpAll   A Boolean expression that indicates if the\r
-                  host drivers need to enumerate all the devices\r
-                  or enumerate only the device that is\r
-                  identified by SmbusUdid. If ArpAll is TRUE,\r
-                  SmbusUdid and SlaveAddress are optional. If\r
-                  ArpAll is FALSE, ArpDevice will enumerate\r
-                  SmbusUdid and the address will be at\r
-                  SlaveAddress.\r
-\r
-  @param SmbusUdid  The Unique Device Identifier (UDID) that is\r
-                    associated with this device. Type\r
-                    EFI_SMBUS_UDID is defined in\r
-                    EFI_PEI_SMBUS_PPI.ArpDevice() in the\r
-                    Platform Initialization SMBus PPI\r
-                    Specification.\r
+  @param This           A pointer to the EFI_SMBUS_HC_PROTOCOL instance.\r
+\r
+  @param ArpAll         A Boolean expression that indicates if the\r
+                        host drivers need to enumerate all the devices\r
+                        or enumerate only the device that is\r
+                        identified by SmbusUdid. If ArpAll is TRUE,\r
+                        SmbusUdid and SlaveAddress are optional. If\r
+                        ArpAll is FALSE, ArpDevice will enumerate\r
+                        SmbusUdid and the address will be at\r
+                        SlaveAddress.\r
+\r
+  @param SmbusUdid      The Unique Device Identifier (UDID) that is\r
+                        associated with this device. Type\r
+                        EFI_SMBUS_UDID is defined in\r
+                        EFI_PEI_SMBUS_PPI.ArpDevice() in the\r
+                        Platform Initialization SMBus PPI\r
+                        Specification.\r
 \r
   @param SlaveAddress   The SMBus slave address that is\r
                         associated with an SMBus UDID.\r
 \r
+  @retval EFI_SUCCESS           The last data that was returned from the\r
+                                access matched the poll exit criteria.\r
 \r
+  @retval EFI_CRC_ERROR         Checksum is not correct (PEC is\r
+                                incorrect).\r
 \r
-  @retval EFI_SUCCESS   The last data that was returned from the\r
-                        access matched the poll exit criteria.\r
-\r
-  @retval EFI_CRC_ERROR Checksum is not correct (PEC is\r
-                        incorrect).\r
-\r
-  @retval EFI_TIMEOUT   Timeout expired before the operation was\r
-                        completed. Timeout is determined by the\r
-                        SMBus host controller device.\r
+  @retval EFI_TIMEOUT           Timeout expired before the operation was\r
+                                completed. Timeout is determined by the\r
+                                SMBus host controller device.\r
 \r
   @retval EFI_OUT_OF_RESOURCES  The request could not be\r
                                 completed due to a lack of\r
                                 resources.\r
 \r
-  @retval EFI_DEVICE_ERROR  The request was not completed\r
-                            because a failure was reflected in\r
-                            the Host Status Register bit. Device\r
-                            Errors are a result of a transaction\r
-                            collision, illegal command field,\r
-                            unclaimed cycle (host initiated), or\r
-                            bus errors (collisions).\r
+  @retval EFI_DEVICE_ERROR      The request was not completed\r
+                                because a failure was reflected in\r
+                                the Host Status Register bit. Device\r
+                                Errors are a result of a transaction\r
+                                collision, illegal command field,\r
+                                unclaimed cycle (host initiated), or\r
+                                bus errors (collisions).\r
 \r
-  @retval EFI_UNSUPPORTED   ArpDevice, GetArpMap, and Notify are\r
-                            not implemented by this driver.\r
+  @retval EFI_UNSUPPORTED       ArpDevice, GetArpMap, and Notify are\r
+                                not implemented by this driver.\r
    \r
 **/\r
 typedef\r
@@ -198,20 +194,19 @@ EFI_STATUS
 \r
 \r
 /**\r
-  The GetArpMap() function returns the mapping of all the SMBus devices that were enumerated\r
-  by the SMBus host driver.\r
+  The GetArpMap() function returns the mapping of all the SMBus devices \r
+  that were enumerated by the SMBus host driver.\r
   \r
-  @param This A pointer to the EFI_SMBUS_HC_PROTOCOL instance.\r
+  @param This           A pointer to the EFI_SMBUS_HC_PROTOCOL instance.\r
   \r
-  @param Length   Size of the buffer that contains the SMBus\r
-                  device map.\r
+  @param Length         Size of the buffer that contains the SMBus\r
+                        device map.\r
   \r
   @param SmbusDeviceMap The pointer to the device map as\r
                         enumerated by the SMBus controller\r
                         driver.\r
   \r
-  @retval EFI_SUCCESS   The SMBus returned the current device\r
-                        map.\r
+  @retval EFI_SUCCESS       The SMBus returned the current device map.\r
   \r
   @retval EFI_UNSUPPORTED   ArpDevice, GetArpMap, and Notify are\r
                             not implemented by this driver.\r
@@ -225,11 +220,17 @@ EFI_STATUS
   IN OUT    EFI_SMBUS_DEVICE_MAP    **SmbusDeviceMap\r
 );\r
 \r
+/**\r
+  The notify function does some actions.\r
+  \r
+  @param SlaveAddress\r
+  The SMBUS hardware address to which the SMBUS device is preassigned or allocated.\r
 \r
-\r
-//\r
-// EFI_SMBUS_NOTIFY_FUNCTION\r
-//\r
+  @param Data\r
+  Data of the SMBus host notify command that the caller wants to be called.\r
+  \r
+  @return EFI_STATUS\r
+**/\r
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_SMBUS_NOTIFY_FUNCTION)(\r
@@ -244,20 +245,20 @@ EFI_STATUS
   allow the bus driver to call these functions when the \r
   SlaveAddress/Data pair happens.\r
   \r
-  @param  This A pointer to the EFI_SMBUS_HC_PROTOCOL instance.\r
+  @param  This            A pointer to the EFI_SMBUS_HC_PROTOCOL instance.\r
   \r
-  @param  SlaveAddress  Address that the host controller detects\r
-                        as sending a message and calls all the registered function.\r
+  @param  SlaveAddress    Address that the host controller detects\r
+                          as sending a message and calls all the registered function.\r
 \r
-  @param  Data  Data that the host controller detects as sending\r
-                message and calls all the registered function.\r
+  @param  Data            Data that the host controller detects as sending\r
+                          message and calls all the registered function.\r
 \r
 \r
   @param  NotifyFunction  The function to call when the bus\r
                           driver detects the SlaveAddress and\r
                           Data pair.\r
 \r
-  @retval EFI_SUCCESS   NotifyFunction was registered.\r
+  @retval EFI_SUCCESS       NotifyFunction was registered.\r
   \r
   @retval EFI_UNSUPPORTED   ArpDevice, GetArpMap, and Notify are\r
                             not implemented by this driver.\r
@@ -274,12 +275,13 @@ EFI_STATUS
 \r
 \r
 /**\r
+  @par Protocol Description:\r
   The EFI_SMBUS_HC_PROTOCOL provides SMBus host controller management and basic data\r
   transactions over SMBus. There is one EFI_SMBUS_HC_PROTOCOL instance for each SMBus\r
   host controller.\r
 \r
-  @param Execute  Executes the SMBus operation to an SMBus slave\r
-                  device. See the Execute() function description.\r
+  @param Execute    Executes the SMBus operation to an SMBus slave\r
+                    device. See the Execute() function description.\r
   \r
   @param ArpDevice  Allows an SMBus 2.0 device(s) to be Address\r
                     Resolution Protocol (ARP).\r