1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2022 Google, Inc.
4 * Written by Andrew Scull <ascull@google.com>
7 #ifndef __FUZZING_ENGINE_H
8 #define __FUZZING_ENGINE_H
13 * dm_fuzzing_engine_get_input() - get an input from the fuzzing engine device
15 * The function will return a pointer to the input data and the size of the
16 * data pointed to. The pointer will remain valid until the next invocation of
19 * @dev: fuzzing engine device
20 * @data: output pointer to input data
21 * @size output size of input data
22 * Return: 0 if OK, -ve on error
24 int dm_fuzzing_engine_get_input(struct udevice *dev,
29 * struct dm_fuzzing_engine_ops - operations for the fuzzing engine uclass
31 * This contains the functions implemented by a fuzzing engine device.
33 struct dm_fuzzing_engine_ops {
35 * @get_input() - get an input
37 * The function will return a pointer to the input data and the size of
38 * the data pointed to. The pointer will remain valid until the next
39 * invocation of this function.
41 * @get_input.dev: fuzzing engine device
42 * @get_input.data: output pointer to input data
43 * @get_input.size output size of input data
44 * @get_input.Return: 0 if OK, -ve on error
46 int (*get_input)(struct udevice *dev,
51 #endif /* __FUZZING_ENGINE_H */