drm/amdgpu: Refactor FRU product information

Keep FRU related information together in a separate structure.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Lijo Lazar
2023-10-04 16:00:47 +05:30
committed by Alex Deucher
parent be2e8aca06
commit 8a2b51392a
9 changed files with 42 additions and 36 deletions

View File

@@ -24,6 +24,15 @@
#ifndef __AMDGPU_FRU_EEPROM_H__
#define __AMDGPU_FRU_EEPROM_H__
#define AMDGPU_PRODUCT_NAME_LEN 64
/* FRU product information */
struct amdgpu_fru_info {
char product_number[20];
char product_name[AMDGPU_PRODUCT_NAME_LEN];
char serial[20];
};
int amdgpu_fru_get_product_info(struct amdgpu_device *adev);
int amdgpu_fru_sysfs_init(struct amdgpu_device *adev);
void amdgpu_fru_sysfs_fini(struct amdgpu_device *adev);