2 This file implements the entrypoint and unload function for I2C DXE module.
4 Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
12 The user Entry Point for I2C module. The user code starts with this function.
14 @param[in] ImageHandle The firmware allocated handle for the EFI image.
15 @param[in] SystemTable A pointer to the EFI System Table.
17 @retval EFI_SUCCESS The entry point is executed successfully.
18 @retval other Some error occurs when executing this entry point.
24 IN EFI_HANDLE ImageHandle
,
25 IN EFI_SYSTEM_TABLE
*SystemTable
31 // Install driver model protocol(s).
33 Status
= InitializeI2cHost ( ImageHandle
, SystemTable
);
34 if ( !EFI_ERROR ( Status
))
36 Status
= InitializeI2cBus ( ImageHandle
, SystemTable
);
42 This is the unload handle for I2C module.
44 Disconnect the driver specified by ImageHandle from all the devices in the handle database.
45 Uninstall all the protocols installed in the driver entry point.
47 @param[in] ImageHandle The drivers' driver image.
49 @retval EFI_SUCCESS The image is unloaded.
50 @retval Others Failed to unload the image.
56 IN EFI_HANDLE ImageHandle
62 // Disconnect the drivers
64 Status
= I2cBusUnload ( ImageHandle
);
65 if ( !EFI_ERROR ( Status
)) {
66 Status
= I2cHostUnload ( ImageHandle
);