Skip to contentSkip to conversation

drm/amd/pm: Remove I2C_CLASS_SPD support

PATCH Applied Heiner Kallweit 3 participants 4 messages Nov 13, 2023 – Dec 19, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/pm: Remove I2C_CLASS_SPD support

I2C_CLASS_SPD was used to expose the EEPROM content to user space, via the legacy eeprom driver. Now that this driver has been removed, we can remove I2C_CLASS_SPD support. at24 driver with explicit instantiation should be used instead.

If in doubt this patch could be applied via the i2c tree.

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c   | 1 -
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 1 -
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 1 -
 3 files changed, 3 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +0 -1
index 1a6675d70..bc56a29e6 100644
@@ -1527,7 +1527,6 @@ static int aldebaran_i2c_control_init(struct smu_context *smu)
 	smu_i2c->port = 0;
 	mutex_init(&smu_i2c->mutex);
 	control->owner = THIS_MODULE;
-	control->class = I2C_CLASS_SPD;
 	control->dev.parent = &adev->pdev->dev;
 	control->algo = &aldebaran_i2c_algo;
 	snprintf(control->name, sizeof(control->name), "AMDGPU SMU 0");
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +0 -1
index 82c4e1f1c..c0e62bab9 100644
@@ -2720,7 +2720,6 @@ static int smu_v13_0_0_i2c_control_init(struct smu_context *smu)
 		smu_i2c->port = i;
 		mutex_init(&smu_i2c->mutex);
 		control->owner = THIS_MODULE;
-		control->class = I2C_CLASS_SPD;
 		control->dev.parent = &adev->pdev->dev;
 		control->algo = &smu_v13_0_0_i2c_algo;
 		snprintf(control->name, sizeof(control->name), "AMDGPU SMU %d", i);
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +0 -1
index 891605d49..9de91bd77 100644
@@ -1884,7 +1884,6 @@ static int smu_v13_0_6_i2c_control_init(struct smu_context *smu)
 		smu_i2c->port = i;
 		mutex_init(&smu_i2c->mutex);
 		control->owner = THIS_MODULE;
-		control->class = I2C_CLASS_SPD;
 		control->dev.parent = &adev->pdev->dev;
 		control->algo = &smu_v13_0_6_i2c_algo;
 		snprintf(control->name, sizeof(control->name), "AMDGPU SMU %d", i);
Signature · 1 line
2.42.1
#1 lore raw
Quoted 9 lines · Heiner Kallweit

I2C_CLASS_SPD was used to expose the EEPROM content to user space, via the legacy eeprom driver. Now that this driver has been removed, we can remove I2C_CLASS_SPD support. at24 driver with explicit instantiation should be used instead.

If in doubt this patch could be applied via the i2c tree.

---

The mail to Evan couldn't be delivered. Maybe MAINTAINERS needs to be updated?

Generating server: SATLEXMB03.amd.com
[email protected]
Remote Server returned '550 5.1.10 RESOLVER.ADR.RecipientNotFound; Recipient not found by SMTP address lookup'

Acked-by on v1 1/1
#2 lore raw
In reply to Heiner Kallweit
Quoted 9 lines · Heiner Kallweit

I2C_CLASS_SPD was used to expose the EEPROM content to user space, via the legacy eeprom driver. Now that this driver has been removed, we can remove I2C_CLASS_SPD support. at24 driver with explicit instantiation should be used instead.

If in doubt this patch could be applied via the i2c tree.

Feel free to take this via the i2c tree if you prefer.

Alex

Quoted 45 lines
---
 drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c   | 1 -
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 1 -
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 1 -
 3 files changed, 3 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +0 -1
index 1a6675d70..bc56a29e6 100644
@@ -1527,7 +1527,6 @@ static int aldebaran_i2c_control_init(struct smu_context *smu)
        smu_i2c->port = 0;
        mutex_init(&smu_i2c->mutex);
        control->owner = THIS_MODULE;
-       control->class = I2C_CLASS_SPD;
        control->dev.parent = &adev->pdev->dev;
        control->algo = &aldebaran_i2c_algo;
        snprintf(control->name, sizeof(control->name), "AMDGPU SMU 0");
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +0 -1
index 82c4e1f1c..c0e62bab9 100644
@@ -2720,7 +2720,6 @@ static int smu_v13_0_0_i2c_control_init(struct smu_context *smu)
                smu_i2c->port = i;
                mutex_init(&smu_i2c->mutex);
                control->owner = THIS_MODULE;
-               control->class = I2C_CLASS_SPD;
                control->dev.parent = &adev->pdev->dev;
                control->algo = &smu_v13_0_0_i2c_algo;
                snprintf(control->name, sizeof(control->name), "AMDGPU SMU %d", i);
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +0 -2
index 891605d49..9de91bd77 100644
@@ -1884,7 +1884,6 @@ static int smu_v13_0_6_i2c_control_init(struct smu_context *smu)
                smu_i2c->port = i;
                mutex_init(&smu_i2c->mutex);
                control->owner = THIS_MODULE;
-               control->class = I2C_CLASS_SPD;
                control->dev.parent = &adev->pdev->dev;
                control->algo = &smu_v13_0_6_i2c_algo;
                snprintf(control->name, sizeof(control->name), "AMDGPU SMU %d", i);
--

2.42.1

Applied
#3 lore raw
In reply to Heiner Kallweit
Quoted 8 lines · Heiner Kallweit

I2C_CLASS_SPD was used to expose the EEPROM content to user space, via the legacy eeprom driver. Now that this driver has been removed, we can remove I2C_CLASS_SPD support. at24 driver with explicit instantiation should be used instead.

If in doubt this patch could be applied via the i2c tree.

Applied to for-next, thanks!