Merge tag 'regmap-fix-v5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux/fpc-iii.git] / drivers / crypto / qat / qat_common / adf_cfg.h
blob376cde61a60ea7094444103c0dfccd47a417efb8
1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0-only) */
2 /* Copyright(c) 2014 - 2020 Intel Corporation */
3 #ifndef ADF_CFG_H_
4 #define ADF_CFG_H_
6 #include <linux/list.h>
7 #include <linux/rwsem.h>
8 #include <linux/debugfs.h>
9 #include "adf_accel_devices.h"
10 #include "adf_cfg_common.h"
11 #include "adf_cfg_strings.h"
13 struct adf_cfg_key_val {
14 char key[ADF_CFG_MAX_KEY_LEN_IN_BYTES];
15 char val[ADF_CFG_MAX_VAL_LEN_IN_BYTES];
16 enum adf_cfg_val_type type;
17 struct list_head list;
20 struct adf_cfg_section {
21 char name[ADF_CFG_MAX_SECTION_LEN_IN_BYTES];
22 struct list_head list;
23 struct list_head param_head;
26 struct adf_cfg_device_data {
27 struct list_head sec_list;
28 struct dentry *debug;
29 struct rw_semaphore lock;
32 int adf_cfg_dev_add(struct adf_accel_dev *accel_dev);
33 void adf_cfg_dev_remove(struct adf_accel_dev *accel_dev);
34 int adf_cfg_section_add(struct adf_accel_dev *accel_dev, const char *name);
35 void adf_cfg_del_all(struct adf_accel_dev *accel_dev);
36 int adf_cfg_add_key_value_param(struct adf_accel_dev *accel_dev,
37 const char *section_name,
38 const char *key, const void *val,
39 enum adf_cfg_val_type type);
40 int adf_cfg_get_param_value(struct adf_accel_dev *accel_dev,
41 const char *section, const char *name, char *value);
43 #endif