diff options
| author | Luben Tuikov <[email protected]> | 2021-03-11 22:12:32 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2021-07-01 04:24:40 +0000 |
| commit | 16ef797737c84462a3632dd4f8d77fe0f000428b (patch) | |
| tree | 976288ac8a75b99282e0387a2d1e9052d31beda8 /drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.h | |
| parent | drm/amdgpu: RAS xfer to read/write (diff) | |
| download | kernel-16ef797737c84462a3632dd4f8d77fe0f000428b.tar.gz kernel-16ef797737c84462a3632dd4f8d77fe0f000428b.zip | |
drm/amdgpu: EEPROM: add explicit read and write
Add explicit amdgpu_eeprom_read() and
amdgpu_eeprom_write() for clarity.
Cc: Jean Delvare <[email protected]>
Cc: Alexander Deucher <[email protected]>
Cc: Andrey Grodzovsky <[email protected]>
Cc: Lijo Lazar <[email protected]>
Cc: Stanley Yang <[email protected]>
Cc: Hawking Zhang <[email protected]>
Signed-off-by: Luben Tuikov <[email protected]>
Acked-by: Alexander Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.h index 417472be2712..966b434f0de2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.h @@ -29,4 +29,20 @@ int amdgpu_eeprom_xfer(struct i2c_adapter *i2c_adap, u32 eeprom_addr, u8 *eeprom_buf, u16 bytes, bool read); +static inline int amdgpu_eeprom_read(struct i2c_adapter *i2c_adap, + u32 eeprom_addr, u8 *eeprom_buf, + u16 bytes) +{ + return amdgpu_eeprom_xfer(i2c_adap, eeprom_addr, eeprom_buf, bytes, + true); +} + +static inline int amdgpu_eeprom_write(struct i2c_adapter *i2c_adap, + u32 eeprom_addr, u8 *eeprom_buf, + u16 bytes) +{ + return amdgpu_eeprom_xfer(i2c_adap, eeprom_addr, eeprom_buf, bytes, + false); +} + #endif |
