File Index
Files and directories
Sign in
FILE

adf_cfg.h

File preview with syntax highlighting.

linux-6.19.14/drivers/crypto/intel/qat/qat_common/adf_cfg.h C
 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_
 5
 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"
12
13struct 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;
18};
19
20struct adf_cfg_section {
21	char name[ADF_CFG_MAX_SECTION_LEN_IN_BYTES];
22	struct list_head list;
23	struct list_head param_head;
24};
25
26struct adf_cfg_device_data {
27	struct list_head sec_list;
28	struct dentry *debug;
29	struct rw_semaphore lock;
30};
31
32int adf_cfg_dev_add(struct adf_accel_dev *accel_dev);
33void adf_cfg_dev_remove(struct adf_accel_dev *accel_dev);
34void adf_cfg_dev_dbgfs_add(struct adf_accel_dev *accel_dev);
35void adf_cfg_dev_dbgfs_rm(struct adf_accel_dev *accel_dev);
36int adf_cfg_section_add(struct adf_accel_dev *accel_dev, const char *name);
37void adf_cfg_del_all(struct adf_accel_dev *accel_dev);
38void adf_cfg_del_all_except(struct adf_accel_dev *accel_dev,
39			    const char *section_name);
40int adf_cfg_add_key_value_param(struct adf_accel_dev *accel_dev,
41				const char *section_name,
42				const char *key, const void *val,
43				enum adf_cfg_val_type type);
44int adf_cfg_get_param_value(struct adf_accel_dev *accel_dev,
45			    const char *section, const char *name, char *value);
46
47#endif
~/ Read-only file preview.