i2c: Let bus drivers add SPD to their class
Subsystems (19)
PATCH 2/3 i2c: Let bus drivers add SPD to their class
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.
--- 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(-)
drivers/i2c/busses/i2c-ali1535.c +1 -1
@@ -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, };
drivers/i2c/busses/i2c-ali1563.c +1 -1
@@ -387,7 +387,7 @@ static const struct i2c_algorithm ali156static 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, };
drivers/i2c/busses/i2c-ali15x3.c +1 -1
@@ -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, };
drivers/i2c/busses/i2c-amd756.c +1 -1
@@ -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, };
drivers/i2c/busses/i2c-amd8111.c +1 -1
@@ -388,7 +388,7 @@ static int __devinit amd8111_probe(strucsnprintf (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;
drivers/i2c/busses/i2c-at91.c +1 -1
@@ -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 */
drivers/i2c/busses/i2c-cpm.c +1 -1
@@ -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)
drivers/i2c/busses/i2c-davinci.c +1 -1
@@ -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;
drivers/i2c/busses/i2c-elektor.c +1 -1
@@ -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" ,
drivers/i2c/busses/i2c-gpio.c +1 -1
@@ -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;/*
drivers/i2c/busses/i2c-i801.c +1 -1
@@ -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, };
drivers/i2c/busses/i2c-ibm_iic.c +2 -2
@@ -740,7 +740,7 @@ static int __devinit iic_probe(struct ocstrcpy (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 ofstrlcpy (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;
drivers/i2c/busses/i2c-iop3xx.c +1 -1
@@ -482,7 +482,7 @@ iop3xx_i2c_probe(struct platform_devicememcpy (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;
drivers/i2c/busses/i2c-isch.c +1 -1
@@ -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, };
drivers/i2c/busses/i2c-mpc.c +1 -1
@@ -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, };
drivers/i2c/busses/i2c-mv64xxx.c +1 -1
@@ -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);
drivers/i2c/busses/i2c-nforce2.c +1 -1
@@ -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;
drivers/i2c/busses/i2c-ocores.c +1 -1
@@ -205,7 +205,7 @@ static const struct i2c_algorithm ocoresstatic 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, };
drivers/i2c/busses/i2c-omap.c +1 -1
@@ -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;
drivers/i2c/busses/i2c-parport-light.c +1 -1
@@ -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)" ,
drivers/i2c/busses/i2c-parport.c +1 -1
@@ -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));
drivers/i2c/busses/i2c-pasemi.c +1 -1
@@ -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);
drivers/i2c/busses/i2c-piix4.c +1 -1
@@ -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, };
drivers/i2c/busses/i2c-pmcmsp.c +1 -1
@@ -622,7 +622,7 @@ static struct i2c_algorithm pmcmsptwi_alstatic 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 , };
drivers/i2c/busses/i2c-s3c2410.c +1 -1
@@ -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, }, };
drivers/i2c/busses/i2c-sibyte.c +2 -2
@@ -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",
drivers/i2c/busses/i2c-sis5595.c +1 -1
@@ -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, };
drivers/i2c/busses/i2c-sis630.c +1 -1
@@ -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, };
drivers/i2c/busses/i2c-sis96x.c +1 -1
@@ -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, };
drivers/i2c/busses/i2c-stub.c +1 -1
@@ -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" , };
drivers/i2c/busses/i2c-tiny-usb.c +1 -1
@@ -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),
drivers/i2c/busses/i2c-via.c +1 -1
@@ -87,7 +87,7 @@ static struct i2c_algo_bit_data bit_datastatic 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, };
drivers/i2c/busses/i2c-viapro.c +1 -1
@@ -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, };
drivers/i2c/busses/scx200_acb.c +1 -1
@@ -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);
include/linux/i2c.h +1 -0
@@ -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
Signature · 6 lines
Jean Delvare _______________________________________________ i2c mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/i2c
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Jean Delvare
Note that I took a conservative approach here, adding
I2C_CLASS_SPDto all drivers that hadI2C_CLASS_HWMONbefore. 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.
Quoted 6 lines
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.
Quoted 8 lines
Signed-off-by Jean Delvare <[email protected]>---
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 ...
Quoted 2 lines
drivers/i2c/busses/i2c-cpm.c | 2 +-
drivers/i2c/busses/i2c-davinci.c | 2 +-
... or a DaVinci one ...
Quoted 11 lines
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 ...
Quoted 5 lines
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 +-
Quoted 7 lines
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 ...
Quoted 5 lines
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
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c
A message that is not in the archive (sent off-list or not yet received): 200806031319.56606.david-b-yBeKhBN/[email protected]
Quoted 33 lines · David Brownell
Quoted 6 lines · Jean Delvare
Note that I took a conservative approach here, adding
I2C_CLASS_SPDto all drivers that hadI2C_CLASS_HWMONbefore. 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.
Quoted 6 lines
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.Quoted 8 lines
Signed-off-by Jean Delvare <[email protected]>--- 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 +-
Quoted 18 lines
I've never heard of an AT91 board using DRAM sticks ...
Quoted 2 lines
drivers/i2c/busses/i2c-cpm.c | 2 +- drivers/i2c/busses/i2c-davinci.c | 2 +-... or a DaVinci one ...
Quoted 7 lines
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
Quoted 40 lines
Quoted 4 lines
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 ...
Quoted 4 lines
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 +-Quoted 8 lines
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 ...
Quoted 5 lines
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
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c
Signature · 7 lines
Jon Smirl [email protected] _______________________________________________ i2c mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/i2c
A message that is not in the archive (sent off-list or not yet received): 9e4733910806031412t52e7ed1bl8fd56751bef12a7a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 9 lines · Jon Smirl
Quoted 7 lines
Quoted 7 lines
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
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c
A message that is not in the archive (sent off-list or not yet received): Pine.LNX.4.58.0806031420160.10290-13q4cmjDBaTP3RPoUHIrnuTW4wlIGRCZ@public.gmane.org
Quoted 9 lines · Trent Piepho
Quoted 8 lines · Jon Smirl
Quoted 7 lines
Quoted 7 lines
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 +-
Quoted 7 lines
Quoted 1 line
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.
Quoted 7 lines
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.
Signature · 7 lines
Jon Smirl [email protected] _______________________________________________ i2c mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/i2c
A message that is not in the archive (sent off-list or not yet received): 9e4733910806031503w46662d4fib36d3b67563bbdf1-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 13 lines · Jon Smirl
Quoted 12 lines · Trent Piepho
Quoted 9 lines · Jon Smirl
Quoted 7 lines
Quoted 7 lines
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
Quoted 6 lines
Quoted 4 lines
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
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c
Hi David,
Thanks for the feedback.
Quoted 10 lines · David Brownell
Quoted 6 lines · Jean Delvare
Note that I took a conservative approach here, adding
I2C_CLASS_SPDto all drivers that hadI2C_CLASS_HWMONbefore. 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.
Quoted 55 lines
I'll highlight a few below, where I happen to have more specific knowledge.
Quoted 6 lines
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.Quoted 8 lines
Signed-off-by Jean Delvare <[email protected]>---
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 ...
Quoted 2 lines
drivers/i2c/busses/i2c-cpm.c | 2 +-
drivers/i2c/busses/i2c-davinci.c | 2 +-... or a DaVinci one ...
Quoted 11 lines
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 ...
Quoted 5 lines
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 +-Quoted 7 lines
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 +-
Quoted 7 lines
... DRAM-over-USB would be bizarre too ...
Quoted 5 lines
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,
Signature · 6 lines
Jean Delvare _______________________________________________ i2c mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/i2c
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · Jean Delvare
Quoted 2 lines
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.
Quoted 4 lines
Would you be able to give me a list of all drivers under
drivers/i2c/bussesthat 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.
Quoted 6 lines
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_SPDflag 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
Quoted 56 lines
Quoted 56 lines
I'll highlight a few below, where I happen to have more specific knowledge.
Quoted 6 lines
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.Quoted 8 lines
Signed-off-by Jean Delvare <[email protected]>---
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 ...
Quoted 2 lines
drivers/i2c/busses/i2c-cpm.c | 2 +-
drivers/i2c/busses/i2c-davinci.c | 2 +-... or a DaVinci one ...
Quoted 11 lines
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 ...
Quoted 5 lines
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 +-Quoted 7 lines
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 ...
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
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
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c
A message that is not in the archive (sent off-list or not yet received): 200806040018.10191.david-b-yBeKhBN/[email protected]
Quoted 11 lines · David Brownell
Quoted 6 lines
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_SPDflag 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
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c
A message that is not in the archive (sent off-list or not yet received): Pine.LNX.4.58.0806041303340.10290-13q4cmjDBaTP3RPoUHIrnuTW4wlIGRCZ@public.gmane.org
Quoted 9 lines · Trent Piepho
Quoted 5 lines
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
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c
Hi Trent,
Quoted 7 lines · Trent Piepho
Quoted 2 lines · David Brownell
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?
Signature · 6 lines
Jean Delvare _______________________________________________ i2c mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/i2c