u-boot/board/ge/common/vpd_reader.h
Tom Rini 03de305ec4 Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"
As part of bringing the master branch back in to next, we need to allow
for all of these changes to exist here.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-20 13:35:03 -06:00

37 lines
1.1 KiB
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright 2016 General Electric Company
*/
#include <linux/types.h>
struct vpd_cache;
/*
* Read VPD from given data, verify content, call callback for each vital
* product data block.
*
* cache: structure used by process block to store VPD information
* process_block: callback called for each VPD data block
*
* Returns Non-zero on error. Negative numbers encode errno.
*/
int read_i2c_vpd(struct vpd_cache *cache,
int (*process_block)(struct vpd_cache *, u8 id, u8 version,
u8 type, size_t size, u8 const *data));
/*
* Read VPD from given data, verify content, call callback for each vital
* product data block.
*
* size: size of the raw VPD data in bytes
* data: raw VPD data read from device
* cache: structure used by process block to store VPD information
* process_block: callback called for each VPD data block
*
* Returns Non-zero on error. Negative numbers encode errno.
*/
int vpd_reader(size_t size, u8 *data, struct vpd_cache *cache,
int (*process_block)(struct vpd_cache *, u8 id, u8 version, u8 type,
size_t size, u8 const *data));