1*00e3a289SAlex Deucher /* 2*00e3a289SAlex Deucher * Copyright 2021 Advanced Micro Devices, Inc. 3*00e3a289SAlex Deucher * 4*00e3a289SAlex Deucher * Permission is hereby granted, free of charge, to any person obtaining a 5*00e3a289SAlex Deucher * copy of this software and associated documentation files (the "Software"), 6*00e3a289SAlex Deucher * to deal in the Software without restriction, including without limitation 7*00e3a289SAlex Deucher * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8*00e3a289SAlex Deucher * and/or sell copies of the Software, and to permit persons to whom the 9*00e3a289SAlex Deucher * Software is furnished to do so, subject to the following conditions: 10*00e3a289SAlex Deucher * 11*00e3a289SAlex Deucher * The above copyright notice and this permission notice shall be included in 12*00e3a289SAlex Deucher * all copies or substantial portions of the Software. 13*00e3a289SAlex Deucher * 14*00e3a289SAlex Deucher * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15*00e3a289SAlex Deucher * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16*00e3a289SAlex Deucher * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17*00e3a289SAlex Deucher * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18*00e3a289SAlex Deucher * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19*00e3a289SAlex Deucher * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20*00e3a289SAlex Deucher * OTHER DEALINGS IN THE SOFTWARE. 21*00e3a289SAlex Deucher * 22*00e3a289SAlex Deucher */ 23*00e3a289SAlex Deucher 24*00e3a289SAlex Deucher #ifndef _AMDGPU_EEPROM_H 25*00e3a289SAlex Deucher #define _AMDGPU_EEPROM_H 26*00e3a289SAlex Deucher 27*00e3a289SAlex Deucher #include <linux/i2c.h> 28*00e3a289SAlex Deucher 29*00e3a289SAlex Deucher int amdgpu_eeprom_xfer(struct i2c_adapter *i2c_adap, 30*00e3a289SAlex Deucher u16 slave_addr, u16 eeprom_addr, 31*00e3a289SAlex Deucher u8 *eeprom_buf, u16 bytes, bool read); 32*00e3a289SAlex Deucher 33*00e3a289SAlex Deucher 34*00e3a289SAlex Deucher #endif 35