• Luben Tuikov's avatar
    drm/amdgpu: Fixes to the AMDGPU EEPROM driver · 746b5847
    Luben Tuikov authored
    * When reading from the EEPROM device, there is no
      device limitation on the number of bytes
      read--they're simply sequenced out. Thus, read
      the whole data requested in one go.
    
    * When writing to the EEPROM device, there is a
      256-byte page limit to write to before having to
      generate a STOP on the bus, as well as the
      address written to mustn't cross over the page
      boundary (it actually rolls over). Maximize the
      data written to per bus acquisition.
    
    * Return the number of bytes read/written, or -errno.
    
    * Add kernel doc.
    
    Cc: Jean Delvare <jdelvare@suse.de>
    Cc: Alexander Deucher <Alexander.Deucher@amd.com>
    Cc: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
    Cc: Lijo Lazar <Lijo.Lazar@amd.com>
    Cc: Stanley Yang <Stanley.Yang@amd.com>
    Cc: Hawking Zhang <Hawking.Zhang@amd.com>
    Signed-off-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
    Acked-by: default avatarAlexander Deucher <Alexander.Deucher@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    746b5847
amdgpu_eeprom.c 3.8 KB