Skip to contentSkip to conversation

remove I2C_CLASS_DDC support

PATCH Superseded Heiner Kallweit 6 participants 35 messages Nov 13, 2023 – Nov 16, 2023

Subsystems (26)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

cover remove I2C_CLASS_DDC support

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---

 drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c           |    1 -
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |    1 -
 drivers/gpu/drm/ast/ast_i2c.c                     |    1 -
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c         |    1 -
 drivers/gpu/drm/display/drm_dp_helper.c           |    1 -
 drivers/gpu/drm/display/drm_dp_mst_topology.c     |    1 -
 drivers/gpu/drm/gma500/cdv_intel_dp.c             |    1 -
 drivers/gpu/drm/gma500/intel_gmbus.c              |    1 -
 drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c        |    1 -
 drivers/gpu/drm/gma500/psb_intel_sdvo.c           |    1 -
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c   |    1 -
 drivers/gpu/drm/i915/display/intel_gmbus.c        |    1 -
 drivers/gpu/drm/i915/display/intel_sdvo.c         |    1 -
 drivers/gpu/drm/loongson/lsdc_i2c.c               |    1 -
 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c           |    1 -
 drivers/gpu/drm/mgag200/mgag200_i2c.c             |    1 -
 drivers/gpu/drm/msm/hdmi/hdmi_i2c.c               |    1 -
 drivers/gpu/drm/radeon/radeon_i2c.c               |    1 -
 drivers/gpu/drm/rockchip/inno_hdmi.c              |    1 -
 drivers/gpu/drm/rockchip/rk3066_hdmi.c            |    1 -
 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c            |    1 -
 drivers/video/fbdev/core/fb_ddc.c                 |    1 -
 drivers/video/fbdev/cyber2000fb.c                 |    1 -
 drivers/video/fbdev/i740fb.c                      |    1 -
 drivers/video/fbdev/intelfb/intelfb_i2c.c         |   15 +++++----------
 drivers/video/fbdev/matrox/i2c-matroxfb.c         |   12 ++++--------
 drivers/video/fbdev/s3fb.c                        |    1 -
 drivers/video/fbdev/tdfxfb.c                      |    1 -
 drivers/video/fbdev/tridentfb.c                   |    1 -
 drivers/video/fbdev/via/via_i2c.c                 |    1 -
 include/linux/i2c.h                               |    1 -
 31 files changed, 9 insertions(+), 47 deletions(-)
#1 lore raw

PATCH 1/20 drivers/gpu/drm/rockchip: remove I2C_CLASS_DDC support

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/rockchip/inno_hdmi.c   |    1 -
 drivers/gpu/drm/rockchip/rk3066_hdmi.c |    1 -
 2 files changed, 2 deletions(-)
drivers/gpu/drm/rockchip/inno_hdmi.c +0 -1
index 6e5b922a1..a7739b27c 100644
@@ -793,7 +793,6 @@ static struct i2c_adapter *inno_hdmi_i2c_adapter(struct inno_hdmi *hdmi)
 	init_completion(&i2c->cmp);
 
 	adap = &i2c->adap;
-	adap->class = I2C_CLASS_DDC;
 	adap->owner = THIS_MODULE;
 	adap->dev.parent = hdmi->dev;
 	adap->dev.of_node = hdmi->dev->of_node;
drivers/gpu/drm/rockchip/rk3066_hdmi.c +0 -1
index fa6e592e0..7a3f71aa2 100644
@@ -725,7 +725,6 @@ static struct i2c_adapter *rk3066_hdmi_i2c_adapter(struct rk3066_hdmi *hdmi)
 	init_completion(&i2c->cmpltn);
 
 	adap = &i2c->adap;
-	adap->class = I2C_CLASS_DDC;
 	adap->owner = THIS_MODULE;
 	adap->dev.parent = hdmi->dev;
 	adap->dev.of_node = hdmi->dev->of_node;
maintainer Acked-by on v1 1/20
#2 lore raw

Re: [PATCH 01/20] drivers/gpu/drm/rockchip: remove I2C_CLASS_DDC support

Am Montag, 13. November 2023, 12:23:25 CET schrieb Heiner Kallweit:

Quoted 8 lines

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

Quoted 32 lines
---
 drivers/gpu/drm/rockchip/inno_hdmi.c   |    1 -
 drivers/gpu/drm/rockchip/rk3066_hdmi.c |    1 -
 2 files changed, 2 deletions(-)
drivers/gpu/drm/rockchip/inno_hdmi.c +0 -1
index 6e5b922a1..a7739b27c 100644
@@ -793,7 +793,6 @@ static struct i2c_adapter *inno_hdmi_i2c_adapter(struct inno_hdmi *hdmi)
 	init_completion(&i2c->cmp);
 
 	adap = &i2c->adap;
-	adap->class = I2C_CLASS_DDC;
 	adap->owner = THIS_MODULE;
 	adap->dev.parent = hdmi->dev;
 	adap->dev.of_node = hdmi->dev->of_node;
drivers/gpu/drm/rockchip/rk3066_hdmi.c +0 -1
index fa6e592e0..7a3f71aa2 100644
@@ -725,7 +725,6 @@ static struct i2c_adapter *rk3066_hdmi_i2c_adapter(struct rk3066_hdmi *hdmi)
 	init_completion(&i2c->cmpltn);
 
 	adap = &i2c->adap;
-	adap->class = I2C_CLASS_DDC;
 	adap->owner = THIS_MODULE;
 	adap->dev.parent = hdmi->dev;
 	adap->dev.of_node = hdmi->dev->of_node;
#3 lore raw

PATCH 2/20 drivers/gpu/drm/mgag200/mgag200_i2c.c: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/mgag200/mgag200_i2c.c |    1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/mgag200/mgag200_i2c.c +0 -1
index 0c48bdf3e..423eb302b 100644
@@ -106,7 +106,6 @@ int mgag200_i2c_init(struct mga_device *mdev, struct mga_i2c_chan *i2c)
 	i2c->data = BIT(info->i2c.data_bit);
 	i2c->clock = BIT(info->i2c.clock_bit);
 	i2c->adapter.owner = THIS_MODULE;
-	i2c->adapter.class = I2C_CLASS_DDC;
 	i2c->adapter.dev.parent = dev->dev;
 	i2c->dev = dev;
 	i2c_set_adapdata(&i2c->adapter, i2c);
#4 lore raw

PATCH 3/20 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |    1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -1
index 6f99f6754..ae1edc6ab 100644
@@ -7529,7 +7529,6 @@ create_i2c(struct ddc_service *ddc_service,
 	if (!i2c)
 		return NULL;
 	i2c->base.owner = THIS_MODULE;
-	i2c->base.class = I2C_CLASS_DDC;
 	i2c->base.dev.parent = &adev->pdev->dev;
 	i2c->base.algo = &amdgpu_dm_i2c_algo;
 	snprintf(i2c->base.name, sizeof(i2c->base.name), "AMDGPU DM i2c hw bus %d", link_index);
maintainer Acked-by on v1 3/20
#5 lore raw

Re: [PATCH 03/20] drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c: remove I2C_CLASS_DDC support

Please just use "drm/amd/display:" as tag in the commit subject.

With that fixed, this is

Harry

Quoted 26 lines · Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |    1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -1
index 6f99f6754..ae1edc6ab 100644
@@ -7529,7 +7529,6 @@ create_i2c(struct ddc_service *ddc_service,
 	if (!i2c)
 		return NULL;
 	i2c->base.owner = THIS_MODULE;
-	i2c->base.class = I2C_CLASS_DDC;
 	i2c->base.dev.parent = &adev->pdev->dev;
 	i2c->base.algo = &amdgpu_dm_i2c_algo;
 	snprintf(i2c->base.name, sizeof(i2c->base.name), "AMDGPU DM i2c hw bus %d", link_index);
#6 lore raw

Re: [PATCH 03/20] drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c: remove I2C_CLASS_DDC support

Quoted 2 lines · Harry Wentland

Please just use "drm/amd/display:" as tag in the commit subject.

Thanks, noted. Tags have been automatically created by Coccinelle's splitpatch.

Quoted 33 lines

With that fixed, this is

Harry

Quoted 26 lines · Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |    1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -1
index 6f99f6754..ae1edc6ab 100644
@@ -7529,7 +7529,6 @@ create_i2c(struct ddc_service *ddc_service,
 	if (!i2c)
 		return NULL;
 	i2c->base.owner = THIS_MODULE;
-	i2c->base.class = I2C_CLASS_DDC;
 	i2c->base.dev.parent = &adev->pdev->dev;
 	i2c->base.algo = &amdgpu_dm_i2c_algo;
 	snprintf(i2c->base.name, sizeof(i2c->base.name), "AMDGPU DM i2c hw bus %d", link_index);
Acked-by
#7 lore raw

Re: [PATCH 03/20] drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c: remove I2C_CLASS_DDC support

In reply to Harry Wentland
Quoted 6 lines · Harry Wentland

Please just use "drm/amd/display:" as tag in the commit subject.

With that fixed, this is

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

Alex

Quoted 30 lines

Harry

Quoted 26 lines · Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |    1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -1
index 6f99f6754..ae1edc6ab 100644
@@ -7529,7 +7529,6 @@ create_i2c(struct ddc_service *ddc_service,
      if (!i2c)
              return NULL;
      i2c->base.owner = THIS_MODULE;
-     i2c->base.class = I2C_CLASS_DDC;
      i2c->base.dev.parent = &adev->pdev->dev;
      i2c->base.algo = &amdgpu_dm_i2c_algo;
      snprintf(i2c->base.name, sizeof(i2c->base.name), "AMDGPU DM i2c hw bus %d", link_index);
#8 lore raw

PATCH 4/20 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c |    1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c +0 -1
index d1a65a921..f5f62eb0e 100644
@@ -302,7 +302,6 @@ int sun4i_hdmi_i2c_create(struct device *dev, struct sun4i_hdmi *hdmi)
 		return -ENOMEM;
 
 	adap->owner = THIS_MODULE;
-	adap->class = I2C_CLASS_DDC;
 	adap->algo = &sun4i_hdmi_i2c_algorithm;
 	strscpy(adap->name, "sun4i_hdmi_i2c adapter", sizeof(adap->name));
 	i2c_set_adapdata(adap, hdmi);
#9 lore raw

PATCH 5/20 drivers/video/fbdev: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/video/fbdev/i740fb.c              |    1 -
 drivers/video/fbdev/matrox/i2c-matroxfb.c |   12 ++++--------
 drivers/video/fbdev/s3fb.c                |    1 -
 drivers/video/fbdev/tdfxfb.c              |    1 -
 drivers/video/fbdev/tridentfb.c           |    1 -
 5 files changed, 4 insertions(+), 12 deletions(-)
drivers/video/fbdev/i740fb.c +0 -1
index 1897e65ab..9b74dae71 100644
@@ -163,7 +163,6 @@ static int i740fb_setup_ddc_bus(struct fb_info *info)
 	strscpy(par->ddc_adapter.name, info->fix.id,
 		sizeof(par->ddc_adapter.name));
 	par->ddc_adapter.owner		= THIS_MODULE;
-	par->ddc_adapter.class		= I2C_CLASS_DDC;
 	par->ddc_adapter.algo_data	= &par->ddc_algo;
 	par->ddc_adapter.dev.parent	= info->device;
 	par->ddc_algo.setsda		= i740fb_ddc_setsda;
drivers/video/fbdev/matrox/i2c-matroxfb.c +4 -8
index e2e4705e3..fa07e1e5c 100644
@@ -100,8 +100,7 @@ static const struct i2c_algo_bit_data matrox_i2c_algo_template =
 };
 
 static int i2c_bus_reg(struct i2c_bit_adapter* b, struct matrox_fb_info* minfo, 
-		unsigned int data, unsigned int clock, const char *name,
-		int class)
+		unsigned int data, unsigned int clock, const char *name)
 {
 	int err;
 
@@ -112,7 +111,6 @@ static int i2c_bus_reg(struct i2c_bit_adapter* b, struct matrox_fb_info* minfo,
 	snprintf(b->adapter.name, sizeof(b->adapter.name), name,
 		minfo->fbcon.node);
 	i2c_set_adapdata(&b->adapter, b);
-	b->adapter.class = class;
 	b->adapter.algo_data = &b->bac;
 	b->adapter.dev.parent = &minfo->pcidev->dev;
 	b->bac = matrox_i2c_algo_template;
@@ -160,20 +158,18 @@ static void* i2c_matroxfb_probe(struct matrox_fb_info* minfo) {
 		case MGA_2164:
 			err = i2c_bus_reg(&m2info->ddc1, minfo,
 					  DDC1B_DATA, DDC1B_CLK,
-					  "DDC:fb%u #0", I2C_CLASS_DDC);
+					  "DDC:fb%u #0");
 			break;
 		default:
 			err = i2c_bus_reg(&m2info->ddc1, minfo,
 					  DDC1_DATA, DDC1_CLK,
-					  "DDC:fb%u #0", I2C_CLASS_DDC);
+					  "DDC:fb%u #0");
 			break;
 	}
 	if (err)
 		goto fail_ddc1;
 	if (minfo->devflags.dualhead) {
-		err = i2c_bus_reg(&m2info->ddc2, minfo,
-				  DDC2_DATA, DDC2_CLK,
-				  "DDC:fb%u #1", I2C_CLASS_DDC);
+		err = i2c_bus_reg(&m2info->ddc2, minfo, DDC2_DATA, DDC2_CLK, "DDC:fb%u #1");
 		if (err == -ENODEV) {
 			printk(KERN_INFO "i2c-matroxfb: VGA->TV plug detected, DDC unavailable.\n");
 		} else if (err)
drivers/video/fbdev/s3fb.c +0 -1
index 589b349cb..07722a5ea 100644
@@ -252,7 +252,6 @@ static int s3fb_setup_ddc_bus(struct fb_info *info)
 	strscpy(par->ddc_adapter.name, info->fix.id,
 		sizeof(par->ddc_adapter.name));
 	par->ddc_adapter.owner		= THIS_MODULE;
-	par->ddc_adapter.class		= I2C_CLASS_DDC;
 	par->ddc_adapter.algo_data	= &par->ddc_algo;
 	par->ddc_adapter.dev.parent	= info->device;
 	par->ddc_algo.setsda		= s3fb_ddc_setsda;
drivers/video/fbdev/tdfxfb.c +0 -1
index 22aa95313..51ebe7835 100644
@@ -1267,7 +1267,6 @@ static int tdfxfb_setup_ddc_bus(struct tdfxfb_i2c_chan *chan, const char *name,
 
 	strscpy(chan->adapter.name, name, sizeof(chan->adapter.name));
 	chan->adapter.owner		= THIS_MODULE;
-	chan->adapter.class		= I2C_CLASS_DDC;
 	chan->adapter.algo_data		= &chan->algo;
 	chan->adapter.dev.parent	= dev;
 	chan->algo.setsda		= tdfxfb_ddc_setsda;
drivers/video/fbdev/tridentfb.c +0 -1
index 816d40b6f..516cf2a18 100644
@@ -274,7 +274,6 @@ static int tridentfb_setup_ddc_bus(struct fb_info *info)
 	strscpy(par->ddc_adapter.name, info->fix.id,
 		sizeof(par->ddc_adapter.name));
 	par->ddc_adapter.owner		= THIS_MODULE;
-	par->ddc_adapter.class		= I2C_CLASS_DDC;
 	par->ddc_adapter.algo_data	= &par->ddc_algo;
 	par->ddc_adapter.dev.parent	= info->device;
 	if (is_oldclock(par->chip_id)) { /* not sure if this check is OK */
#10 lore raw

PATCH 6/20 drivers/video/fbdev/core/fb_ddc.c: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/video/fbdev/core/fb_ddc.c |    1 -
 1 file changed, 1 deletion(-)
drivers/video/fbdev/core/fb_ddc.c +0 -1
index 8bf5f2f54..e25143219 100644
@@ -116,7 +116,6 @@ unsigned char *fb_ddc_read(struct i2c_adapter *adapter)
 	algo_data->setsda(algo_data->data, 1);
 	algo_data->setscl(algo_data->data, 1);
 
-	adapter->class |= I2C_CLASS_DDC;
 	return edid;
 }
 
#11 lore raw

PATCH 7/20 drivers/gpu/drm: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c |    1 -
 drivers/gpu/drm/radeon/radeon_i2c.c     |    1 -
 2 files changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c +0 -1
index 82608df43..d79cb13e1 100644
@@ -175,7 +175,6 @@ struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev,
 
 	i2c->rec = *rec;
 	i2c->adapter.owner = THIS_MODULE;
-	i2c->adapter.class = I2C_CLASS_DDC;
 	i2c->adapter.dev.parent = dev->dev;
 	i2c->dev = dev;
 	i2c_set_adapdata(&i2c->adapter, i2c);
drivers/gpu/drm/radeon/radeon_i2c.c +0 -1
index 314d066e6..3d174390a 100644
@@ -918,7 +918,6 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,
 
 	i2c->rec = *rec;
 	i2c->adapter.owner = THIS_MODULE;
-	i2c->adapter.class = I2C_CLASS_DDC;
 	i2c->adapter.dev.parent = dev->dev;
 	i2c->dev = dev;
 	i2c_set_adapdata(&i2c->adapter, i2c);
Acked-by on v1 7/20
#12 lore raw

Re: [PATCH 07/20] drivers/gpu/drm: remove I2C_CLASS_DDC support

Quoted 9 lines · Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

Technically two separate drivers, if you feel like splitting it. Either way,

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

Alex

Quoted 31 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c |    1 -
 drivers/gpu/drm/radeon/radeon_i2c.c     |    1 -
 2 files changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c +0 -1
index 82608df43..d79cb13e1 100644
@@ -175,7 +175,6 @@ struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev,
 
        i2c->rec = *rec;
        i2c->adapter.owner = THIS_MODULE;
-       i2c->adapter.class = I2C_CLASS_DDC;
        i2c->adapter.dev.parent = dev->dev;
        i2c->dev = dev;
        i2c_set_adapdata(&i2c->adapter, i2c);
drivers/gpu/drm/radeon/radeon_i2c.c +0 -1
index 314d066e6..3d174390a 100644
@@ -918,7 +918,6 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,
 
        i2c->rec = *rec;
        i2c->adapter.owner = THIS_MODULE;
-       i2c->adapter.class = I2C_CLASS_DDC;
        i2c->adapter.dev.parent = dev->dev;
        i2c->dev = dev;
        i2c_set_adapdata(&i2c->adapter, i2c);
#13 lore raw

PATCH 8/20 drivers/gpu/drm/loongson/lsdc_i2c.c: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/loongson/lsdc_i2c.c |    1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/loongson/lsdc_i2c.c +0 -1
index 9625d0b1d..ce90c2553 100644
@@ -154,7 +154,6 @@ int lsdc_create_i2c_chan(struct drm_device *ddev,
 	adapter = &li2c->adapter;
 	adapter->algo_data = &li2c->bit;
 	adapter->owner = THIS_MODULE;
-	adapter->class = I2C_CLASS_DDC;
 	adapter->dev.parent = ddev->dev;
 	adapter->nr = -1;
 
#14 lore raw

PATCH 9/20 drivers/video/fbdev/via/via_i2c.c: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/video/fbdev/via/via_i2c.c |    1 -
 1 file changed, 1 deletion(-)
drivers/video/fbdev/via/via_i2c.c +0 -1
index c35e530e0..582502810 100644
@@ -201,7 +201,6 @@ static int create_i2c_bus(struct i2c_adapter *adapter,
 	sprintf(adapter->name, "viafb i2c io_port idx 0x%02x",
 		adap_cfg->ioport_index);
 	adapter->owner = THIS_MODULE;
-	adapter->class = I2C_CLASS_DDC;
 	adapter->algo_data = algo;
 	if (pdev)
 		adapter->dev.parent = &pdev->dev;
#15 lore raw

PATCH 10/20 drivers/video/fbdev/cyber2000fb.c: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/video/fbdev/cyber2000fb.c |    1 -
 1 file changed, 1 deletion(-)
drivers/video/fbdev/cyber2000fb.c +0 -1
index 52105dc1a..79775deda 100644
@@ -1234,7 +1234,6 @@ static int cyber2000fb_setup_ddc_bus(struct cfb_info *cfb)
 	strscpy(cfb->ddc_adapter.name, cfb->fb.fix.id,
 		sizeof(cfb->ddc_adapter.name));
 	cfb->ddc_adapter.owner		= THIS_MODULE;
-	cfb->ddc_adapter.class		= I2C_CLASS_DDC;
 	cfb->ddc_adapter.algo_data	= &cfb->ddc_algo;
 	cfb->ddc_adapter.dev.parent	= cfb->fb.device;
 	cfb->ddc_algo.setsda		= cyber2000fb_ddc_setsda;
#16 lore raw

PATCH 11/20 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c |    1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +0 -1
index 52d91a0df..aca5bb086 100644
@@ -515,7 +515,6 @@ static struct i2c_adapter *dw_hdmi_i2c_adapter(struct dw_hdmi *hdmi)
 	init_completion(&i2c->cmp);
 
 	adap = &i2c->adap;
-	adap->class = I2C_CLASS_DDC;
 	adap->owner = THIS_MODULE;
 	adap->dev.parent = hdmi->dev;
 	adap->algo = &dw_hdmi_algorithm;
#17 lore raw

PATCH 12/20 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c |    1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c +0 -1
index d675c954b..54e46e440 100644
@@ -297,7 +297,6 @@ static int mtk_hdmi_ddc_probe(struct platform_device *pdev)
 
 	strscpy(ddc->adap.name, "mediatek-hdmi-ddc", sizeof(ddc->adap.name));
 	ddc->adap.owner = THIS_MODULE;
-	ddc->adap.class = I2C_CLASS_DDC;
 	ddc->adap.algo = &mtk_hdmi_ddc_algorithm;
 	ddc->adap.retries = 3;
 	ddc->adap.dev.of_node = dev->of_node;
#18 lore raw

PATCH 13/20 drivers/video/fbdev/intelfb/intelfb_i2c.c: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/video/fbdev/intelfb/intelfb_i2c.c |   15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
drivers/video/fbdev/intelfb/intelfb_i2c.c +5 -10
index 3300bd31d..f24c7cb4c 100644
@@ -99,8 +99,7 @@ static int intelfb_gpio_getsda(void *data)
 
 static int intelfb_setup_i2c_bus(struct intelfb_info *dinfo,
 				 struct intelfb_i2c_chan *chan,
-				 const u32 reg, const char *name,
-				 int class)
+				 const u32 reg, const char *name)
 {
 	int rc;
 
@@ -108,7 +107,6 @@ static int intelfb_setup_i2c_bus(struct intelfb_info *dinfo,
 	chan->reg			= reg;
 	snprintf(chan->adapter.name, sizeof(chan->adapter.name),
 		 "intelfb %s", name);
-	chan->adapter.class		= class;
 	chan->adapter.owner		= THIS_MODULE;
 	chan->adapter.algo_data		= &chan->algo;
 	chan->adapter.dev.parent	= &chan->dinfo->pdev->dev;
@@ -144,8 +142,7 @@ void intelfb_create_i2c_busses(struct intelfb_info *dinfo)
 	dinfo->output[i].type = INTELFB_OUTPUT_ANALOG;
 
 	/* setup the DDC bus for analog output */
-	intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].ddc_bus, GPIOA,
-			      "CRTDDC_A", I2C_CLASS_DDC);
+	intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].ddc_bus, GPIOA, "CRTDDC_A");
 	i++;
 
 	/* need to add the output busses for each device
@@ -159,10 +156,8 @@ void intelfb_create_i2c_busses(struct intelfb_info *dinfo)
 	case INTEL_855GM:
 	case INTEL_865G:
 		dinfo->output[i].type = INTELFB_OUTPUT_DVO;
-		intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].ddc_bus,
-				      GPIOD, "DVODDC_D", I2C_CLASS_DDC);
-		intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].i2c_bus,
-				      GPIOE, "DVOI2C_E", 0);
+		intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].ddc_bus, GPIOD, "DVODDC_D");
+		intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].i2c_bus, GPIOE, "DVOI2C_E");
 		i++;
 		break;
 	case INTEL_915G:
@@ -176,7 +171,7 @@ void intelfb_create_i2c_busses(struct intelfb_info *dinfo)
 		/* SDVO ports have a single control bus - 2 devices */
 		dinfo->output[i].type = INTELFB_OUTPUT_SDVO;
 		intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].i2c_bus,
-				      GPIOE, "SDVOCTRL_E", 0);
+				      GPIOE, "SDVOCTRL_E");
 		/* TODO: initialize the SDVO */
 		/* I830SDVOInit(pScrn, i, DVOB); */
 		i++;
#19 lore raw

PATCH 14/20 drivers/gpu/drm/msm/hdmi/hdmi_i2c.c: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/msm/hdmi/hdmi_i2c.c |    1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/msm/hdmi/hdmi_i2c.c +0 -1
index de182c004..7aa500d24 100644
@@ -249,7 +249,6 @@ struct i2c_adapter *msm_hdmi_i2c_init(struct hdmi *hdmi)
 
 
 	i2c->owner = THIS_MODULE;
-	i2c->class = I2C_CLASS_DDC;
 	snprintf(i2c->name, sizeof(i2c->name), "msm hdmi i2c");
 	i2c->dev.parent = &hdmi->pdev->dev;
 	i2c->algo = &msm_hdmi_i2c_algorithm;
#20 lore raw

PATCH 15/20 drivers/gpu/drm/i915/display: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/i915/display/intel_gmbus.c |    1 -
 drivers/gpu/drm/i915/display/intel_sdvo.c  |    1 -
 2 files changed, 2 deletions(-)
drivers/gpu/drm/i915/display/intel_gmbus.c +0 -1
index 40d7b6f3f..e9e4dcf34 100644
@@ -899,7 +899,6 @@ int intel_gmbus_setup(struct drm_i915_private *i915)
 		}
 
 		bus->adapter.owner = THIS_MODULE;
-		bus->adapter.class = I2C_CLASS_DDC;
 		snprintf(bus->adapter.name,
 			 sizeof(bus->adapter.name),
 			 "i915 gmbus %s", gmbus_pin->name);
drivers/gpu/drm/i915/display/intel_sdvo.c +0 -1
index a636f42ce..5e64d1baf 100644
@@ -3311,7 +3311,6 @@ intel_sdvo_init_ddc_proxy(struct intel_sdvo_ddc *ddc,
 	ddc->ddc_bus = ddc_bus;
 
 	ddc->ddc.owner = THIS_MODULE;
-	ddc->ddc.class = I2C_CLASS_DDC;
 	snprintf(ddc->ddc.name, I2C_NAME_SIZE, "SDVO %c DDC%d",
 		 port_name(sdvo->base.port), ddc_bus);
 	ddc->ddc.dev.parent = &pdev->dev;
maintainer
#21 lore raw

Re: [PATCH 15/20] drivers/gpu/drm/i915/display: remove I2C_CLASS_DDC support

Quoted 4 lines · Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

So this is copy-pasted to all commits and the cover letter, but please do explain why there are no functional changes here (or are there?), without me having to go through the i2c stack and try to find the commits alluded to in "After removal of the legacy ...".

What does this mean?

BR,
Jani.

Quoted 35 lines

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/i915/display/intel_gmbus.c |    1 -
 drivers/gpu/drm/i915/display/intel_sdvo.c  |    1 -
 2 files changed, 2 deletions(-)
drivers/gpu/drm/i915/display/intel_gmbus.c +0 -1
index 40d7b6f3f..e9e4dcf34 100644
@@ -899,7 +899,6 @@ int intel_gmbus_setup(struct drm_i915_private *i915)
 		}
 
 		bus->adapter.owner = THIS_MODULE;
-		bus->adapter.class = I2C_CLASS_DDC;
 		snprintf(bus->adapter.name,
 			 sizeof(bus->adapter.name),
 			 "i915 gmbus %s", gmbus_pin->name);
drivers/gpu/drm/i915/display/intel_sdvo.c +0 -1
index a636f42ce..5e64d1baf 100644
@@ -3311,7 +3311,6 @@ intel_sdvo_init_ddc_proxy(struct intel_sdvo_ddc *ddc,
 	ddc->ddc_bus = ddc_bus;
 
 	ddc->ddc.owner = THIS_MODULE;
-	ddc->ddc.class = I2C_CLASS_DDC;
 	snprintf(ddc->ddc.name, I2C_NAME_SIZE, "SDVO %c DDC%d",
 		 port_name(sdvo->base.port), ddc_bus);
 	ddc->ddc.dev.parent = &pdev->dev;
Signature · 1 line
Jani Nikula, Intel
#22 lore raw

Re: [PATCH 15/20] drivers/gpu/drm/i915/display: remove I2C_CLASS_DDC support

Quoted 11 lines · Jani Nikula
Quoted 4 lines · Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

So this is copy-pasted to all commits and the cover letter, but please do explain why there are no functional changes here (or are there?), without me having to go through the i2c stack and try to find the commits alluded to in "After removal of the legacy ...".

Legacy eeprom driver was marked deprecated 4 yrs ago with:
3079b54aa9a0 ("eeprom: Warn that the driver is deprecated") Now it has been removed with:
0113a99b8a75 ("eeprom: Remove deprecated legacy eeprom driver")

Declaration of I2C_CLASS_DDC support is a no-op now, so there's no functional change in this patch.

If loaded manually, the legacy eeprom driver exposed the DDC EEPROM to userspace. If this functionality is needed, then now the DDC EEPROM has to be explicitly instantiated using at24.

See also:
https://docs.kernel.org/i2c/instantiating-devices.html

Quoted 6 lines

What does this mean?

BR,
Jani.

Heiner

Quoted 37 lines
Quoted 36 lines

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/i915/display/intel_gmbus.c |    1 -
 drivers/gpu/drm/i915/display/intel_sdvo.c  |    1 -
 2 files changed, 2 deletions(-)
drivers/gpu/drm/i915/display/intel_gmbus.c +0 -1
index 40d7b6f3f..e9e4dcf34 100644
@@ -899,7 +899,6 @@ int intel_gmbus_setup(struct drm_i915_private *i915)
 		}
 
 		bus->adapter.owner = THIS_MODULE;
-		bus->adapter.class = I2C_CLASS_DDC;
 		snprintf(bus->adapter.name,
 			 sizeof(bus->adapter.name),
 			 "i915 gmbus %s", gmbus_pin->name);
drivers/gpu/drm/i915/display/intel_sdvo.c +0 -1
index a636f42ce..5e64d1baf 100644
@@ -3311,7 +3311,6 @@ intel_sdvo_init_ddc_proxy(struct intel_sdvo_ddc *ddc,
 	ddc->ddc_bus = ddc_bus;
 
 	ddc->ddc.owner = THIS_MODULE;
-	ddc->ddc.class = I2C_CLASS_DDC;
 	snprintf(ddc->ddc.name, I2C_NAME_SIZE, "SDVO %c DDC%d",
 		 port_name(sdvo->base.port), ddc_bus);
 	ddc->ddc.dev.parent = &pdev->dev;
maintainer Acked-by
#23 lore raw

Re: [PATCH 15/20] drivers/gpu/drm/i915/display: remove I2C_CLASS_DDC support

Quoted 20 lines · Heiner Kallweit
Quoted 11 lines · Jani Nikula
Quoted 4 lines · Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

So this is copy-pasted to all commits and the cover letter, but please do explain why there are no functional changes here (or are there?), without me having to go through the i2c stack and try to find the commits alluded to in "After removal of the legacy ...".

Legacy eeprom driver was marked deprecated 4 yrs ago with:
3079b54aa9a0 ("eeprom: Warn that the driver is deprecated") Now it has been removed with:
0113a99b8a75 ("eeprom: Remove deprecated legacy eeprom driver")

Declaration of I2C_CLASS_DDC support is a no-op now, so there's no functional change in this patch.

Quoted 6 lines

If loaded manually, the legacy eeprom driver exposed the DDC EEPROM to userspace. If this functionality is needed, then now the DDC EEPROM has to be explicitly instantiated using at24.

See also:
https://docs.kernel.org/i2c/instantiating-devices.html

I'll take your word for it. Though none of the documentation I can find say that setting the class is legacy or deprecated or should be avoided. *shrug*.

Quoted 48 lines
Quoted 8 lines

What does this mean?

BR,
Jani.

Heiner

Quoted 37 lines
Quoted 36 lines

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/i915/display/intel_gmbus.c |    1 -
 drivers/gpu/drm/i915/display/intel_sdvo.c  |    1 -
 2 files changed, 2 deletions(-)
drivers/gpu/drm/i915/display/intel_gmbus.c +0 -1
index 40d7b6f3f..e9e4dcf34 100644
@@ -899,7 +899,6 @@ int intel_gmbus_setup(struct drm_i915_private *i915)
 		}
 
 		bus->adapter.owner = THIS_MODULE;
-		bus->adapter.class = I2C_CLASS_DDC;
 		snprintf(bus->adapter.name,
 			 sizeof(bus->adapter.name),
 			 "i915 gmbus %s", gmbus_pin->name);
drivers/gpu/drm/i915/display/intel_sdvo.c +0 -1
index a636f42ce..5e64d1baf 100644
@@ -3311,7 +3311,6 @@ intel_sdvo_init_ddc_proxy(struct intel_sdvo_ddc *ddc,
 	ddc->ddc_bus = ddc_bus;
 
 	ddc->ddc.owner = THIS_MODULE;
-	ddc->ddc.class = I2C_CLASS_DDC;
 	snprintf(ddc->ddc.name, I2C_NAME_SIZE, "SDVO %c DDC%d",
 		 port_name(sdvo->base.port), ddc_bus);
 	ddc->ddc.dev.parent = &pdev->dev;
Signature · 1 line
Jani Nikula, Intel
#24 lore raw

Re: [PATCH 15/20] drivers/gpu/drm/i915/display: remove I2C_CLASS_DDC support

Quoted 25 lines · Jani Nikula
Quoted 24 lines · Heiner Kallweit
Quoted 11 lines · Jani Nikula
Quoted 4 lines · Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

So this is copy-pasted to all commits and the cover letter, but please do explain why there are no functional changes here (or are there?), without me having to go through the i2c stack and try to find the commits alluded to in "After removal of the legacy ...".

Legacy eeprom driver was marked deprecated 4 yrs ago with:
3079b54aa9a0 ("eeprom: Warn that the driver is deprecated") Now it has been removed with:
0113a99b8a75 ("eeprom: Remove deprecated legacy eeprom driver")

Declaration of I2C_CLASS_DDC support is a no-op now, so there's no functional change in this patch.

If loaded manually, the legacy eeprom driver exposed the DDC EEPROM to userspace. If this functionality is needed, then now the DDC EEPROM has to be explicitly instantiated using at24.

Quoted 7 lines
Quoted 2 lines

See also:
https://docs.kernel.org/i2c/instantiating-devices.html

I'll take your word for it. Though none of the documentation I can find say that setting the class is legacy or deprecated or should be avoided. *shrug*.

I have to agree that it's not obvious that class-based instantiation is considered a legacy mechanism. The commit message of this 9 yrs old commit provides an explanation.

0c176170089c ("i2c: add deprecation warning for class based instantiation")

Quoted 2 lines

Thanks

Quoted 50 lines
Quoted 49 lines
Quoted 9 lines

What does this mean?

BR,
Jani.

Heiner

Quoted 37 lines
Quoted 36 lines

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/i915/display/intel_gmbus.c |    1 -
 drivers/gpu/drm/i915/display/intel_sdvo.c  |    1 -
 2 files changed, 2 deletions(-)
drivers/gpu/drm/i915/display/intel_gmbus.c +0 -1
index 40d7b6f3f..e9e4dcf34 100644
@@ -899,7 +899,6 @@ int intel_gmbus_setup(struct drm_i915_private *i915)
 		}
 
 		bus->adapter.owner = THIS_MODULE;
-		bus->adapter.class = I2C_CLASS_DDC;
 		snprintf(bus->adapter.name,
 			 sizeof(bus->adapter.name),
 			 "i915 gmbus %s", gmbus_pin->name);
drivers/gpu/drm/i915/display/intel_sdvo.c +0 -1
index a636f42ce..5e64d1baf 100644
@@ -3311,7 +3311,6 @@ intel_sdvo_init_ddc_proxy(struct intel_sdvo_ddc *ddc,
 	ddc->ddc_bus = ddc_bus;
 
 	ddc->ddc.owner = THIS_MODULE;
-	ddc->ddc.class = I2C_CLASS_DDC;
 	snprintf(ddc->ddc.name, I2C_NAME_SIZE, "SDVO %c DDC%d",
 		 port_name(sdvo->base.port), ddc_bus);
 	ddc->ddc.dev.parent = &pdev->dev;
#25 lore raw

PATCH 16/20 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c |    1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c +0 -1
index 410bd019b..e6e48651c 100644
@@ -81,7 +81,6 @@ int hibmc_ddc_create(struct drm_device *drm_dev,
 		     struct hibmc_connector *connector)
 {
 	connector->adapter.owner = THIS_MODULE;
-	connector->adapter.class = I2C_CLASS_DDC;
 	snprintf(connector->adapter.name, I2C_NAME_SIZE, "HIS i2c bit bus");
 	connector->adapter.dev.parent = drm_dev->dev;
 	i2c_set_adapdata(&connector->adapter, connector);
#26 lore raw

PATCH 17/20 drivers/gpu/drm/ast/ast_i2c.c: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/ast/ast_i2c.c |    1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/ast/ast_i2c.c +0 -1
index 0e845e7ac..e5d3f7121 100644
@@ -120,7 +120,6 @@ struct ast_i2c_chan *ast_i2c_create(struct drm_device *dev)
 		return NULL;
 
 	i2c->adapter.owner = THIS_MODULE;
-	i2c->adapter.class = I2C_CLASS_DDC;
 	i2c->adapter.dev.parent = dev->dev;
 	i2c->dev = dev;
 	i2c_set_adapdata(&i2c->adapter, i2c);
#27 lore raw

PATCH 18/20 drivers/gpu/drm/gma500: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/gma500/cdv_intel_dp.c      |    1 -
 drivers/gpu/drm/gma500/intel_gmbus.c       |    1 -
 drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c |    1 -
 drivers/gpu/drm/gma500/psb_intel_sdvo.c    |    1 -
 4 files changed, 4 deletions(-)
drivers/gpu/drm/gma500/cdv_intel_dp.c +0 -1
index 8992a9507..dd1eb7e98 100644
@@ -855,7 +855,6 @@ cdv_intel_dp_i2c_init(struct gma_connector *connector,
 
 	memset(&intel_dp->adapter, '\0', sizeof (intel_dp->adapter));
 	intel_dp->adapter.owner = THIS_MODULE;
-	intel_dp->adapter.class = I2C_CLASS_DDC;
 	strncpy (intel_dp->adapter.name, name, sizeof(intel_dp->adapter.name) - 1);
 	intel_dp->adapter.name[sizeof(intel_dp->adapter.name) - 1] = '\0';
 	intel_dp->adapter.algo_data = &intel_dp->algo;
drivers/gpu/drm/gma500/intel_gmbus.c +0 -1
index 09cedabf4..aa4550985 100644
@@ -411,7 +411,6 @@ int gma_intel_setup_gmbus(struct drm_device *dev)
 		struct intel_gmbus *bus = &dev_priv->gmbus[i];
 
 		bus->adapter.owner = THIS_MODULE;
-		bus->adapter.class = I2C_CLASS_DDC;
 		snprintf(bus->adapter.name,
 			 sizeof(bus->adapter.name),
 			 "gma500 gmbus %s",
drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c +0 -1
index fc9a34ed5..6daa6669e 100644
@@ -168,7 +168,6 @@ static struct i2c_adapter oaktrail_hdmi_i2c_adapter = {
 	.name		= "oaktrail_hdmi_i2c",
 	.nr		= 3,
 	.owner		= THIS_MODULE,
-	.class		= I2C_CLASS_DDC,
 	.algo		= &oaktrail_hdmi_i2c_algorithm,
 };
 
drivers/gpu/drm/gma500/psb_intel_sdvo.c +0 -1
index d6fd5d726..e4f914dec 100644
@@ -2426,7 +2426,6 @@ psb_intel_sdvo_init_ddc_proxy(struct psb_intel_sdvo *sdvo,
 			  struct drm_device *dev)
 {
 	sdvo->ddc.owner = THIS_MODULE;
-	sdvo->ddc.class = I2C_CLASS_DDC;
 	snprintf(sdvo->ddc.name, I2C_NAME_SIZE, "SDVO DDC proxy");
 	sdvo->ddc.dev.parent = dev->dev;
 	sdvo->ddc.algo_data = sdvo;
#28 lore raw

PATCH 19/20 drivers/gpu/drm/display: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 drivers/gpu/drm/display/drm_dp_helper.c       |    1 -
 drivers/gpu/drm/display/drm_dp_mst_topology.c |    1 -
 2 files changed, 2 deletions(-)
drivers/gpu/drm/display/drm_dp_helper.c +0 -1
index f3680f4e6..ac901f4b4 100644
@@ -2102,7 +2102,6 @@ int drm_dp_aux_register(struct drm_dp_aux *aux)
 	if (!aux->ddc.algo)
 		drm_dp_aux_init(aux);
 
-	aux->ddc.class = I2C_CLASS_DDC;
 	aux->ddc.owner = THIS_MODULE;
 	aux->ddc.dev.parent = aux->dev;
 
drivers/gpu/drm/display/drm_dp_mst_topology.c +0 -1
index 0e0d0e76d..4376e2c1f 100644
@@ -5803,7 +5803,6 @@ static int drm_dp_mst_register_i2c_bus(struct drm_dp_mst_port *port)
 	aux->ddc.algo_data = aux;
 	aux->ddc.retries = 3;
 
-	aux->ddc.class = I2C_CLASS_DDC;
 	aux->ddc.owner = THIS_MODULE;
 	/* FIXME: set the kdev of the port's connector as parent */
 	aux->ddc.dev.parent = parent_dev;
Acked-by on v1 19/20
#29 lore raw

Re: [PATCH 19/20] drivers/gpu/drm/display: remove I2C_CLASS_DDC support

Quoted 9 lines · Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

Quoted 31 lines
---
 drivers/gpu/drm/display/drm_dp_helper.c       |    1 -
 drivers/gpu/drm/display/drm_dp_mst_topology.c |    1 -
 2 files changed, 2 deletions(-)
drivers/gpu/drm/display/drm_dp_helper.c +0 -1
index f3680f4e6..ac901f4b4 100644
@@ -2102,7 +2102,6 @@ int drm_dp_aux_register(struct drm_dp_aux *aux)
        if (!aux->ddc.algo)
                drm_dp_aux_init(aux);
 
-       aux->ddc.class = I2C_CLASS_DDC;
        aux->ddc.owner = THIS_MODULE;
        aux->ddc.dev.parent = aux->dev;
 
drivers/gpu/drm/display/drm_dp_mst_topology.c +0 -1
index 0e0d0e76d..4376e2c1f 100644
@@ -5803,7 +5803,6 @@ static int drm_dp_mst_register_i2c_bus(struct drm_dp_mst_port *port)
        aux->ddc.algo_data = aux;
        aux->ddc.retries = 3;
 
-       aux->ddc.class = I2C_CLASS_DDC;
        aux->ddc.owner = THIS_MODULE;
        /* FIXME: set the kdev of the port's connector as parent */
        aux->ddc.dev.parent = parent_dev;
#30 lore raw

PATCH 20/20 include/linux/i2c.h: remove I2C_CLASS_DDC support

In reply to Heiner Kallweit

After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now.

Preferably this series should be applied via the i2c tree.

---
 include/linux/i2c.h |    1 -
 1 file changed, 1 deletion(-)
include/linux/i2c.h +0 -1
index 0dae9db27..d029aade3 100644
@@ -850,7 +850,6 @@ static inline void i2c_mark_adapter_resumed(struct i2c_adapter *adap)
 
 /* i2c adapter classes (bitmask) */
 #define I2C_CLASS_HWMON		(1<<0)	/* lm_sensors, ... */
-#define I2C_CLASS_DDC		(1<<3)	/* DDC bus on graphics adapters */
 #define I2C_CLASS_SPD		(1<<7)	/* Memory modules */
 /* Warn users that the adapter doesn't support classes anymore */
 #define I2C_CLASS_DEPRECATED	(1<<8)
#31 lore raw
In reply to Heiner Kallweit
Quoted 2 lines

Preferably this series should be applied via the i2c tree.

Are we in a hurry here, i.e. does it block further development of the i801 smbus driver? My gut feeling says the patches should rather go via drm and fbdev trees, but I may be convinced otherwise.

#32 lore raw
Quoted 7 lines · Wolfram Sang
Quoted 2 lines

Preferably this series should be applied via the i2c tree.

Are we in a hurry here, i.e. does it block further development of the i801 smbus driver? My gut feeling says the patches should rather go via drm and fbdev trees, but I may be convinced otherwise.

We're not in a hurry. It's just my experience with patch series' affecting multiple subsystems that typically the decision was to apply the full series via one tree. Also to avoid inquires from maintainers like:
Shall I take it or are you going to take it?
Of course there may be different opinions. Please advise.

#33 lore raw
Quoted 6 lines

We're not in a hurry. It's just my experience with patch series' affecting multiple subsystems that typically the decision was to apply the full series via one tree. Also to avoid inquires from maintainers like:
Shall I take it or are you going to take it?
Of course there may be different opinions. Please advise.

Ok, then this turns out to be a negotation thing between the drm/fbdev maintainers and me. I *can* take all the patches, of course. But since the number of patches touching the non-i2c subsystems is high, I'd like to hear their preference, too.

#34 lore raw
Quoted 8 lines · Wolfram Sang
Quoted 7 lines

We're not in a hurry. It's just my experience with patch series' affecting multiple subsystems that typically the decision was to apply the full series via one tree. Also to avoid inquires from maintainers like:
Shall I take it or are you going to take it?
Of course there may be different opinions. Please advise.

Quoted 5 lines

Ok, then this turns out to be a negotation thing between the drm/fbdev maintainers and me. I *can* take all the patches, of course. But since the number of patches touching the non-i2c subsystems is high, I'd like to hear their preference, too.

I don't have a preference if you would prefer to take these via i2c.

Alex