xref: /qemu/include/hw/nvram/eeprom_at24c.h (revision 9618ebae453f2492a60e741d40f5212103f48ad3)
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * SPDX-License-Identifier: GPL-2.0-only
5  */
6 
7 #ifndef EEPROM_AT24C_H
8 #define EEPROM_AT24C_H
9 
10 #include "hw/i2c/i2c.h"
11 
12 /*
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
17  *
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).
20  */
21 I2CSlave *at24c_eeprom_init(I2CBus *bus, uint8_t address, uint32_t rom_size);
22 
23 #endif
24