Use devm_i2c_add_adapter() for amdgpu
Status from this message: Applied the series. Thanks!
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | drm/amd/display: Use devm_i2c_add_adapter to simplify i2c cleanup logicdrivers/ | +2 | 0 replies | |
| 2/10 | drm/amdgpu/amdgpu_i2c: Use devm_i2c_add_adapter instead of i2c_add_adapterdrivers/ | +3 | 0 replies | |
| 3/10 | drm/amdgpu: Use devm_i2c_add_adapter() in SMU V11drivers/ | +1 | 0 replies | |
| 4/10 | drm/amd/pm: Use devm_i2c_add_adapter() in the i2c initdrivers/ | +2 | 0 replies | |
| 5/10 | drm/amd/pm: Use devm_i2c_add_adapter() in the Arcturus smudrivers/ | +2 | 0 replies | |
| 6/10 | drm/amd/pm: Use devm_i2c_add_adapter() in the Navi10 smudrivers/ | +2 | 0 replies | |
| 7/10 | drm/amd/pm: Use devm_i2c_add_adapter() in the Sienna smudrivers/ | +2 | 0 replies | |
| 8/10 | drm/amd/pm: Use devm_i2c_add_adapter() in the V13 smudrivers/ | +2 | 0 replies | |
| 9/10 | drm/amd/pm: Use devm_i2c_add_adapter() in the V13_0_6 smudrivers/ | +2 | 0 replies | |
| 10/10 | drm/amd/pm: Use devm_i2c_add_adapter() in the V14_0_2 smudrivers/ | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/10] Use devm_i2c_add_adapter() for amdgpu
When discussing the load/unload issue in amdgpu and its fix [1], Robert Beckett suggested the use of devm_i2c_add_adapter(). This function is part of Devres [2], and it simplifies resource management when the driver is detached. Aside from reducing boilerplate, it also reduces maintenance effort and minimizes the likelihood of future load/unload issues associated with i2c.
With this idea in mind, this series replaces all the i2c_add_adapter() and i2c_del_adapter() with devm_i2c_add_adapter() in amdgpu. The first patch is focused on DM, the second patch focuses on the generic amdgpu_i2c, and all the other patches are part of the SMU (they share a similar code).
[1] - https://gitlab.freedesktop.org/agd5f/linux/-/commit/89923fb7ead4fdd37b78dd49962d9bb5892403e6
[2] - https://docs.kernel.org/driver-api/driver-model/devres.html
Thanks
Rodrigo Siqueira (10):
drm/amd/display: Use devm_i2c_add_adapter to simplify i2c cleanup
logic
drm/amdgpu/amdgpu_i2c: Use devm_i2c_add_adapter instead of
i2c_add_adapter
drm/amdgpu: Use devm_i2c_add_adapter() in SMU V11 drm/amd/pm: Use devm_i2c_add_adapter() in the i2c init drm/amd/pm: Use devm_i2c_add_adapter() in the Arcturus smu drm/amd/pm: Use devm_i2c_add_adapter() in the Navi10 smu drm/amd/pm: Use devm_i2c_add_adapter() in the Sienna smu drm/amd/pm: Use devm_i2c_add_adapter() in the V13 smu drm/amd/pm: Use devm_i2c_add_adapter() in the V13_0_6 smu drm/amd/pm: Use devm_i2c_add_adapter() in the V14_0_2 smu
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 18 +++------------- drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c | 5 +---- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 21 ++----------------- .../gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 19 ++--------------- .../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 19 ++--------------- .../amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 19 ++--------------- .../drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 15 ++----------- .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 19 ++--------------- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 19 ++--------------- .../drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 19 ++--------------- 10 files changed, 20 insertions(+), 153 deletions(-)
Signature · 1 line
2.50.1