/** @file\r
- The file provides basic SMBus host controller management \r
+ The file provides basic SMBus host controller management\r
and basic data transactions over the SMBus.\r
\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
- http://opensource.org/licenses/bsd-license.php \r
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+ 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
+ http://opensource.org/licenses/bsd-license.php\r
\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
@par Revision Reference: PI\r
Version 1.00.\r
typedef struct _EFI_SMBUS_HC_PROTOCOL EFI_SMBUS_HC_PROTOCOL;\r
\r
/**\r
- \r
+\r
The Execute() function provides a standard way to execute an\r
operation as defined in the System Management Bus (SMBus)\r
Specification. The resulting transaction will be either that\r
the SMBus slave devices accept this transaction or that this\r
- function returns with error. Status Codes Returned\r
- \r
+ function returns with error.\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_COMMAND is defined in\r
EFI_PEI_SMBUS_PPI.Execute() in the Platform\r
Initialization SMBus PPI Specification.\r
+\r
@param Operation Signifies the particular SMBus\r
hardware protocol instance it will use to\r
execute the SMBus transactions. This SMBus\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 \r
- \r
+ August 21, 2006 13\r
+\r
@param Length Signifies the 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
SMBus slave device. Not all operations require\r
this argument. The length of this buffer is\r
identified by Length.\r
- \r
- \r
+\r
+\r
@retval EFI_SUCCESS The last data that was returned from the\r
access matched the poll exit criteria.\r
\r
values.\r
\r
@retval EFI_UNSUPPORTED The SMBus operation or PEC is not\r
- supported. \r
+ supported.\r
\r
@retval EFI_BUFFER_TOO_SMALL Buffer is not sufficient for\r
this operation.\r
EFI_STATUS\r
(EFIAPI *EFI_SMBUS_HC_EXECUTE_OPERATION)(\r
IN CONST EFI_SMBUS_HC_PROTOCOL *This,\r
- IN CONST EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,\r
- IN CONST EFI_SMBUS_DEVICE_COMMAND Command,\r
- IN CONST EFI_SMBUS_OPERATION Operation,\r
- IN CONST BOOLEAN PecCheck,\r
+ IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,\r
+ IN EFI_SMBUS_DEVICE_COMMAND Command,\r
+ IN EFI_SMBUS_OPERATION Operation,\r
+ IN BOOLEAN PecCheck,\r
IN OUT UINTN *Length,\r
IN OUT VOID *Buffer\r
);\r
\r
\r
/**\r
- \r
- The ArpDevice() function provides a standard way for a device driver to \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
+\r
@param This A pointer to the EFI_SMBUS_HC_PROTOCOL instance.\r
\r
@param ArpAll A Boolean expression that indicates if the\r
\r
@retval EFI_UNSUPPORTED ArpDevice, GetArpMap, and Notify are\r
not implemented by this driver.\r
- \r
+\r
**/\r
typedef\r
EFI_STATUS\r
(EFIAPI *EFI_SMBUS_HC_PROTOCOL_ARP_DEVICE)(\r
IN CONST EFI_SMBUS_HC_PROTOCOL *This,\r
- IN CONST BOOLEAN ArpAll,\r
- IN CONST EFI_SMBUS_UDID *SmbusUdid, OPTIONAL\r
+ IN BOOLEAN ArpAll,\r
+ IN EFI_SMBUS_UDID *SmbusUdid, OPTIONAL\r
IN OUT EFI_SMBUS_DEVICE_ADDRESS *SlaveAddress OPTIONAL\r
);\r
\r
\r
/**\r
- The GetArpMap() function returns the mapping of all the SMBus devices \r
+ The GetArpMap() function returns the mapping of all the SMBus devices\r
that were enumerated by the SMBus host driver.\r
- \r
+\r
@param This A pointer to the EFI_SMBUS_HC_PROTOCOL instance.\r
- \r
+\r
@param Length Size of the buffer that contains the SMBus\r
device map.\r
- \r
+\r
@param SmbusDeviceMap The pointer to the device map as\r
enumerated by the SMBus controller\r
driver.\r
- \r
+\r
@retval EFI_SUCCESS The SMBus returned the current device map.\r
- \r
+\r
@retval EFI_UNSUPPORTED ArpDevice, GetArpMap, and Notify are\r
not implemented by this driver.\r
- \r
+\r
**/\r
typedef\r
EFI_STATUS\r
\r
/**\r
The notify function does some actions.\r
- \r
+\r
@param SlaveAddress\r
The SMBUS hardware address to which the SMBUS device is preassigned or allocated.\r
\r
@param Data\r
Data of the SMBus host notify command that the caller wants to be called.\r
- \r
+\r
@return EFI_STATUS\r
**/\r
typedef\r
EFI_STATUS\r
(EFIAPI *EFI_SMBUS_NOTIFY_FUNCTION)(\r
- IN CONST EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,\r
- IN CONST UINTN Data\r
+ IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,\r
+ IN UINTN Data\r
);\r
\r
\r
/**\r
- \r
+\r
The Notify() function registers all the callback functions to\r
- allow the bus driver to call these functions when the \r
+ allow the bus driver to call these functions when the\r
SlaveAddress/Data pair happens.\r
- \r
+\r
@param This A pointer to the EFI_SMBUS_HC_PROTOCOL instance.\r
- \r
+\r
@param SlaveAddress Address that the host controller detects\r
- as sending a message, and that calls all the registered function.\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 that calls all the registered function.\r
+ message and calls all the registered function.\r
\r
\r
@param NotifyFunction The function to call when the bus\r
Data pair.\r
\r
@retval EFI_SUCCESS NotifyFunction was registered.\r
- \r
+\r
@retval EFI_UNSUPPORTED ArpDevice, GetArpMap, and Notify are\r
not implemented by this driver.\r
\r
EFI_STATUS\r
(EFIAPI *EFI_SMBUS_HC_PROTOCOL_NOTIFY)(\r
IN CONST EFI_SMBUS_HC_PROTOCOL *This,\r
- IN CONST EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,\r
- IN CONST UINTN Data,\r
- IN CONST EFI_SMBUS_NOTIFY_FUNCTION NotifyFunction\r
+ IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,\r
+ IN UINTN Data,\r
+ IN EFI_SMBUS_NOTIFY_FUNCTION NotifyFunction\r
);\r
\r
\r