X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FDxeSmbusLib%2FDxeSmbusLib.c;h=8ffa9c7aba6837d9a74a9558844e5ab223904100;hp=18a7973f21226877f8f465ab01a16239c717080a;hb=bad463843cc0ccef85901fa5f08ea498994f3c5f;hpb=af05f8b667db383a68e7d37ae502755b662bdd70 diff --git a/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.c b/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.c index 18a7973f21..8ffa9c7aba 100644 --- a/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.c +++ b/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.c @@ -2,37 +2,37 @@ Implementation of SmBusLib class library for PEI phase. Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +All rights reserved. This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Module Name: DxeSmbusLib.c **/ + #include "InternalSmbusLib.h" -#include // // Globle varible to cache pointer to Smbus protocol. // -STATIC EFI_SMBUS_HC_PROTOCOL *mSmbus = NULL; +STATIC EFI_SMBUS_HC_PROTOCOL *mSmbus = NULL; /** The constructor function caches the pointer to Smbus protocol. - + The constructor function locates Smbus protocol from protocol database. - It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. + It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. **/ @@ -44,7 +44,7 @@ SmbusLibConstructor ( ) { EFI_STATUS Status; - + Status = gBS->LocateProtocol (&gEfiSmbusHcProtocolGuid, NULL, (VOID**) &mSmbus); ASSERT_EFI_ERROR (Status); ASSERT (mSmbus != NULL); @@ -53,7 +53,7 @@ SmbusLibConstructor ( } /** - Executes an SMBus operation to an SMBus controller. + Executes an SMBus operation to an SMBus controller. This function provides a standard way to execute Smbus script as defined in the SmBus Specification. The data can either be of @@ -92,7 +92,7 @@ InternalSmBusExec ( SmbusDeviceAddress, SMBUS_LIB_COMMAND (SmBusAddress), SmbusOperation, - SMBUS_LIB_PEC (SmBusAddress), + SMBUS_LIB_PEC (SmBusAddress), &Length, Buffer );