On Wed, Feb 02, 2011 at 06:20:02PM -0800, dirk.brandewie@xxxxxxxxx wrote: > From: Dirk Brandewie <dirk.brandewie@xxxxxxxxx> > > Modify the driver to be a PCI driver from the platform template > created in the inital split of the driver. Add controller config > options attached to PCI ID's. Add for the Moorsetown > and Medfield SOC's > > Signed-off-by: Dirk Brandewie <dirk.brandewie@xxxxxxxxx> > + dev->clk = NULL; > + dev->clk_khz = controller->clk_khz; > + dev->base = base; > dev->dev = get_device(&pdev->dev); > - dev->irq = irq; > - platform_set_drvdata(pdev, dev); > - > - dev->clk = clk_get(&pdev->dev, NULL); > - if (IS_ERR(dev->clk)) { > - r = -ENODEV; > - goto err_free_mem; > - } > - clk_enable(dev->clk); hmm, what where these calls doing in here in the first place if they're not available? > /* work with hotplug and coldplug */ > -MODULE_ALIAS("platform:i2c_designware"); > +MODULE_ALIAS("i2c_designware-pci"); hmm, why did this get copied in here in the first place? > -static struct platform_driver dw_i2c_driver = { > - .remove = __devexit_p(dw_i2c_remove), > - .driver = { > - .name = "i2c_designware", > - .owner = THIS_MODULE, > - }, > +DEFINE_PCI_DEVICE_TABLE(i2_designware_pci_ids) = { > + /* Moorestown */ > + { PCI_VDEVICE(INTEL, 0x0802), moorestown_0 }, > + { PCI_VDEVICE(INTEL, 0x0803), moorestown_1 }, > + { PCI_VDEVICE(INTEL, 0x0804), moorestown_2 }, > + /* Medfield */ > + { PCI_VDEVICE(INTEL, 0x0817), medfield_3,}, > + { PCI_VDEVICE(INTEL, 0x0818), medfield_4 }, > + { PCI_VDEVICE(INTEL, 0x0819), medfield_5 }, > + { PCI_VDEVICE(INTEL, 0x082C), medfield_0 }, > + { PCI_VDEVICE(INTEL, 0x082D), medfield_1 }, > + { PCI_VDEVICE(INTEL, 0x082E), medfield_2 }, > + { 0,} > +}; > +MODULE_DEVICE_TABLE(pci, i2_designware_pci_ids); > + > +static struct pci_driver dw_i2c_driver = { > + .name = DRIVER_NAME, > + .id_table = i2_designware_pci_ids, > + .probe = i2c_dw_pci_probe, > + .remove = __devexit_p(i2c_dw_pci_remove), > }; > > static int __init dw_i2c_init_driver(void) > { > - return platform_driver_probe(&dw_i2c_driver, dw_i2c_probe); > + return pci_register_driver(&dw_i2c_driver); > } > module_init(dw_i2c_init_driver); > > static void __exit dw_i2c_exit_driver(void) > { > - platform_driver_unregister(&dw_i2c_driver); > + pci_unregister_driver(&dw_i2c_driver); > } > module_exit(dw_i2c_exit_driver); > > -MODULE_AUTHOR("Baruch Siach <baruch@xxxxxxxxxx>"); > -MODULE_DESCRIPTION("Synopsys DesignWare I2C bus adapter"); > +MODULE_AUTHOR("Dirk Brandewie <dirk.j.brandewie@xxxxxxxxx"); > +MODULE_DESCRIPTION("Synopsys DesignWare PCI I2C bus adapter"); > MODULE_LICENSE("GPL"); Why change the authour information? -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html