xref: /openbmc/linux/drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.h (revision ac8f933664c3a0e2d42f6ee9a2a6d25f87cb23f6)
100e3a289SAlex Deucher /*
200e3a289SAlex Deucher  * Copyright 2021 Advanced Micro Devices, Inc.
300e3a289SAlex Deucher  *
400e3a289SAlex Deucher  * Permission is hereby granted, free of charge, to any person obtaining a
500e3a289SAlex Deucher  * copy of this software and associated documentation files (the "Software"),
600e3a289SAlex Deucher  * to deal in the Software without restriction, including without limitation
700e3a289SAlex Deucher  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
800e3a289SAlex Deucher  * and/or sell copies of the Software, and to permit persons to whom the
900e3a289SAlex Deucher  * Software is furnished to do so, subject to the following conditions:
1000e3a289SAlex Deucher  *
1100e3a289SAlex Deucher  * The above copyright notice and this permission notice shall be included in
1200e3a289SAlex Deucher  * all copies or substantial portions of the Software.
1300e3a289SAlex Deucher  *
1400e3a289SAlex Deucher  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1500e3a289SAlex Deucher  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1600e3a289SAlex Deucher  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1700e3a289SAlex Deucher  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
1800e3a289SAlex Deucher  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1900e3a289SAlex Deucher  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2000e3a289SAlex Deucher  * OTHER DEALINGS IN THE SOFTWARE.
2100e3a289SAlex Deucher  *
2200e3a289SAlex Deucher  */
2300e3a289SAlex Deucher 
2400e3a289SAlex Deucher #ifndef _AMDGPU_EEPROM_H
2500e3a289SAlex Deucher #define _AMDGPU_EEPROM_H
2600e3a289SAlex Deucher 
2700e3a289SAlex Deucher #include <linux/i2c.h>
2800e3a289SAlex Deucher 
2963d4c081SLuben Tuikov int amdgpu_eeprom_read(struct i2c_adapter *i2c_adap,
3016ef7977SLuben Tuikov 		       u32 eeprom_addr, u8 *eeprom_buf,
31*0798e433STao Zhou 		       u32 bytes);
3216ef7977SLuben Tuikov 
3363d4c081SLuben Tuikov int amdgpu_eeprom_write(struct i2c_adapter *i2c_adap,
3416ef7977SLuben Tuikov 			u32 eeprom_addr, u8 *eeprom_buf,
35*0798e433STao Zhou 			u32 bytes);
3616ef7977SLuben Tuikov 
3700e3a289SAlex Deucher #endif
38