Deleted Added
full compact
ig4_pci.c (302408) ig4_pci.c (310072)
1/*
2 * Copyright (c) 2014 The DragonFly Project. All rights reserved.
3 *
4 * This code is derived from software contributed to The DragonFly Project
5 * by Matthew Dillon <dillon@backplane.com> and was subsequently ported
6 * to FreeBSD by Michael Gmelin <freebsd@grem.de>
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
30 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 */
35
36#include <sys/cdefs.h>
1/*
2 * Copyright (c) 2014 The DragonFly Project. All rights reserved.
3 *
4 * This code is derived from software contributed to The DragonFly Project
5 * by Matthew Dillon <dillon@backplane.com> and was subsequently ported
6 * to FreeBSD by Michael Gmelin <freebsd@grem.de>
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
30 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 */
35
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: stable/11/sys/dev/ichiic/ig4_pci.c 284803 2015-06-25 07:52:51Z grembo $");
37__FBSDID("$FreeBSD: stable/11/sys/dev/ichiic/ig4_pci.c 310072 2016-12-14 16:27:28Z avg $");
38
39/*
40 * Intel fourth generation mobile cpus integrated I2C device, smbus driver.
41 *
42 * See ig4_reg.h for datasheet reference and notes.
43 */
44
45#include <sys/param.h>

--- 9 unchanged lines hidden (view full) ---

55
56#include <machine/bus.h>
57#include <sys/rman.h>
58#include <machine/resource.h>
59
60#include <dev/pci/pcivar.h>
61#include <dev/pci/pcireg.h>
62#include <dev/smbus/smbconf.h>
38
39/*
40 * Intel fourth generation mobile cpus integrated I2C device, smbus driver.
41 *
42 * See ig4_reg.h for datasheet reference and notes.
43 */
44
45#include <sys/param.h>

--- 9 unchanged lines hidden (view full) ---

55
56#include <machine/bus.h>
57#include <sys/rman.h>
58#include <machine/resource.h>
59
60#include <dev/pci/pcivar.h>
61#include <dev/pci/pcireg.h>
62#include <dev/smbus/smbconf.h>
63#include <dev/iicbus/iiconf.h>
63
64#include "smbus_if.h"
65
66#include <dev/ichiic/ig4_reg.h>
67#include <dev/ichiic/ig4_var.h>
68
69static int ig4iic_pci_detach(device_t dev);
70

--- 104 unchanged lines hidden (view full) ---

175 DEVMETHOD(smbus_writew, ig4iic_smb_writew),
176 DEVMETHOD(smbus_readb, ig4iic_smb_readb),
177 DEVMETHOD(smbus_readw, ig4iic_smb_readw),
178 DEVMETHOD(smbus_pcall, ig4iic_smb_pcall),
179 DEVMETHOD(smbus_bwrite, ig4iic_smb_bwrite),
180 DEVMETHOD(smbus_bread, ig4iic_smb_bread),
181 DEVMETHOD(smbus_trans, ig4iic_smb_trans),
182
64
65#include "smbus_if.h"
66
67#include <dev/ichiic/ig4_reg.h>
68#include <dev/ichiic/ig4_var.h>
69
70static int ig4iic_pci_detach(device_t dev);
71

--- 104 unchanged lines hidden (view full) ---

176 DEVMETHOD(smbus_writew, ig4iic_smb_writew),
177 DEVMETHOD(smbus_readb, ig4iic_smb_readb),
178 DEVMETHOD(smbus_readw, ig4iic_smb_readw),
179 DEVMETHOD(smbus_pcall, ig4iic_smb_pcall),
180 DEVMETHOD(smbus_bwrite, ig4iic_smb_bwrite),
181 DEVMETHOD(smbus_bread, ig4iic_smb_bread),
182 DEVMETHOD(smbus_trans, ig4iic_smb_trans),
183
184 DEVMETHOD(iicbus_transfer, ig4iic_transfer),
185 DEVMETHOD(iicbus_reset, ig4iic_reset),
186 DEVMETHOD(iicbus_callback, iicbus_null_callback),
187
183 DEVMETHOD_END
184};
185
186static driver_t ig4iic_pci_driver = {
187 "ig4iic",
188 ig4iic_pci_methods,
189 sizeof(struct ig4iic_softc)
190};
191
192static devclass_t ig4iic_pci_devclass;
193
188 DEVMETHOD_END
189};
190
191static driver_t ig4iic_pci_driver = {
192 "ig4iic",
193 ig4iic_pci_methods,
194 sizeof(struct ig4iic_softc)
195};
196
197static devclass_t ig4iic_pci_devclass;
198
194DRIVER_MODULE(ig4iic, pci, ig4iic_pci_driver, ig4iic_pci_devclass, 0, 0);
199DRIVER_MODULE_ORDERED(ig4iic, pci, ig4iic_pci_driver, ig4iic_pci_devclass, 0, 0,
200 SI_ORDER_ANY);
195MODULE_DEPEND(ig4iic, pci, 1, 1, 1);
196MODULE_DEPEND(ig4iic, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER);
201MODULE_DEPEND(ig4iic, pci, 1, 1, 1);
202MODULE_DEPEND(ig4iic, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER);
203MODULE_DEPEND(ig4iic, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER);
197MODULE_VERSION(ig4iic, 1);
204MODULE_VERSION(ig4iic, 1);