6 #include <linux/module.h>
14 #define CE4100_PCI_I2C_DEVS 3
30 memset(&res, 0,
sizeof(res));
63 dev_err(&dev->
dev,
"failed to match a DT node for bar %d.\n",
75 pdev->
dev.parent = &dev->
dev;
108 if (!dev->
dev.of_node) {
109 dev_err(&dev->
dev,
"Missing device tree node.\n");
119 sds->
pdev[
i] = add_i2c_device(dev, i);
120 if (IS_ERR(sds->
pdev[i])) {
121 ret = PTR_ERR(sds->
pdev[i]);
127 pci_set_drvdata(dev, sds);
131 pci_set_drvdata(dev,
NULL);
143 sds = pci_get_drvdata(dev);
144 pci_set_drvdata(dev,
NULL);
159 static struct pci_driver ce4100_i2c_driver = {
160 .name =
"ce4100_i2c",
161 .id_table = ce4100_i2c_devices,
162 .probe = ce4100_i2c_probe,