Tobias Waldekranz | c41e209 | 2023-02-16 16:33:49 +0100 | [diff] [blame^] | 1 | /* 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 | */ |
| 16 | struct 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 | */ |
| 25 | int 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 | */ |
| 33 | int blkmap_destroy(struct udevice *dev); |
| 34 | |
| 35 | #endif /* _BLKMAP_H */ |