]>
Commit | Line | Data |
---|---|---|
f739fcd8 | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
05ef48a2 | 2 | /* |
df31fedd | 3 | * Internal structures for the EFI driver binding protocol |
05ef48a2 HS |
4 | * |
5 | * Copyright (c) 2017 Heinrich Schuchardt | |
05ef48a2 HS |
6 | */ |
7 | ||
8 | #ifndef _EFI_DRIVER_H | |
9 | #define _EFI_DRIVER_H 1 | |
10 | ||
05ef48a2 HS |
11 | #include <efi_loader.h> |
12 | ||
ec4f675f HS |
13 | /** |
14 | * struct efi_driver_binding_extended_protocol - extended driver binding protocol | |
15 | * | |
16 | * This structure adds internal fields to the driver binding protocol. | |
17 | * | |
18 | * @bp: driver binding protocol | |
19 | * @ops: operations supported by the driver | |
20 | */ | |
21 | struct efi_driver_binding_extended_protocol { | |
22 | struct efi_driver_binding_protocol bp; | |
23 | const struct efi_driver_ops *ops; | |
24 | }; | |
25 | ||
df31fedd HS |
26 | /** |
27 | * struct efi_driver_ops - operations support by an EFI driver | |
0850d7f7 | 28 | * |
df31fedd | 29 | * @protocol: The GUID of the protocol which is consumed by the |
0850d7f7 HS |
30 | * driver. This GUID is used by the EFI uclass in the |
31 | * supports() and start() methods of the | |
32 | * EFI_DRIVER_BINDING_PROTOCOL. | |
df31fedd | 33 | * @child_protocol: Protocol supported by the child handles generated by |
0850d7f7 | 34 | * the EFI driver. |
8f8fe1d4 HS |
35 | * @init: Function called by the EFI uclass after installing the |
36 | * driver binding protocol. | |
df31fedd | 37 | * @bind: Function called by the EFI uclass to attach the |
0850d7f7 HS |
38 | * driver to EFI driver to a handle. |
39 | */ | |
05ef48a2 HS |
40 | struct efi_driver_ops { |
41 | const efi_guid_t *protocol; | |
42 | const efi_guid_t *child_protocol; | |
8f8fe1d4 | 43 | efi_status_t (*init)(struct efi_driver_binding_extended_protocol *this); |
ec4f675f HS |
44 | efi_status_t (*bind)(struct efi_driver_binding_extended_protocol *this, |
45 | efi_handle_t handle, void *interface); | |
05ef48a2 HS |
46 | }; |
47 | ||
48 | #endif /* _EFI_DRIVER_H */ |