hw/arm: Extract at24c_eeprom_init helper from Aspeed and Nuvoton boards
[qemu/kevin.git] / include / hw / nvram / eeprom_at24c.h
blob196db309d451a136de7accdebce89f5c2d71b95a
1 /*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
4 * SPDX-License-Identifier: GPL-2.0-only
5 */
7 #ifndef EEPROM_AT24C_H
8 #define EEPROM_AT24C_H
10 #include "hw/i2c/i2c.h"
13 * Create and realize an AT24C EEPROM device on the heap.
14 * @bus: I2C bus to put it on
15 * @address: I2C address of the EEPROM slave when put on a bus
16 * @rom_size: size of the EEPROM
18 * Create the device state structure, initialize it, put it on the specified
19 * @bus, and drop the reference to it (the device is realized).
21 I2CSlave *at24c_eeprom_init(I2CBus *bus, uint8_t address, uint32_t rom_size);
23 #endif