public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] i2c: Let bus drivers add SPD to their class
@ 2008-06-03 11:02 Jean Delvare
       [not found] ` <20080603130221.1f819e64-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Jean Delvare @ 2008-06-03 11:02 UTC (permalink / raw)
  To: Linux I2C; +Cc: David Brownell

Let general purpose I2C/SMBus bus drivers add SPD to their class. Once
this is done, we will be able to tell the eeprom driver to only probe
for SPD EEPROMs and similar on these buses.

Note that I took a conservative approach here, adding I2C_CLASS_SPD to
all drivers that had I2C_CLASS_HWMON before. This is to make sure that
the eeprom driver doesn't stop probing buses where SPD EEPROMs live.
But the truth is that, for most of these, I simply have no idea whether
they can host SPD EEPROMs or not. So, bus driver maintainers and users
should feel free to remove the SPD class from drivers those buses never
have SPD EEPROMs or they don't want the eeprom driver to bind to them.
Likewise, feel free to add the SPD class to any bus driver I might have
missed.

Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
---
 drivers/i2c/busses/i2c-ali1535.c       |    2 +-
 drivers/i2c/busses/i2c-ali1563.c       |    2 +-
 drivers/i2c/busses/i2c-ali15x3.c       |    2 +-
 drivers/i2c/busses/i2c-amd756.c        |    2 +-
 drivers/i2c/busses/i2c-amd8111.c       |    2 +-
 drivers/i2c/busses/i2c-at91.c          |    2 +-
 drivers/i2c/busses/i2c-cpm.c           |    2 +-
 drivers/i2c/busses/i2c-davinci.c       |    2 +-
 drivers/i2c/busses/i2c-elektor.c       |    2 +-
 drivers/i2c/busses/i2c-gpio.c          |    2 +-
 drivers/i2c/busses/i2c-i801.c          |    2 +-
 drivers/i2c/busses/i2c-ibm_iic.c       |    4 ++--
 drivers/i2c/busses/i2c-iop3xx.c        |    2 +-
 drivers/i2c/busses/i2c-isch.c          |    2 +-
 drivers/i2c/busses/i2c-mpc.c           |    2 +-
 drivers/i2c/busses/i2c-mv64xxx.c       |    2 +-
 drivers/i2c/busses/i2c-nforce2.c       |    2 +-
 drivers/i2c/busses/i2c-ocores.c        |    2 +-
 drivers/i2c/busses/i2c-omap.c          |    2 +-
 drivers/i2c/busses/i2c-parport-light.c |    2 +-
 drivers/i2c/busses/i2c-parport.c       |    2 +-
 drivers/i2c/busses/i2c-pasemi.c        |    2 +-
 drivers/i2c/busses/i2c-piix4.c         |    2 +-
 drivers/i2c/busses/i2c-pmcmsp.c        |    2 +-
 drivers/i2c/busses/i2c-s3c2410.c       |    2 +-
 drivers/i2c/busses/i2c-sibyte.c        |    4 ++--
 drivers/i2c/busses/i2c-sis5595.c       |    2 +-
 drivers/i2c/busses/i2c-sis630.c        |    2 +-
 drivers/i2c/busses/i2c-sis96x.c        |    2 +-
 drivers/i2c/busses/i2c-stub.c          |    2 +-
 drivers/i2c/busses/i2c-tiny-usb.c      |    2 +-
 drivers/i2c/busses/i2c-via.c           |    2 +-
 drivers/i2c/busses/i2c-viapro.c        |    2 +-
 drivers/i2c/busses/scx200_acb.c        |    2 +-
 include/linux/i2c.h                    |    1 +
 35 files changed, 37 insertions(+), 36 deletions(-)

--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-ali1535.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-ali1535.c	2008-06-03 10:28:35.000000000 +0200
@@ -479,7 +479,7 @@ static const struct i2c_algorithm smbus_
 static struct i2c_adapter ali1535_adapter = {
 	.owner		= THIS_MODULE,
 	.id		= I2C_HW_SMBUS_ALI1535,
-	.class          = I2C_CLASS_HWMON,
+	.class          = I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.algo		= &smbus_algorithm,
 };
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-ali1563.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-ali1563.c	2008-06-03 10:28:35.000000000 +0200
@@ -387,7 +387,7 @@ static const struct i2c_algorithm ali156
 static struct i2c_adapter ali1563_adapter = {
 	.owner	= THIS_MODULE,
 	.id	= I2C_HW_SMBUS_ALI1563,
-	.class	= I2C_CLASS_HWMON,
+	.class	= I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.algo	= &ali1563_algorithm,
 };
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-ali15x3.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-ali15x3.c	2008-06-03 10:28:35.000000000 +0200
@@ -476,7 +476,7 @@ static const struct i2c_algorithm smbus_
 static struct i2c_adapter ali15x3_adapter = {
 	.owner		= THIS_MODULE,
 	.id		= I2C_HW_SMBUS_ALI15X3,
-	.class          = I2C_CLASS_HWMON,
+	.class          = I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.algo		= &smbus_algorithm,
 };
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-amd756.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-amd756.c	2008-06-03 10:28:35.000000000 +0200
@@ -302,7 +302,7 @@ static const struct i2c_algorithm smbus_
 struct i2c_adapter amd756_smbus = {
 	.owner		= THIS_MODULE,
 	.id		= I2C_HW_SMBUS_AMD756,
-	.class          = I2C_CLASS_HWMON,
+	.class          = I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.algo		= &smbus_algorithm,
 };
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-amd8111.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-amd8111.c	2008-06-03 10:28:35.000000000 +0200
@@ -388,7 +388,7 @@ static int __devinit amd8111_probe(struc
 	snprintf(smbus->adapter.name, sizeof(smbus->adapter.name),
 		"SMBus2 AMD8111 adapter at %04x", smbus->base);
 	smbus->adapter.id = I2C_HW_SMBUS_AMD8111;
-	smbus->adapter.class = I2C_CLASS_HWMON;
+	smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	smbus->adapter.algo = &smbus_algorithm;
 	smbus->adapter.algo_data = smbus;
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-at91.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-at91.c	2008-06-03 10:28:35.000000000 +0200
@@ -225,7 +225,7 @@ static int __devinit at91_i2c_probe(stru
 	}
 	sprintf(adapter->name, "AT91");
 	adapter->algo = &at91_algorithm;
-	adapter->class = I2C_CLASS_HWMON;
+	adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	adapter->dev.parent = &pdev->dev;
 	/* adapter->id == 0 ... only one TWI controller for now */
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-cpm.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-cpm.c	2008-06-03 10:28:35.000000000 +0200
@@ -423,7 +423,7 @@ static const struct i2c_adapter cpm_ops 
 	.owner		= THIS_MODULE,
 	.name		= "i2c-cpm",
 	.algo		= &cpm_i2c_algo,
-	.class		= I2C_CLASS_HWMON,
+	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
 };
 
 static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm)
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-davinci.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-davinci.c	2008-06-03 10:28:35.000000000 +0200
@@ -543,7 +543,7 @@ static int davinci_i2c_probe(struct plat
 	adap = &dev->adapter;
 	i2c_set_adapdata(adap, dev);
 	adap->owner = THIS_MODULE;
-	adap->class = I2C_CLASS_HWMON;
+	adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	strlcpy(adap->name, "DaVinci I2C adapter", sizeof(adap->name));
 	adap->algo = &i2c_davinci_algo;
 	adap->dev.parent = &pdev->dev;
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-elektor.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-elektor.c	2008-06-03 10:28:35.000000000 +0200
@@ -202,7 +202,7 @@ static struct i2c_algo_pcf_data pcf_isa_
 
 static struct i2c_adapter pcf_isa_ops = {
 	.owner		= THIS_MODULE,
-	.class		= I2C_CLASS_HWMON,
+	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.id		= I2C_HW_P_ELEK,
 	.algo_data	= &pcf_isa_data,
 	.name		= "i2c-elektor",
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-gpio.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-gpio.c	2008-06-03 10:28:35.000000000 +0200
@@ -140,7 +140,7 @@ static int __init i2c_gpio_probe(struct 
 	adap->owner = THIS_MODULE;
 	snprintf(adap->name, sizeof(adap->name), "i2c-gpio%d", pdev->id);
 	adap->algo_data = bit_data;
-	adap->class = I2C_CLASS_HWMON;
+	adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	adap->dev.parent = &pdev->dev;
 
 	/*
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-i801.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-i801.c	2008-06-03 10:28:35.000000000 +0200
@@ -574,7 +574,7 @@ static const struct i2c_algorithm smbus_
 static struct i2c_adapter i801_adapter = {
 	.owner		= THIS_MODULE,
 	.id		= I2C_HW_SMBUS_I801,
-	.class		= I2C_CLASS_HWMON,
+	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.algo		= &smbus_algorithm,
 };
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-ibm_iic.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-ibm_iic.c	2008-06-03 10:28:35.000000000 +0200
@@ -740,7 +740,7 @@ static int __devinit iic_probe(struct oc
 	strcpy(adap->name, "IBM IIC");
 	i2c_set_adapdata(adap, dev);
 	adap->id = I2C_HW_OCP;
-	adap->class = I2C_CLASS_HWMON;
+	adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	adap->algo = &iic_algo;
 	adap->client_register = NULL;
 	adap->client_unregister = NULL;
@@ -934,7 +934,7 @@ static int __devinit iic_probe(struct of
 	strlcpy(adap->name, "IBM IIC", sizeof(adap->name));
 	i2c_set_adapdata(adap, dev);
 	adap->id = I2C_HW_OCP;
-	adap->class = I2C_CLASS_HWMON;
+	adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	adap->algo = &iic_algo;
 	adap->timeout = 1;
 	adap->nr = dev->idx;
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-iop3xx.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-iop3xx.c	2008-06-03 10:28:35.000000000 +0200
@@ -482,7 +482,7 @@ iop3xx_i2c_probe(struct platform_device 
 	memcpy(new_adapter->name, pdev->name, strlen(pdev->name));
 	new_adapter->id = I2C_HW_IOP3XX;
 	new_adapter->owner = THIS_MODULE;
-	new_adapter->class = I2C_CLASS_HWMON;
+	new_adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	new_adapter->dev.parent = &pdev->dev;
 	new_adapter->nr = pdev->id;
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-isch.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-isch.c	2008-06-03 10:28:35.000000000 +0200
@@ -252,7 +252,7 @@ static const struct i2c_algorithm smbus_
 
 static struct i2c_adapter sch_adapter = {
 	.owner		= THIS_MODULE,
-	.class		= I2C_CLASS_HWMON,
+	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.algo		= &smbus_algorithm,
 };
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-mpc.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-mpc.c	2008-06-03 10:28:35.000000000 +0200
@@ -311,7 +311,7 @@ static struct i2c_adapter mpc_ops = {
 	.name = "MPC adapter",
 	.id = I2C_HW_MPC107,
 	.algo = &mpc_algo,
-	.class = I2C_CLASS_HWMON,
+	.class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.timeout = 1,
 };
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-mv64xxx.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-mv64xxx.c	2008-06-03 10:28:35.000000000 +0200
@@ -530,7 +530,7 @@ mv64xxx_i2c_probe(struct platform_device
 	drv_data->adapter.id = I2C_HW_MV64XXX;
 	drv_data->adapter.algo = &mv64xxx_i2c_algo;
 	drv_data->adapter.owner = THIS_MODULE;
-	drv_data->adapter.class = I2C_CLASS_HWMON;
+	drv_data->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	drv_data->adapter.timeout = pdata->timeout;
 	drv_data->adapter.nr = pd->id;
 	platform_set_drvdata(pd, drv_data);
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-nforce2.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-nforce2.c	2008-06-03 10:28:35.000000000 +0200
@@ -356,7 +356,7 @@ static int __devinit nforce2_probe_smb (
 	}
 	smbus->adapter.owner = THIS_MODULE;
 	smbus->adapter.id = I2C_HW_SMBUS_NFORCE2;
-	smbus->adapter.class = I2C_CLASS_HWMON;
+	smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	smbus->adapter.algo = &smbus_algorithm;
 	smbus->adapter.algo_data = smbus;
 	smbus->adapter.dev.parent = &dev->dev;
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-ocores.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-ocores.c	2008-06-03 10:28:35.000000000 +0200
@@ -205,7 +205,7 @@ static const struct i2c_algorithm ocores
 static struct i2c_adapter ocores_adapter = {
 	.owner		= THIS_MODULE,
 	.name		= "i2c-ocores",
-	.class		= I2C_CLASS_HWMON,
+	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.algo		= &ocores_algorithm,
 };
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-omap.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-omap.c	2008-06-03 10:28:35.000000000 +0200
@@ -617,7 +617,7 @@ omap_i2c_probe(struct platform_device *p
 	adap = &dev->adapter;
 	i2c_set_adapdata(adap, dev);
 	adap->owner = THIS_MODULE;
-	adap->class = I2C_CLASS_HWMON;
+	adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	strncpy(adap->name, "OMAP I2C adapter", sizeof(adap->name));
 	adap->algo = &omap_i2c_algo;
 	adap->dev.parent = &pdev->dev;
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-parport-light.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-parport-light.c	2008-06-03 10:28:35.000000000 +0200
@@ -114,7 +114,7 @@ static struct i2c_algo_bit_data parport_
 
 static struct i2c_adapter parport_adapter = {
 	.owner		= THIS_MODULE,
-	.class		= I2C_CLASS_HWMON,
+	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.id		= I2C_HW_B_LP,
 	.algo_data	= &parport_algo_data,
 	.name		= "Parallel port adapter (light)",
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-parport.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-parport.c	2008-06-03 10:28:36.000000000 +0200
@@ -163,7 +163,7 @@ static void i2c_parport_attach (struct p
 
 	/* Fill the rest of the structure */
 	adapter->adapter.owner = THIS_MODULE;
-	adapter->adapter.class = I2C_CLASS_HWMON;
+	adapter->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	adapter->adapter.id = I2C_HW_B_LP;
 	strlcpy(adapter->adapter.name, "Parallel port adapter",
 		sizeof(adapter->adapter.name));
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-pasemi.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-pasemi.c	2008-06-03 10:28:36.000000000 +0200
@@ -365,7 +365,7 @@ static int __devinit pasemi_smb_probe(st
 	smbus->adapter.owner = THIS_MODULE;
 	snprintf(smbus->adapter.name, sizeof(smbus->adapter.name),
 		 "PA Semi SMBus adapter at 0x%lx", smbus->base);
-	smbus->adapter.class = I2C_CLASS_HWMON;
+	smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	smbus->adapter.algo = &smbus_algorithm;
 	smbus->adapter.algo_data = smbus;
 	smbus->adapter.nr = PCI_FUNC(dev->devfn);
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-piix4.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-piix4.c	2008-06-03 10:28:36.000000000 +0200
@@ -406,7 +406,7 @@ static const struct i2c_algorithm smbus_
 static struct i2c_adapter piix4_adapter = {
 	.owner		= THIS_MODULE,
 	.id		= I2C_HW_SMBUS_PIIX4,
-	.class		= I2C_CLASS_HWMON,
+	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.algo		= &smbus_algorithm,
 };
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-pmcmsp.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-pmcmsp.c	2008-06-03 10:28:36.000000000 +0200
@@ -622,7 +622,7 @@ static struct i2c_algorithm pmcmsptwi_al
 
 static struct i2c_adapter pmcmsptwi_adapter = {
 	.owner		= THIS_MODULE,
-	.class		= I2C_CLASS_HWMON,
+	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.algo		= &pmcmsptwi_algo,
 	.name		= DRV_NAME,
 };
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-s3c2410.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-s3c2410.c	2008-06-03 10:28:36.000000000 +0200
@@ -596,7 +596,7 @@ static struct s3c24xx_i2c s3c24xx_i2c = 
 		.owner			= THIS_MODULE,
 		.algo			= &s3c24xx_i2c_algorithm,
 		.retries		= 2,
-		.class			= I2C_CLASS_HWMON,
+		.class			= I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	},
 };
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-sibyte.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-sibyte.c	2008-06-03 10:28:36.000000000 +0200
@@ -156,7 +156,7 @@ static struct i2c_adapter sibyte_board_a
 	{
 		.owner		= THIS_MODULE,
 		.id		= I2C_HW_SIBYTE,
-		.class		= I2C_CLASS_HWMON,
+		.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
 		.algo		= NULL,
 		.algo_data	= &sibyte_board_data[0],
 		.name		= "SiByte SMBus 0",
@@ -164,7 +164,7 @@ static struct i2c_adapter sibyte_board_a
 	{
 		.owner		= THIS_MODULE,
 		.id		= I2C_HW_SIBYTE,
-		.class		= I2C_CLASS_HWMON,
+		.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
 		.algo		= NULL,
 		.algo_data	= &sibyte_board_data[1],
 		.name		= "SiByte SMBus 1",
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-sis5595.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-sis5595.c	2008-06-03 10:28:36.000000000 +0200
@@ -368,7 +368,7 @@ static const struct i2c_algorithm smbus_
 static struct i2c_adapter sis5595_adapter = {
 	.owner		= THIS_MODULE,
 	.id		= I2C_HW_SMBUS_SIS5595,
-	.class          = I2C_CLASS_HWMON,
+	.class          = I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.algo		= &smbus_algorithm,
 };
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-sis630.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-sis630.c	2008-06-03 10:28:36.000000000 +0200
@@ -468,7 +468,7 @@ static const struct i2c_algorithm smbus_
 static struct i2c_adapter sis630_adapter = {
 	.owner		= THIS_MODULE,
 	.id		= I2C_HW_SMBUS_SIS630,
-	.class		= I2C_CLASS_HWMON,
+	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.algo		= &smbus_algorithm,
 };
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-sis96x.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-sis96x.c	2008-06-03 10:28:36.000000000 +0200
@@ -245,7 +245,7 @@ static const struct i2c_algorithm smbus_
 static struct i2c_adapter sis96x_adapter = {
 	.owner		= THIS_MODULE,
 	.id		= I2C_HW_SMBUS_SIS96X,
-	.class		= I2C_CLASS_HWMON,
+	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.algo		= &smbus_algorithm,
 };
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-stub.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-stub.c	2008-06-03 10:28:36.000000000 +0200
@@ -140,7 +140,7 @@ static const struct i2c_algorithm smbus_
 
 static struct i2c_adapter stub_adapter = {
 	.owner		= THIS_MODULE,
-	.class		= I2C_CLASS_HWMON,
+	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.algo		= &smbus_algorithm,
 	.name		= "SMBus stub driver",
 };
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-tiny-usb.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-tiny-usb.c	2008-06-03 10:28:36.000000000 +0200
@@ -209,7 +209,7 @@ static int i2c_tiny_usb_probe(struct usb
 
 	/* setup i2c adapter description */
 	dev->adapter.owner = THIS_MODULE;
-	dev->adapter.class = I2C_CLASS_HWMON;
+	dev->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	dev->adapter.algo = &usb_algorithm;
 	dev->adapter.algo_data = dev;
 	snprintf(dev->adapter.name, sizeof(dev->adapter.name),
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-via.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-via.c	2008-06-03 10:28:36.000000000 +0200
@@ -87,7 +87,7 @@ static struct i2c_algo_bit_data bit_data
 static struct i2c_adapter vt586b_adapter = {
 	.owner		= THIS_MODULE,
 	.id		= I2C_HW_B_VIA,
-	.class          = I2C_CLASS_HWMON,
+	.class          = I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.name		= "VIA i2c",
 	.algo_data	= &bit_data,
 };
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/i2c-viapro.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/i2c-viapro.c	2008-06-03 10:28:36.000000000 +0200
@@ -312,7 +312,7 @@ static const struct i2c_algorithm smbus_
 static struct i2c_adapter vt596_adapter = {
 	.owner		= THIS_MODULE,
 	.id		= I2C_HW_SMBUS_VIA2,
-	.class		= I2C_CLASS_HWMON,
+	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.algo		= &smbus_algorithm,
 };
 
--- linux-2.6.26-rc4.orig/drivers/i2c/busses/scx200_acb.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc4/drivers/i2c/busses/scx200_acb.c	2008-06-03 10:28:36.000000000 +0200
@@ -442,7 +442,7 @@ static __init struct scx200_acb_iface *s
 	adapter->owner = THIS_MODULE;
 	adapter->id = I2C_HW_SMBUS_SCX200;
 	adapter->algo = &scx200_acb_algorithm;
-	adapter->class = I2C_CLASS_HWMON;
+	adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	adapter->dev.parent = dev;
 
 	mutex_init(&iface->mutex);
--- linux-2.6.26-rc4.orig/include/linux/i2c.h	2008-06-03 10:03:37.000000000 +0200
+++ linux-2.6.26-rc4/include/linux/i2c.h	2008-06-03 10:32:20.000000000 +0200
@@ -353,6 +353,7 @@ static inline void i2c_set_adapdata (str
 #define I2C_CLASS_CAM_ANALOG	(1<<4)	/* camera with analog CCD */
 #define I2C_CLASS_CAM_DIGITAL	(1<<5)	/* most webcams */
 #define I2C_CLASS_SOUND		(1<<6)	/* sound devices */
+#define I2C_CLASS_SPD		(1<<7)	/* SPD EEPROMs and similar */
 #define I2C_CLASS_ALL		(UINT_MAX) /* all of the above */
 
 /* i2c_client_address_data is the struct for holding default client


-- 
Jean Delvare

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] i2c: Let bus drivers add SPD to their class
       [not found] ` <20080603130221.1f819e64-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
@ 2008-06-03 20:19   ` David Brownell
       [not found]     ` <200806031319.56606.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: David Brownell @ 2008-06-03 20:19 UTC (permalink / raw)
  To: Jean Delvare; +Cc: Linux I2C

On Tuesday 03 June 2008, Jean Delvare wrote:
> 
> Note that I took a conservative approach here, adding I2C_CLASS_SPD to
> all drivers that had I2C_CLASS_HWMON before. This is to make sure that
> the eeprom driver doesn't stop probing buses where SPD EEPROMs live.
> But the truth is that, for most of these, I simply have no idea whether
> they can host SPD EEPROMs or not.

Few embedded platforms use discrete sticks of DRAM.
My two cents:  use the opposite default in those cases.

I'll highlight a few below, where I happen to have more
specific knowledge.


> So, bus driver maintainers and users 
> should feel free to remove the SPD class from drivers those buses never
> have SPD EEPROMs or they don't want the eeprom driver to bind to them.
> Likewise, feel free to add the SPD class to any bus driver I might have
> missed.
> 
> Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> ---
>  drivers/i2c/busses/i2c-ali1535.c       |    2 +-
>  drivers/i2c/busses/i2c-ali1563.c       |    2 +-
>  drivers/i2c/busses/i2c-ali15x3.c       |    2 +-
>  drivers/i2c/busses/i2c-amd756.c        |    2 +-
>  drivers/i2c/busses/i2c-amd8111.c       |    2 +-
>  drivers/i2c/busses/i2c-at91.c          |    2 +-

I've never heard of an AT91 board using DRAM sticks ...

>  drivers/i2c/busses/i2c-cpm.c           |    2 +-
>  drivers/i2c/busses/i2c-davinci.c       |    2 +-

... or a DaVinci one ...


>  drivers/i2c/busses/i2c-elektor.c       |    2 +-
>  drivers/i2c/busses/i2c-gpio.c          |    2 +-
>  drivers/i2c/busses/i2c-i801.c          |    2 +-
>  drivers/i2c/busses/i2c-ibm_iic.c       |    4 ++--
>  drivers/i2c/busses/i2c-iop3xx.c        |    2 +-
>  drivers/i2c/busses/i2c-isch.c          |    2 +-
>  drivers/i2c/busses/i2c-mpc.c           |    2 +-
>  drivers/i2c/busses/i2c-mv64xxx.c       |    2 +-
>  drivers/i2c/busses/i2c-nforce2.c       |    2 +-
>  drivers/i2c/busses/i2c-ocores.c        |    2 +-
>  drivers/i2c/busses/i2c-omap.c          |    2 +-

... or an OMAP one ...

>  drivers/i2c/busses/i2c-parport-light.c |    2 +-
>  drivers/i2c/busses/i2c-parport.c       |    2 +-
>  drivers/i2c/busses/i2c-pasemi.c        |    2 +-
>  drivers/i2c/busses/i2c-piix4.c         |    2 +-
>  drivers/i2c/busses/i2c-pmcmsp.c        |    2 +-
>  drivers/i2c/busses/i2c-s3c2410.c       |    2 +-
>  drivers/i2c/busses/i2c-sibyte.c        |    4 ++--
>  drivers/i2c/busses/i2c-sis5595.c       |    2 +-
>  drivers/i2c/busses/i2c-sis630.c        |    2 +-
>  drivers/i2c/busses/i2c-sis96x.c        |    2 +-
>  drivers/i2c/busses/i2c-stub.c          |    2 +-
>  drivers/i2c/busses/i2c-tiny-usb.c      |    2 +-

... DRAM-over-USB would be bizarre too ...

>  drivers/i2c/busses/i2c-via.c           |    2 +-
>  drivers/i2c/busses/i2c-viapro.c        |    2 +-
>  drivers/i2c/busses/scx200_acb.c        |    2 +-
>  include/linux/i2c.h                    |    1 +
>  35 files changed, 37 insertions(+), 36 deletions(-)



_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] i2c: Let bus drivers add SPD to their class
       [not found]     ` <200806031319.56606.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
@ 2008-06-03 21:12       ` Jon Smirl
       [not found]         ` <9e4733910806031412t52e7ed1bl8fd56751bef12a7a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2008-06-04  6:09       ` Jean Delvare
  1 sibling, 1 reply; 11+ messages in thread
From: Jon Smirl @ 2008-06-03 21:12 UTC (permalink / raw)
  To: David Brownell; +Cc: Linux I2C

On 6/3/08, David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org> wrote:
> On Tuesday 03 June 2008, Jean Delvare wrote:
>  >
>  > Note that I took a conservative approach here, adding I2C_CLASS_SPD to
>  > all drivers that had I2C_CLASS_HWMON before. This is to make sure that
>  > the eeprom driver doesn't stop probing buses where SPD EEPROMs live.
>  > But the truth is that, for most of these, I simply have no idea whether
>  > they can host SPD EEPROMs or not.
>
>
> Few embedded platforms use discrete sticks of DRAM.
>  My two cents:  use the opposite default in those cases.
>
>  I'll highlight a few below, where I happen to have more
>  specific knowledge.
>
>
>
>  > So, bus driver maintainers and users
>  > should feel free to remove the SPD class from drivers those buses never
>  > have SPD EEPROMs or they don't want the eeprom driver to bind to them.
>  > Likewise, feel free to add the SPD class to any bus driver I might have
>  > missed.
>  >
>  > Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
>  > ---
>  >  drivers/i2c/busses/i2c-ali1535.c       |    2 +-
>  >  drivers/i2c/busses/i2c-ali1563.c       |    2 +-
>  >  drivers/i2c/busses/i2c-ali15x3.c       |    2 +-
>  >  drivers/i2c/busses/i2c-amd756.c        |    2 +-
>  >  drivers/i2c/busses/i2c-amd8111.c       |    2 +-
>  >  drivers/i2c/busses/i2c-at91.c          |    2 +-
>
>
> I've never heard of an AT91 board using DRAM sticks ...
>
>
>  >  drivers/i2c/busses/i2c-cpm.c           |    2 +-
>  >  drivers/i2c/busses/i2c-davinci.c       |    2 +-
>
>
> ... or a DaVinci one ...
>
>
>
>  >  drivers/i2c/busses/i2c-elektor.c       |    2 +-
>  >  drivers/i2c/busses/i2c-gpio.c          |    2 +-
>  >  drivers/i2c/busses/i2c-i801.c          |    2 +-
>  >  drivers/i2c/busses/i2c-ibm_iic.c       |    4 ++--
>  >  drivers/i2c/busses/i2c-iop3xx.c        |    2 +-
>  >  drivers/i2c/busses/i2c-isch.c          |    2 +-
>  >  drivers/i2c/busses/i2c-mpc.c           |    2 +-

Freescale embedded, no sticks

>  >  drivers/i2c/busses/i2c-mv64xxx.c       |    2 +-
>  >  drivers/i2c/busses/i2c-nforce2.c       |    2 +-
>  >  drivers/i2c/busses/i2c-ocores.c        |    2 +-
>  >  drivers/i2c/busses/i2c-omap.c          |    2 +-
>
>
> ... or an OMAP one ...
>
>
>  >  drivers/i2c/busses/i2c-parport-light.c |    2 +-
>  >  drivers/i2c/busses/i2c-parport.c       |    2 +-
>  >  drivers/i2c/busses/i2c-pasemi.c        |    2 +-
>  >  drivers/i2c/busses/i2c-piix4.c         |    2 +-
>  >  drivers/i2c/busses/i2c-pmcmsp.c        |    2 +-
>  >  drivers/i2c/busses/i2c-s3c2410.c       |    2 +-
>  >  drivers/i2c/busses/i2c-sibyte.c        |    4 ++--
>  >  drivers/i2c/busses/i2c-sis5595.c       |    2 +-
>  >  drivers/i2c/busses/i2c-sis630.c        |    2 +-
>  >  drivers/i2c/busses/i2c-sis96x.c        |    2 +-
>  >  drivers/i2c/busses/i2c-stub.c          |    2 +-
>  >  drivers/i2c/busses/i2c-tiny-usb.c      |    2 +-
>
>
> ... DRAM-over-USB would be bizarre too ...
>
>
>  >  drivers/i2c/busses/i2c-via.c           |    2 +-
>  >  drivers/i2c/busses/i2c-viapro.c        |    2 +-
>  >  drivers/i2c/busses/scx200_acb.c        |    2 +-
>  >  include/linux/i2c.h                    |    1 +
>  >  35 files changed, 37 insertions(+), 36 deletions(-)
>
>
>
>
> _______________________________________________
>  i2c mailing list
>  i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
>  http://lists.lm-sensors.org/mailman/listinfo/i2c
>


-- 
Jon Smirl
jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] i2c: Let bus drivers add SPD to their class
       [not found]         ` <9e4733910806031412t52e7ed1bl8fd56751bef12a7a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2008-06-03 21:33           ` Trent Piepho
       [not found]             ` <Pine.LNX.4.58.0806031420160.10290-13q4cmjDBaTP3RPoUHIrnuTW4wlIGRCZ@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Trent Piepho @ 2008-06-03 21:33 UTC (permalink / raw)
  To: Jon Smirl; +Cc: David Brownell, Linux I2C

On Tue, 3 Jun 2008, Jon Smirl wrote:
> >  >  drivers/i2c/busses/i2c-elektor.c       |    2 +-
> >  >  drivers/i2c/busses/i2c-gpio.c          |    2 +-
> >  >  drivers/i2c/busses/i2c-i801.c          |    2 +-
> >  >  drivers/i2c/busses/i2c-ibm_iic.c       |    4 ++--
> >  >  drivers/i2c/busses/i2c-iop3xx.c        |    2 +-
> >  >  drivers/i2c/busses/i2c-isch.c          |    2 +-
> >  >  drivers/i2c/busses/i2c-mpc.c           |    2 +-
>
> Freescale embedded, no sticks

I know you're wrong about this one, because I have a Freescale board with
an mpc i2c adapter with SPD SODIMMs on the I2C bus sitting right in front
of me.  The whole reason I added hexdump support the I2C tools' SPD parser
was so I could parse the SPD data by hexdumping the eeproms with busybox.

Using SPD with embedded boards isn't uncommon.  It's much easier to design
a board with a SO-DIMM slot than actual chips.  In small quantities at
least, it's cheaper too.  Using SPD is much more flexiable when you want to
change memory size or speed, even if the memory isn't socketed.  If you
look at U-Boot, most platforms are using SPD for DRAM controller setup and
not hard coded values.

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] i2c: Let bus drivers add SPD to their class
       [not found]             ` <Pine.LNX.4.58.0806031420160.10290-13q4cmjDBaTP3RPoUHIrnuTW4wlIGRCZ@public.gmane.org>
@ 2008-06-03 22:03               ` Jon Smirl
       [not found]                 ` <9e4733910806031503w46662d4fib36d3b67563bbdf1-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Jon Smirl @ 2008-06-03 22:03 UTC (permalink / raw)
  To: Trent Piepho; +Cc: David Brownell, Linux I2C

On 6/3/08, Trent Piepho <xyzzy-zY4eFNvK5D+xbKUeIHjxjQ@public.gmane.org> wrote:
> On Tue, 3 Jun 2008, Jon Smirl wrote:
>  > >  >  drivers/i2c/busses/i2c-elektor.c       |    2 +-
>  > >  >  drivers/i2c/busses/i2c-gpio.c          |    2 +-
>  > >  >  drivers/i2c/busses/i2c-i801.c          |    2 +-
>  > >  >  drivers/i2c/busses/i2c-ibm_iic.c       |    4 ++--
>  > >  >  drivers/i2c/busses/i2c-iop3xx.c        |    2 +-
>  > >  >  drivers/i2c/busses/i2c-isch.c          |    2 +-
>  > >  >  drivers/i2c/busses/i2c-mpc.c           |    2 +-
>  >
>  > Freescale embedded, no sticks
>
>
> I know you're wrong about this one, because I have a Freescale board with
>  an mpc i2c adapter with SPD SODIMMs on the I2C bus sitting right in front
>  of me.  The whole reason I added hexdump support the I2C tools' SPD parser
>  was so I could parse the SPD data by hexdumping the eeproms with busybox.

Which CPU are you using? Maybe we should change to a socket.

>  Using SPD with embedded boards isn't uncommon.  It's much easier to design
>  a board with a SO-DIMM slot than actual chips.  In small quantities at
>  least, it's cheaper too.  Using SPD is much more flexiable when you want to
>  change memory size or speed, even if the memory isn't socketed.  If you
>  look at U-Boot, most platforms are using SPD for DRAM controller setup and
>  not hard coded values.
>


-- 
Jon Smirl
jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] i2c: Let bus drivers add SPD to their class
       [not found]     ` <200806031319.56606.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
  2008-06-03 21:12       ` Jon Smirl
@ 2008-06-04  6:09       ` Jean Delvare
       [not found]         ` <20080604080933.456c8ce2-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
  1 sibling, 1 reply; 11+ messages in thread
From: Jean Delvare @ 2008-06-04  6:09 UTC (permalink / raw)
  To: David Brownell; +Cc: Linux I2C

Hi David,

Thanks for the feedback.

On Tue, 3 Jun 2008 13:19:56 -0700, David Brownell wrote:
> On Tuesday 03 June 2008, Jean Delvare wrote:
> > 
> > Note that I took a conservative approach here, adding I2C_CLASS_SPD to
> > all drivers that had I2C_CLASS_HWMON before. This is to make sure that
> > the eeprom driver doesn't stop probing buses where SPD EEPROMs live.
> > But the truth is that, for most of these, I simply have no idea whether
> > they can host SPD EEPROMs or not.
> 
> Few embedded platforms use discrete sticks of DRAM.
> My two cents:  use the opposite default in those cases.

I wish I knew which of these bus drivers exactly are for embedded
platforms. Would you be able to give me a list of all drivers under
drivers/i2c/busses that fall in this category? I would be able to update
http://lists.lm-sensors.org/pipermail/i2c/2008-May/003713.html
then.

Also, couldn't these platforms have other EEPROMs on these buses,
either EDID EEPROMs or proprietary ones, for which people might be
using the read-only eeprom driver at the moment? I don't want users to
experience a regression by applying this patch set. I'd rather have
them migrate their platform to the at24 driver once it is upstream and
remove the I2C_CLASS_SPD flag when they do.

> 
> I'll highlight a few below, where I happen to have more
> specific knowledge.
> 
> 
> > So, bus driver maintainers and users 
> > should feel free to remove the SPD class from drivers those buses never
> > have SPD EEPROMs or they don't want the eeprom driver to bind to them.
> > Likewise, feel free to add the SPD class to any bus driver I might have
> > missed.
> > 
> > Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> > ---
> >  drivers/i2c/busses/i2c-ali1535.c       |    2 +-
> >  drivers/i2c/busses/i2c-ali1563.c       |    2 +-
> >  drivers/i2c/busses/i2c-ali15x3.c       |    2 +-
> >  drivers/i2c/busses/i2c-amd756.c        |    2 +-
> >  drivers/i2c/busses/i2c-amd8111.c       |    2 +-
> >  drivers/i2c/busses/i2c-at91.c          |    2 +-
> 
> I've never heard of an AT91 board using DRAM sticks ...
> 
> >  drivers/i2c/busses/i2c-cpm.c           |    2 +-
> >  drivers/i2c/busses/i2c-davinci.c       |    2 +-
> 
> ... or a DaVinci one ...
> 
> 
> >  drivers/i2c/busses/i2c-elektor.c       |    2 +-
> >  drivers/i2c/busses/i2c-gpio.c          |    2 +-
> >  drivers/i2c/busses/i2c-i801.c          |    2 +-
> >  drivers/i2c/busses/i2c-ibm_iic.c       |    4 ++--
> >  drivers/i2c/busses/i2c-iop3xx.c        |    2 +-
> >  drivers/i2c/busses/i2c-isch.c          |    2 +-
> >  drivers/i2c/busses/i2c-mpc.c           |    2 +-
> >  drivers/i2c/busses/i2c-mv64xxx.c       |    2 +-
> >  drivers/i2c/busses/i2c-nforce2.c       |    2 +-
> >  drivers/i2c/busses/i2c-ocores.c        |    2 +-
> >  drivers/i2c/busses/i2c-omap.c          |    2 +-
> 
> ... or an OMAP one ...
> 
> >  drivers/i2c/busses/i2c-parport-light.c |    2 +-
> >  drivers/i2c/busses/i2c-parport.c       |    2 +-
> >  drivers/i2c/busses/i2c-pasemi.c        |    2 +-
> >  drivers/i2c/busses/i2c-piix4.c         |    2 +-
> >  drivers/i2c/busses/i2c-pmcmsp.c        |    2 +-
> >  drivers/i2c/busses/i2c-s3c2410.c       |    2 +-
> >  drivers/i2c/busses/i2c-sibyte.c        |    4 ++--
> >  drivers/i2c/busses/i2c-sis5595.c       |    2 +-
> >  drivers/i2c/busses/i2c-sis630.c        |    2 +-
> >  drivers/i2c/busses/i2c-sis96x.c        |    2 +-
> >  drivers/i2c/busses/i2c-stub.c          |    2 +-
> >  drivers/i2c/busses/i2c-tiny-usb.c      |    2 +-
> 
> ... DRAM-over-USB would be bizarre too ...
> 
> >  drivers/i2c/busses/i2c-via.c           |    2 +-
> >  drivers/i2c/busses/i2c-viapro.c        |    2 +-
> >  drivers/i2c/busses/scx200_acb.c        |    2 +-
> >  include/linux/i2c.h                    |    1 +
> >  35 files changed, 37 insertions(+), 36 deletions(-)

OK, I'll revert the change for these 4 drivers.

Thanks,
-- 
Jean Delvare

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] i2c: Let bus drivers add SPD to their class
       [not found]         ` <20080604080933.456c8ce2-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
@ 2008-06-04  7:18           ` David Brownell
       [not found]             ` <200806040018.10191.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: David Brownell @ 2008-06-04  7:18 UTC (permalink / raw)
  To: Jean Delvare; +Cc: Linux I2C

On Tuesday 03 June 2008, Jean Delvare wrote:

> > Few embedded platforms use discrete sticks of DRAM.
> > My two cents:  use the opposite default in those cases.
> 
> I wish I knew which of these bus drivers exactly are for embedded
> platforms.

To be strictly correct, "embedded" is an application issue
more than a hardware issue.  One can "embed" mainframes in
an Air Traffic Control system.

So the issue there is more whether such usage is common
or, in some cases, even practical.


> Would you be able to give me a list of all drivers under 
> drivers/i2c/busses that fall in this category? I would be able to update
> http://lists.lm-sensors.org/pipermail/i2c/2008-May/003713.html
> then.

Not really; sorry.


> Also, couldn't these platforms have other EEPROMs on these buses,
> either EDID EEPROMs or proprietary ones, for which people might be
> using the read-only eeprom driver at the moment? I don't want users to
> experience a regression by applying this patch set. I'd rather have
> them migrate their platform to the at24 driver once it is upstream and
> remove the I2C_CLASS_SPD flag when they do.

Unlikely.  At least in the cases I called out.

Oh, and parport.  DRAM sticks, or LCD displays, over parport
links would be strange.  ;)

- Dave



> > I'll highlight a few below, where I happen to have more
> > specific knowledge.
> > 
> > 
> > > So, bus driver maintainers and users 
> > > should feel free to remove the SPD class from drivers those buses never
> > > have SPD EEPROMs or they don't want the eeprom driver to bind to them.
> > > Likewise, feel free to add the SPD class to any bus driver I might have
> > > missed.
> > > 
> > > Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> > > ---
> > >  drivers/i2c/busses/i2c-ali1535.c       |    2 +-
> > >  drivers/i2c/busses/i2c-ali1563.c       |    2 +-
> > >  drivers/i2c/busses/i2c-ali15x3.c       |    2 +-
> > >  drivers/i2c/busses/i2c-amd756.c        |    2 +-
> > >  drivers/i2c/busses/i2c-amd8111.c       |    2 +-
> > >  drivers/i2c/busses/i2c-at91.c          |    2 +-
> > 
> > I've never heard of an AT91 board using DRAM sticks ...
> > 
> > >  drivers/i2c/busses/i2c-cpm.c           |    2 +-
> > >  drivers/i2c/busses/i2c-davinci.c       |    2 +-
> > 
> > ... or a DaVinci one ...
> > 
> > 
> > >  drivers/i2c/busses/i2c-elektor.c       |    2 +-
> > >  drivers/i2c/busses/i2c-gpio.c          |    2 +-
> > >  drivers/i2c/busses/i2c-i801.c          |    2 +-
> > >  drivers/i2c/busses/i2c-ibm_iic.c       |    4 ++--
> > >  drivers/i2c/busses/i2c-iop3xx.c        |    2 +-
> > >  drivers/i2c/busses/i2c-isch.c          |    2 +-
> > >  drivers/i2c/busses/i2c-mpc.c           |    2 +-
> > >  drivers/i2c/busses/i2c-mv64xxx.c       |    2 +-
> > >  drivers/i2c/busses/i2c-nforce2.c       |    2 +-
> > >  drivers/i2c/busses/i2c-ocores.c        |    2 +-
> > >  drivers/i2c/busses/i2c-omap.c          |    2 +-
> > 
> > ... or an OMAP one ...
> > 
> > >  drivers/i2c/busses/i2c-parport-light.c |    2 +-
> > >  drivers/i2c/busses/i2c-parport.c       |    2 +-
> > >  drivers/i2c/busses/i2c-pasemi.c        |    2 +-
> > >  drivers/i2c/busses/i2c-piix4.c         |    2 +-
> > >  drivers/i2c/busses/i2c-pmcmsp.c        |    2 +-
> > >  drivers/i2c/busses/i2c-s3c2410.c       |    2 +-
> > >  drivers/i2c/busses/i2c-sibyte.c        |    4 ++--
> > >  drivers/i2c/busses/i2c-sis5595.c       |    2 +-
> > >  drivers/i2c/busses/i2c-sis630.c        |    2 +-
> > >  drivers/i2c/busses/i2c-sis96x.c        |    2 +-
> > >  drivers/i2c/busses/i2c-stub.c          |    2 +-
> > >  drivers/i2c/busses/i2c-tiny-usb.c      |    2 +-
> > 
> > ... DRAM-over-USB would be bizarre too ...
> > 
> > >  drivers/i2c/busses/i2c-via.c           |    2 +-
> > >  drivers/i2c/busses/i2c-viapro.c        |    2 +-
> > >  drivers/i2c/busses/scx200_acb.c        |    2 +-
> > >  include/linux/i2c.h                    |    1 +
> > >  35 files changed, 37 insertions(+), 36 deletions(-)
> 
> OK, I'll revert the change for these 4 drivers.



_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] i2c: Let bus drivers add SPD to their class
       [not found]                 ` <9e4733910806031503w46662d4fib36d3b67563bbdf1-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2008-06-04 19:59                   ` Trent Piepho
  0 siblings, 0 replies; 11+ messages in thread
From: Trent Piepho @ 2008-06-04 19:59 UTC (permalink / raw)
  To: Jon Smirl; +Cc: Linux I2C

On Tue, 3 Jun 2008, Jon Smirl wrote:
> On 6/3/08, Trent Piepho <xyzzy-zY4eFNvK5D+xbKUeIHjxjQ@public.gmane.org> wrote:
> > On Tue, 3 Jun 2008, Jon Smirl wrote:
> >  > >  >  drivers/i2c/busses/i2c-elektor.c       |    2 +-
> >  > >  >  drivers/i2c/busses/i2c-gpio.c          |    2 +-
> >  > >  >  drivers/i2c/busses/i2c-i801.c          |    2 +-
> >  > >  >  drivers/i2c/busses/i2c-ibm_iic.c       |    4 ++--
> >  > >  >  drivers/i2c/busses/i2c-iop3xx.c        |    2 +-
> >  > >  >  drivers/i2c/busses/i2c-isch.c          |    2 +-
> >  > >  >  drivers/i2c/busses/i2c-mpc.c           |    2 +-
> >  >
> >  > Freescale embedded, no sticks
> >
> >
> > I know you're wrong about this one, because I have a Freescale board with
> >  an mpc i2c adapter with SPD SODIMMs on the I2C bus sitting right in front
> >  of me.  The whole reason I added hexdump support the I2C tools' SPD parser
> >  was so I could parse the SPD data by hexdumping the eeproms with busybox.
>
> Which CPU are you using? Maybe we should change to a socket.

MPC8572E, but U-Boot has support for programming the DRAM controller from
SPD data for a lot of Freescale chips.

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] i2c: Let bus drivers add SPD to their class
       [not found]             ` <200806040018.10191.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
@ 2008-06-04 20:05               ` Trent Piepho
       [not found]                 ` <Pine.LNX.4.58.0806041303340.10290-13q4cmjDBaTP3RPoUHIrnuTW4wlIGRCZ@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Trent Piepho @ 2008-06-04 20:05 UTC (permalink / raw)
  To: David Brownell; +Cc: Linux I2C

On Wed, 4 Jun 2008, David Brownell wrote:
> > Also, couldn't these platforms have other EEPROMs on these buses,
> > either EDID EEPROMs or proprietary ones, for which people might be
> > using the read-only eeprom driver at the moment? I don't want users to
> > experience a regression by applying this patch set. I'd rather have
> > them migrate their platform to the at24 driver once it is upstream and
> > remove the I2C_CLASS_SPD flag when they do.
>
> Unlikely.  At least in the cases I called out.
>
> Oh, and parport.  DRAM sticks, or LCD displays, over parport
> links would be strange.  ;)

An eeprom programmer or reader using a parport i2c interface doesn't seem
all that strange.  If I needed to make an i2c eeprom programmer, that's
probably what I'd do.

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] i2c: Let bus drivers add SPD to their class
       [not found]                 ` <Pine.LNX.4.58.0806041303340.10290-13q4cmjDBaTP3RPoUHIrnuTW4wlIGRCZ@public.gmane.org>
@ 2008-06-04 20:48                   ` David Brownell
  2008-06-04 21:01                   ` Jean Delvare
  1 sibling, 0 replies; 11+ messages in thread
From: David Brownell @ 2008-06-04 20:48 UTC (permalink / raw)
  To: Trent Piepho; +Cc: Linux I2C

On Wednesday 04 June 2008, Trent Piepho wrote:
> >
> > Unlikely.  At least in the cases I called out.
> >
> > Oh, and parport.  DRAM sticks, or LCD displays, over parport
> > links would be strange.  ;)
> 
> An eeprom programmer or reader using a parport i2c interface doesn't seem
> all that strange.  If I needed to make an i2c eeprom programmer, that's
> probably what I'd do.

The "eeprom" driver doesn't support programming;
those are all cases where the at24 driver should
be used.

SPD and DDC are specific applications of EEPROMs,
and they are not applications that work on parports.


_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] i2c: Let bus drivers add SPD to their class
       [not found]                 ` <Pine.LNX.4.58.0806041303340.10290-13q4cmjDBaTP3RPoUHIrnuTW4wlIGRCZ@public.gmane.org>
  2008-06-04 20:48                   ` David Brownell
@ 2008-06-04 21:01                   ` Jean Delvare
  1 sibling, 0 replies; 11+ messages in thread
From: Jean Delvare @ 2008-06-04 21:01 UTC (permalink / raw)
  To: Trent Piepho; +Cc: David Brownell, Linux I2C

Hi Trent,

On Wed, 4 Jun 2008 13:05:31 -0700 (PDT), Trent Piepho wrote:
> On Wed, 4 Jun 2008, David Brownell wrote:
> > Oh, and parport.  DRAM sticks, or LCD displays, over parport
> > links would be strange.  ;)
> 
> An eeprom programmer or reader using a parport i2c interface doesn't seem
> all that strange.  If I needed to make an i2c eeprom programmer, that's
> probably what I'd do.

But then you'd use the eeprog user-space tool (or equivalent) to read
from and write to the EEPROM, rather than the read-only eeprom driver,
wouldn't you?

-- 
Jean Delvare

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-06-04 21:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-03 11:02 [PATCH 2/3] i2c: Let bus drivers add SPD to their class Jean Delvare
     [not found] ` <20080603130221.1f819e64-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-06-03 20:19   ` David Brownell
     [not found]     ` <200806031319.56606.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-06-03 21:12       ` Jon Smirl
     [not found]         ` <9e4733910806031412t52e7ed1bl8fd56751bef12a7a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-06-03 21:33           ` Trent Piepho
     [not found]             ` <Pine.LNX.4.58.0806031420160.10290-13q4cmjDBaTP3RPoUHIrnuTW4wlIGRCZ@public.gmane.org>
2008-06-03 22:03               ` Jon Smirl
     [not found]                 ` <9e4733910806031503w46662d4fib36d3b67563bbdf1-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-06-04 19:59                   ` Trent Piepho
2008-06-04  6:09       ` Jean Delvare
     [not found]         ` <20080604080933.456c8ce2-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-06-04  7:18           ` David Brownell
     [not found]             ` <200806040018.10191.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-06-04 20:05               ` Trent Piepho
     [not found]                 ` <Pine.LNX.4.58.0806041303340.10290-13q4cmjDBaTP3RPoUHIrnuTW4wlIGRCZ@public.gmane.org>
2008-06-04 20:48                   ` David Brownell
2008-06-04 21:01                   ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox