• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #ifndef HDF_DRIVER_H
10 #define HDF_DRIVER_H
11 
12 #include "hdf_device_desc.h"
13 #include "hdf_dlist.h"
14 
15 struct HdfDriver {
16     const struct HdfDriverEntry *entry;
17     uint16_t type;
18     uint16_t bus;
19     struct DListHead node;
20     void *priv;
21 };
22 
23 int32_t HdfRegisterDriverEntry(const struct HdfDriverEntry *entry);
24 int32_t HdfUnregisterDriverEntry(const struct HdfDriverEntry *entry);
25 int32_t HdfRegisterDriver(struct HdfDriver *driver);
26 int32_t HdfUnregisterDriver(struct HdfDriver *driver);
27 struct HdfDriver *HdfDriverManagerGetDriver(const char *driverName);
28 struct DListHead *HdfDriverManagerGetDriverList(void);
29 
30 #endif // HDF_DRIVER_H