aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2024-12-19 17:50:43 +0000
committerAlex Deucher <[email protected]>2025-02-13 02:02:54 +0000
commit1c0b144bf7628a62575a4ec26623f7a6cdf0cb2b (patch)
tree7082e1fd7daf521892c06fa712efad734ebda025 /drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
parentdrm/amdgpu/atombios: drop empty function (diff)
downloadkernel-1c0b144bf7628a62575a4ec26623f7a6cdf0cb2b.tar.gz
kernel-1c0b144bf7628a62575a4ec26623f7a6cdf0cb2b.zip
drm/amdgpu: rework i2c init and fini
No functional change. Rework the code to allow for adding some additional i2c buses in conjunction with DC in the future. Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
index f0765ccde668..72f73a186dd9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
@@ -225,6 +225,14 @@ void amdgpu_i2c_destroy(struct amdgpu_i2c_chan *i2c)
kfree(i2c);
}
+void amdgpu_i2c_init(struct amdgpu_device *adev)
+{
+ if (!adev->is_atom_fw) {
+ if (!amdgpu_device_has_dc_support(adev))
+ amdgpu_atombios_i2c_init(adev);
+ }
+}
+
/* remove all the buses */
void amdgpu_i2c_fini(struct amdgpu_device *adev)
{