blob: 3c7e36efabcfc06a74326f21271dda3a9760c0cf [file] [log] [blame]
Tobias Waldekranzc41e2092023-02-16 16:33:49 +01001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (c) 2023 Addiva Elektronik
4 * Author: Tobias Waldekranz <tobias@waldekranz.com>
5 */
6
7#ifndef _BLKMAP_H
8#define _BLKMAP_H
9
10/**
11 * blkmap_from_label() - Find blkmap from label
12 *
13 * @label: Label of the requested blkmap
14 * Returns: A pointer to the blkmap on success, NULL on failure
15 */
16struct udevice *blkmap_from_label(const char *label);
17
18/**
19 * blkmap_create() - Create new blkmap
20 *
21 * @label: Label of the new blkmap
22 * @devp: If not NULL, updated with the address of the resulting device
23 * Returns: 0 on success, negative error code on failure
24 */
25int blkmap_create(const char *label, struct udevice **devp);
26
27/**
28 * blkmap_destroy() - Destroy blkmap
29 *
30 * @dev: The blkmap to be destroyed
31 * Returns: 0 on success, negative error code on failure
32 */
33int blkmap_destroy(struct udevice *dev);
34
35#endif /* _BLKMAP_H */