blob: c8808e5855b48d5801dd5bdbe1a5e1f3d48e9907 [file] [log] [blame]
Andy Shevchenko15c566f2018-08-10 13:26:49 +03001// SPDX-License-Identifier: GPL-2.0-or-later
Dirk Brandewiefe20ff52011-10-06 11:26:35 -07002/*
3 * Synopsys DesignWare I2C adapter driver (master only).
4 *
5 * Based on the TI DAVINCI I2C adapter driver.
6 *
7 * Copyright (C) 2006 Texas Instruments.
8 * Copyright (C) 2007 MontaVista Software Inc.
9 * Copyright (C) 2009 Provigent Ltd.
Andy Shevchenko45bc35e2016-06-15 18:05:07 +030010 * Copyright (C) 2011, 2015, 2016 Intel Corporation.
Dirk Brandewiefe20ff52011-10-06 11:26:35 -070011 */
Andy Shevchenko45bc35e2016-06-15 18:05:07 +030012#include <linux/acpi.h>
Dirk Brandewiefe20ff52011-10-06 11:26:35 -070013#include <linux/delay.h>
Dirk Brandewiefe20ff52011-10-06 11:26:35 -070014#include <linux/err.h>
Andy Shevchenko45bc35e2016-06-15 18:05:07 +030015#include <linux/errno.h>
16#include <linux/i2c.h>
Dirk Brandewiefe20ff52011-10-06 11:26:35 -070017#include <linux/interrupt.h>
18#include <linux/io.h>
Andy Shevchenko45bc35e2016-06-15 18:05:07 +030019#include <linux/kernel.h>
20#include <linux/module.h>
Dirk Brandewiefe20ff52011-10-06 11:26:35 -070021#include <linux/pci.h>
Dirk Brandewie18dbdda2011-10-06 11:26:36 -070022#include <linux/pm_runtime.h>
Andy Shevchenko45bc35e2016-06-15 18:05:07 +030023#include <linux/sched.h>
24#include <linux/slab.h>
25
Dirk Brandewiefe20ff52011-10-06 11:26:35 -070026#include "i2c-designware-core.h"
27
28#define DRIVER_NAME "i2c-designware-pci"
29
30enum dw_pci_ctl_id_t {
Andy Shevchenkoed1bf032016-06-15 18:05:05 +030031 medfield,
Andy Shevchenkob20551c2016-06-15 18:05:06 +030032 merrifield,
Mika Westerberg089c7292014-02-19 16:10:29 +020033 baytrail,
Hans de Goedefd476fa2017-02-10 11:27:58 +010034 cherrytrail,
Mika Westerberg157a8012014-05-15 17:37:24 +030035 haswell,
Jarkko Nikula70fb95e2019-08-15 17:29:44 +030036 elkhartlake,
Dirk Brandewiefe20ff52011-10-06 11:26:35 -070037};
38
Chew, Chiau Ee8efd1e92014-03-11 19:33:45 +080039struct dw_scl_sda_cfg {
40 u32 ss_hcnt;
41 u32 fs_hcnt;
42 u32 ss_lcnt;
43 u32 fs_lcnt;
44 u32 sda_hold;
45};
46
Dirk Brandewiefe20ff52011-10-06 11:26:35 -070047struct dw_pci_controller {
48 u32 bus_num;
Dirk Brandewiefe20ff52011-10-06 11:26:35 -070049 u32 tx_fifo_depth;
50 u32 rx_fifo_depth;
Hans de Goedefd476fa2017-02-10 11:27:58 +010051 u32 flags;
Chew, Chiau Ee8efd1e92014-03-11 19:33:45 +080052 struct dw_scl_sda_cfg *scl_sda_cfg;
Andy Shevchenkoed1bf032016-06-15 18:05:05 +030053 int (*setup)(struct pci_dev *pdev, struct dw_pci_controller *c);
Andy Shevchenkoab0ef8b2020-05-19 15:50:37 +030054 u32 (*get_clk_rate_khz)(struct dw_i2c_dev *dev);
Dirk Brandewiefe20ff52011-10-06 11:26:35 -070055};
56
Andy Shevchenkob20551c2016-06-15 18:05:06 +030057/* Merrifield HCNT/LCNT/SDA hold time */
58static struct dw_scl_sda_cfg mrfld_config = {
59 .ss_hcnt = 0x2f8,
60 .fs_hcnt = 0x87,
61 .ss_lcnt = 0x37b,
62 .fs_lcnt = 0x10a,
63};
64
Chew, Chiau Ee8efd1e92014-03-11 19:33:45 +080065/* BayTrail HCNT/LCNT/SDA hold time */
66static struct dw_scl_sda_cfg byt_config = {
67 .ss_hcnt = 0x200,
68 .fs_hcnt = 0x55,
69 .ss_lcnt = 0x200,
70 .fs_lcnt = 0x99,
71 .sda_hold = 0x6,
72};
73
Mika Westerberg157a8012014-05-15 17:37:24 +030074/* Haswell HCNT/LCNT/SDA hold time */
75static struct dw_scl_sda_cfg hsw_config = {
76 .ss_hcnt = 0x01b0,
77 .fs_hcnt = 0x48,
78 .ss_lcnt = 0x01fb,
79 .fs_lcnt = 0xa0,
80 .sda_hold = 0x9,
81};
82
Andy Shevchenkoab0ef8b2020-05-19 15:50:37 +030083static u32 mfld_get_clk_rate_khz(struct dw_i2c_dev *dev)
84{
85 return 25000;
86}
87
Andy Shevchenkoed1bf032016-06-15 18:05:05 +030088static int mfld_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
89{
Andy Shevchenko42ab0012020-04-25 16:44:46 +030090 struct dw_i2c_dev *dev = dev_get_drvdata(&pdev->dev);
91
Andy Shevchenkoed1bf032016-06-15 18:05:05 +030092 switch (pdev->device) {
93 case 0x0817:
Andy Shevchenko42ab0012020-04-25 16:44:46 +030094 dev->timings.bus_freq_hz = I2C_MAX_STANDARD_MODE_FREQ;
Gustavo A. R. Silva1c02cbf72018-07-03 14:10:55 -050095 /* fall through */
Andy Shevchenkoed1bf032016-06-15 18:05:05 +030096 case 0x0818:
97 case 0x0819:
98 c->bus_num = pdev->device - 0x817 + 3;
99 return 0;
100 case 0x082C:
101 case 0x082D:
102 case 0x082E:
103 c->bus_num = pdev->device - 0x82C + 0;
104 return 0;
105 }
106 return -ENODEV;
107}
108
Andy Shevchenkob20551c2016-06-15 18:05:06 +0300109static int mrfld_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
110{
111 /*
Andy Shevchenko24d3fdc2020-03-19 17:30:12 +0200112 * On Intel Merrifield the user visible i2c buses are enumerated
Andy Shevchenkoec2790e2016-06-20 11:58:09 +0300113 * [1..7]. So, we add 1 to shift the default range. Besides that the
114 * first PCI slot provides 4 functions, that's why we have to add 0 to
115 * the first slot and 4 to the next one.
Andy Shevchenkob20551c2016-06-15 18:05:06 +0300116 */
117 switch (PCI_SLOT(pdev->devfn)) {
118 case 8:
119 c->bus_num = PCI_FUNC(pdev->devfn) + 0 + 1;
120 return 0;
121 case 9:
122 c->bus_num = PCI_FUNC(pdev->devfn) + 4 + 1;
123 return 0;
124 }
125 return -ENODEV;
126}
127
Andy Shevchenkoab0ef8b2020-05-19 15:50:37 +0300128static u32 ehl_get_clk_rate_khz(struct dw_i2c_dev *dev)
129{
130 return 100000;
131}
132
Andy Shevchenkoa93ac572015-02-06 13:47:02 +0200133static struct dw_pci_controller dw_pci_controllers[] = {
Andy Shevchenkoed1bf032016-06-15 18:05:05 +0300134 [medfield] = {
135 .bus_num = -1,
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700136 .tx_fifo_depth = 32,
137 .rx_fifo_depth = 32,
Andy Shevchenkoed1bf032016-06-15 18:05:05 +0300138 .setup = mfld_setup,
Andy Shevchenkoab0ef8b2020-05-19 15:50:37 +0300139 .get_clk_rate_khz = mfld_get_clk_rate_khz,
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700140 },
Andy Shevchenkob20551c2016-06-15 18:05:06 +0300141 [merrifield] = {
142 .bus_num = -1,
Andy Shevchenkob20551c2016-06-15 18:05:06 +0300143 .tx_fifo_depth = 64,
144 .rx_fifo_depth = 64,
145 .scl_sda_cfg = &mrfld_config,
146 .setup = mrfld_setup,
147 },
Mika Westerberg089c7292014-02-19 16:10:29 +0200148 [baytrail] = {
149 .bus_num = -1,
Mika Westerberg089c7292014-02-19 16:10:29 +0200150 .tx_fifo_depth = 32,
151 .rx_fifo_depth = 32,
Chew, Chiau Ee8efd1e92014-03-11 19:33:45 +0800152 .scl_sda_cfg = &byt_config,
Mika Westerberg089c7292014-02-19 16:10:29 +0200153 },
Mika Westerberg157a8012014-05-15 17:37:24 +0300154 [haswell] = {
155 .bus_num = -1,
Mika Westerberg157a8012014-05-15 17:37:24 +0300156 .tx_fifo_depth = 32,
157 .rx_fifo_depth = 32,
Mika Westerberg157a8012014-05-15 17:37:24 +0300158 .scl_sda_cfg = &hsw_config,
159 },
Hans de Goedefd476fa2017-02-10 11:27:58 +0100160 [cherrytrail] = {
161 .bus_num = -1,
Hans de Goedefd476fa2017-02-10 11:27:58 +0100162 .tx_fifo_depth = 32,
163 .rx_fifo_depth = 32,
Hans de Goedefd476fa2017-02-10 11:27:58 +0100164 .flags = MODEL_CHERRYTRAIL,
165 .scl_sda_cfg = &byt_config,
166 },
Jarkko Nikula70fb95e2019-08-15 17:29:44 +0300167 [elkhartlake] = {
168 .bus_num = -1,
Jarkko Nikula70fb95e2019-08-15 17:29:44 +0300169 .tx_fifo_depth = 32,
170 .rx_fifo_depth = 32,
Andy Shevchenkoab0ef8b2020-05-19 15:50:37 +0300171 .get_clk_rate_khz = ehl_get_clk_rate_khz,
Jarkko Nikula70fb95e2019-08-15 17:29:44 +0300172 },
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700173};
Alan Cox04095162014-07-23 13:06:57 +0100174
Mika Westerbergbe58eda2014-02-04 14:37:07 +0200175#ifdef CONFIG_PM
Octavian Purdila52c28432011-10-06 11:26:37 -0700176static int i2c_dw_pci_suspend(struct device *dev)
Dirk Brandewie18dbdda2011-10-06 11:26:36 -0700177{
Chuhong Yuan7735eee2019-07-23 19:11:10 +0800178 struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
Dirk Brandewie18dbdda2011-10-06 11:26:36 -0700179
Hans de Goede27515412019-02-22 14:08:40 +0100180 i_dev->suspended = true;
Luis Oliveira90312352017-06-14 11:43:23 +0100181 i_dev->disable(i_dev);
182
Dirk Brandewie18dbdda2011-10-06 11:26:36 -0700183 return 0;
184}
185
Octavian Purdila52c28432011-10-06 11:26:37 -0700186static int i2c_dw_pci_resume(struct device *dev)
Dirk Brandewie18dbdda2011-10-06 11:26:36 -0700187{
Chuhong Yuan7735eee2019-07-23 19:11:10 +0800188 struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
Hans de Goede27515412019-02-22 14:08:40 +0100189 int ret;
Dirk Brandewie18dbdda2011-10-06 11:26:36 -0700190
Hans de Goede27515412019-02-22 14:08:40 +0100191 ret = i_dev->init(i_dev);
192 i_dev->suspended = false;
193
194 return ret;
Dirk Brandewie18dbdda2011-10-06 11:26:36 -0700195}
Mika Westerbergbe58eda2014-02-04 14:37:07 +0200196#endif
Dirk Brandewie18dbdda2011-10-06 11:26:36 -0700197
Mika Westerbergbe58eda2014-02-04 14:37:07 +0200198static UNIVERSAL_DEV_PM_OPS(i2c_dw_pm_ops, i2c_dw_pci_suspend,
199 i2c_dw_pci_resume, NULL);
Dirk Brandewie18dbdda2011-10-06 11:26:36 -0700200
Bill Pemberton0b255e92012-11-27 15:59:38 -0500201static int i2c_dw_pci_probe(struct pci_dev *pdev,
Andy Shevchenkoca0c1ff2013-04-10 00:36:37 +0000202 const struct pci_device_id *id)
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700203{
204 struct dw_i2c_dev *dev;
205 struct i2c_adapter *adap;
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700206 int r;
Andy Shevchenko45bc35e2016-06-15 18:05:07 +0300207 struct dw_pci_controller *controller;
Chew, Chiau Ee8efd1e92014-03-11 19:33:45 +0800208 struct dw_scl_sda_cfg *cfg;
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700209
210 if (id->driver_data >= ARRAY_SIZE(dw_pci_controllers)) {
Andy Shevchenkoca0c1ff2013-04-10 00:36:37 +0000211 dev_err(&pdev->dev, "%s: invalid driver data %ld\n", __func__,
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700212 id->driver_data);
213 return -EINVAL;
214 }
215
216 controller = &dw_pci_controllers[id->driver_data];
217
Andy Shevchenko76cf3fc2013-04-10 00:36:38 +0000218 r = pcim_enable_device(pdev);
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700219 if (r) {
220 dev_err(&pdev->dev, "Failed to enable I2C PCI device (%d)\n",
221 r);
Andy Shevchenko76cf3fc2013-04-10 00:36:38 +0000222 return r;
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700223 }
224
Felipe Balbi21aa3982019-08-15 17:29:43 +0300225 pci_set_master(pdev);
226
Andy Shevchenko76cf3fc2013-04-10 00:36:38 +0000227 r = pcim_iomap_regions(pdev, 1 << 0, pci_name(pdev));
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700228 if (r) {
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700229 dev_err(&pdev->dev, "I/O memory remapping failed\n");
Andy Shevchenko76cf3fc2013-04-10 00:36:38 +0000230 return r;
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700231 }
232
Andy Shevchenko76cf3fc2013-04-10 00:36:38 +0000233 dev = devm_kzalloc(&pdev->dev, sizeof(struct dw_i2c_dev), GFP_KERNEL);
234 if (!dev)
235 return -ENOMEM;
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700236
Felipe Balbi21aa3982019-08-15 17:29:43 +0300237 r = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
238 if (r < 0)
239 return r;
240
Andy Shevchenkoab0ef8b2020-05-19 15:50:37 +0300241 dev->get_clk_rate_khz = controller->get_clk_rate_khz;
Andy Shevchenko42ab0012020-04-25 16:44:46 +0300242 dev->timings.bus_freq_hz = I2C_MAX_FAST_MODE_FREQ;
Andy Shevchenko76cf3fc2013-04-10 00:36:38 +0000243 dev->base = pcim_iomap_table(pdev)[0];
244 dev->dev = &pdev->dev;
Felipe Balbi21aa3982019-08-15 17:29:43 +0300245 dev->irq = pci_irq_vector(pdev, 0);
Hans de Goedefd476fa2017-02-10 11:27:58 +0100246 dev->flags |= controller->flags;
Andy Shevchenkoed1bf032016-06-15 18:05:05 +0300247
Andy Shevchenko42ab0012020-04-25 16:44:46 +0300248 pci_set_drvdata(pdev, dev);
249
Andy Shevchenkoed1bf032016-06-15 18:05:05 +0300250 if (controller->setup) {
251 r = controller->setup(pdev, controller);
Felipe Balbi21aa3982019-08-15 17:29:43 +0300252 if (r) {
253 pci_free_irq_vectors(pdev);
Andy Shevchenkoed1bf032016-06-15 18:05:05 +0300254 return r;
Felipe Balbi21aa3982019-08-15 17:29:43 +0300255 }
Andy Shevchenkoed1bf032016-06-15 18:05:05 +0300256 }
257
Andy Shevchenko7943f1d2020-04-25 16:44:48 +0300258 i2c_dw_configure(dev);
Chew, Chiau Eececcd292014-03-07 22:12:50 +0800259
Chew, Chiau Ee8efd1e92014-03-11 19:33:45 +0800260 if (controller->scl_sda_cfg) {
261 cfg = controller->scl_sda_cfg;
262 dev->ss_hcnt = cfg->ss_hcnt;
263 dev->fs_hcnt = cfg->fs_hcnt;
264 dev->ss_lcnt = cfg->ss_lcnt;
265 dev->fs_lcnt = cfg->fs_lcnt;
266 dev->sda_hold_time = cfg->sda_hold;
267 }
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700268
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700269 dev->tx_fifo_depth = controller->tx_fifo_depth;
270 dev->rx_fifo_depth = controller->rx_fifo_depth;
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700271
272 adap = &dev->adapter;
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700273 adap->owner = THIS_MODULE;
274 adap->class = 0;
Dustin Byford8eb5c872015-10-23 12:27:07 -0700275 ACPI_COMPANION_SET(&adap->dev, ACPI_COMPANION(&pdev->dev));
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700276 adap->nr = controller->bus_num;
Mika Westerberg089c7292014-02-19 16:10:29 +0200277
Andy Shevchenko7943f1d2020-04-25 16:44:48 +0300278 r = i2c_dw_probe(dev);
Felipe Balbi21aa3982019-08-15 17:29:43 +0300279 if (r) {
280 pci_free_irq_vectors(pdev);
Andy Shevchenko76cf3fc2013-04-10 00:36:38 +0000281 return r;
Felipe Balbi21aa3982019-08-15 17:29:43 +0300282 }
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700283
Mika Westerberg43452332013-04-10 00:36:42 +0000284 pm_runtime_set_autosuspend_delay(&pdev->dev, 1000);
285 pm_runtime_use_autosuspend(&pdev->dev);
Mika Westerbergbe58eda2014-02-04 14:37:07 +0200286 pm_runtime_put_autosuspend(&pdev->dev);
Dirk Brandewie18dbdda2011-10-06 11:26:36 -0700287 pm_runtime_allow(&pdev->dev);
288
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700289 return 0;
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700290}
291
Bill Pemberton0b255e92012-11-27 15:59:38 -0500292static void i2c_dw_pci_remove(struct pci_dev *pdev)
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700293{
294 struct dw_i2c_dev *dev = pci_get_drvdata(pdev);
295
Luis Oliveira90312352017-06-14 11:43:23 +0100296 dev->disable(dev);
Dirk Brandewie18dbdda2011-10-06 11:26:36 -0700297 pm_runtime_forbid(&pdev->dev);
298 pm_runtime_get_noresume(&pdev->dev);
299
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700300 i2c_del_adapter(&dev->adapter);
Jarkko Nikula9be8bc42020-02-13 17:15:03 +0200301 devm_free_irq(&pdev->dev, dev->irq, dev);
Felipe Balbi21aa3982019-08-15 17:29:43 +0300302 pci_free_irq_vectors(pdev);
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700303}
304
305/* work with hotplug and coldplug */
306MODULE_ALIAS("i2c_designware-pci");
307
Jingoo Han392debf2013-12-03 08:11:20 +0900308static const struct pci_device_id i2_designware_pci_ids[] = {
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700309 /* Medfield */
Andy Shevchenkoed1bf032016-06-15 18:05:05 +0300310 { PCI_VDEVICE(INTEL, 0x0817), medfield },
311 { PCI_VDEVICE(INTEL, 0x0818), medfield },
312 { PCI_VDEVICE(INTEL, 0x0819), medfield },
313 { PCI_VDEVICE(INTEL, 0x082C), medfield },
314 { PCI_VDEVICE(INTEL, 0x082D), medfield },
315 { PCI_VDEVICE(INTEL, 0x082E), medfield },
Andy Shevchenkob20551c2016-06-15 18:05:06 +0300316 /* Merrifield */
317 { PCI_VDEVICE(INTEL, 0x1195), merrifield },
318 { PCI_VDEVICE(INTEL, 0x1196), merrifield },
Mika Westerberg089c7292014-02-19 16:10:29 +0200319 /* Baytrail */
320 { PCI_VDEVICE(INTEL, 0x0F41), baytrail },
321 { PCI_VDEVICE(INTEL, 0x0F42), baytrail },
322 { PCI_VDEVICE(INTEL, 0x0F43), baytrail },
323 { PCI_VDEVICE(INTEL, 0x0F44), baytrail },
324 { PCI_VDEVICE(INTEL, 0x0F45), baytrail },
325 { PCI_VDEVICE(INTEL, 0x0F46), baytrail },
326 { PCI_VDEVICE(INTEL, 0x0F47), baytrail },
Mika Westerberg157a8012014-05-15 17:37:24 +0300327 /* Haswell */
328 { PCI_VDEVICE(INTEL, 0x9c61), haswell },
329 { PCI_VDEVICE(INTEL, 0x9c62), haswell },
Alan Cox04095162014-07-23 13:06:57 +0100330 /* Braswell / Cherrytrail */
Hans de Goedefd476fa2017-02-10 11:27:58 +0100331 { PCI_VDEVICE(INTEL, 0x22C1), cherrytrail },
332 { PCI_VDEVICE(INTEL, 0x22C2), cherrytrail },
333 { PCI_VDEVICE(INTEL, 0x22C3), cherrytrail },
334 { PCI_VDEVICE(INTEL, 0x22C4), cherrytrail },
335 { PCI_VDEVICE(INTEL, 0x22C5), cherrytrail },
336 { PCI_VDEVICE(INTEL, 0x22C6), cherrytrail },
337 { PCI_VDEVICE(INTEL, 0x22C7), cherrytrail },
Jarkko Nikula70fb95e2019-08-15 17:29:44 +0300338 /* Elkhart Lake (PSE I2C) */
339 { PCI_VDEVICE(INTEL, 0x4bb9), elkhartlake },
340 { PCI_VDEVICE(INTEL, 0x4bba), elkhartlake },
341 { PCI_VDEVICE(INTEL, 0x4bbb), elkhartlake },
342 { PCI_VDEVICE(INTEL, 0x4bbc), elkhartlake },
343 { PCI_VDEVICE(INTEL, 0x4bbd), elkhartlake },
344 { PCI_VDEVICE(INTEL, 0x4bbe), elkhartlake },
345 { PCI_VDEVICE(INTEL, 0x4bbf), elkhartlake },
346 { PCI_VDEVICE(INTEL, 0x4bc0), elkhartlake },
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700347 { 0,}
348};
349MODULE_DEVICE_TABLE(pci, i2_designware_pci_ids);
350
351static struct pci_driver dw_i2c_driver = {
352 .name = DRIVER_NAME,
353 .id_table = i2_designware_pci_ids,
354 .probe = i2c_dw_pci_probe,
Bill Pemberton0b255e92012-11-27 15:59:38 -0500355 .remove = i2c_dw_pci_remove,
Dirk Brandewie18dbdda2011-10-06 11:26:36 -0700356 .driver = {
357 .pm = &i2c_dw_pm_ops,
358 },
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700359};
360
Axel Lin56f21782012-07-24 14:13:56 +0200361module_pci_driver(dw_i2c_driver);
Dirk Brandewiefe20ff52011-10-06 11:26:35 -0700362
363MODULE_AUTHOR("Baruch Siach <baruch@tkos.co.il>");
364MODULE_DESCRIPTION("Synopsys DesignWare PCI I2C bus adapter");
365MODULE_LICENSE("GPL");