drm/amdgpu: Enable reading FRU chip via I2C v3
authorKent Russell <kent.russell@amd.com>
Fri, 13 Mar 2020 13:21:55 +0000 (09:21 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Apr 2020 18:44:41 +0000 (14:44 -0400)
commitbd607166af7fe31f8d8e9c575f4561a4b56b9f24
tree9c5c8028266828a5886ca9d24908e2b2dc6c4a7a
parent3148a6a0ef3cf93570f30a477292768f7eb5d3c3
drm/amdgpu: Enable reading FRU chip via I2C v3

Allow for reading of information like manufacturer, product number
and serial number from the FRU chip. Report the serial number as
the new sysfs file serial_number. Note that this only works on
server cards, as consumer cards do not feature the FRU chip, which
contains this information.

v2: Add documentation to amdgpu.rst, add helper functions,
    rename functions for consistency, fix bad starting offset
v3: Remove testing definitions

Signed-off-by: Kent Russell <kent.russell@amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Documentation/gpu/amdgpu.rst
drivers/gpu/drm/amd/amdgpu/Makefile
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c [new file with mode: 0644]
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h [new file with mode: 0644]