summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2024-12-19 12:50:43 -0500
committerAlex Deucher <alexander.deucher@amd.com>2025-02-12 21:02:54 -0500
commit1c0b144bf7628a62575a4ec26623f7a6cdf0cb2b (patch)
tree7082e1fd7daf521892c06fa712efad734ebda025 /drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
parentba7f8eb7e447a8120f5bcb8e8d72964324ee5b84 (diff)
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 <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
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)
{