Skip to content

Commit

Permalink
Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/jdelvare/staging

Pull i2c updates from Jean Delvare:
 "The most important changes here are a big cleanup of the i2c-piix4
  driver, cleanups and interrupt support to the i2c-i801 driver, and
  support for the SCCB protocol."

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c-omap: Add support for I2C_M_STOP message flag
  i2c: Fall back to emulated SMBus if the operation isn't supported natively
  i2c: Add SCCB support
  i2c-tiny-usb: Add support for the Robofuzz OSIF USB/I2C converter
  i2c-i801: Enable IRQ for byte_by_byte transactions
  i2c-i801: Enable interrupts on ICH5/7/8/9/10
  i2c-i801: Enable IRQ for SMBus transactions
  i2c-i801: Consolidate polling
  i2c-i801: Drop ENABLE_INT9
  i2c-i801: Rename some SMBHSTCNT bit constants
  i2c-i801: Check and return errors during byte-by-byte transfers
  i2c-i801: Clear only status bits in HST_STS
  i2c-i801: Refactor use of LAST_BYTE in i801_block_transaction_byte_by_byte
  i2c-smbus: Use module_i2c_driver()
  i2c/writing-clients: Mention module_i2c_driver()
  i2c-piix4: Support AMD auxiliary SMBus controller
  i2c-piix4: Separate registration and probing code
  i2c-piix4: Eliminate piix4_smba global variable
  i2c/busses: Use module_pci_driver
  i2c: Update Guenter Roeck's e-mail address
  • Loading branch information
Linus Torvalds committed Jul 24, 2012
2 parents dbf7b59 + fb604a3 commit ddb0344
Show file tree
Hide file tree
Showing 29 changed files with 487 additions and 366 deletions.
13 changes: 10 additions & 3 deletions Documentation/i2c/busses/i2c-i801
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ Module Parameters
Disable selected features normally supported by the device. This makes it
possible to work around possible driver or hardware bugs if the feature in
question doesn't work as intended for whatever reason. Bit values:
1 disable SMBus PEC
2 disable the block buffer
8 disable the I2C block read functionality
0x01 disable SMBus PEC
0x02 disable the block buffer
0x08 disable the I2C block read functionality
0x10 don't use interrupts


Description
Expand Down Expand Up @@ -86,6 +87,12 @@ SMBus 2.0 Support
The 82801DB (ICH4) and later chips support several SMBus 2.0 features.


Interrupt Support
-----------------

PCI interrupt support is supported on the 82801EB (ICH5) and later chips.


Hidden ICH SMBus
----------------

Expand Down
9 changes: 9 additions & 0 deletions Documentation/i2c/busses/i2c-piix4
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Supported adapters:
Datasheet: Only available via NDA from ServerWorks
* ATI IXP200, IXP300, IXP400, SB600, SB700 and SB800 southbridges
Datasheet: Not publicly available
SB700 register reference available at:
http://support.amd.com/us/Embedded_TechDocs/43009_sb7xx_rrg_pub_1.00.pdf
* AMD SP5100 (SB700 derivative found on some server mainboards)
Datasheet: Publicly available at the AMD website
http://support.amd.com/us/Embedded_TechDocs/44413.pdf
* AMD Hudson-2
Datasheet: Not publicly available
* Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge
Expand Down Expand Up @@ -68,6 +73,10 @@ this driver on those mainboards.
The ServerWorks Southbridges, the Intel 440MX, and the Victory66 are
identical to the PIIX4 in I2C/SMBus support.

The AMD SB700 and SP5100 chipsets implement two PIIX4-compatible SMBus
controllers. If your BIOS initializes the secondary controller, it will
be detected by this driver as an "Auxiliary SMBus Host Controller".

If you own Force CPCI735 motherboard or other OSB4 based systems you may need
to change the SMBus Interrupt Select register so the SMBus controller uses
the SMI mode.
Expand Down
23 changes: 15 additions & 8 deletions Documentation/i2c/writing-clients
Original file line number Diff line number Diff line change
Expand Up @@ -245,28 +245,35 @@ static int __init foo_init(void)
{
return i2c_add_driver(&foo_driver);
}
module_init(foo_init);

static void __exit foo_cleanup(void)
{
i2c_del_driver(&foo_driver);
}
module_exit(foo_cleanup);

/* Substitute your own name and email address */
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>"
MODULE_DESCRIPTION("Driver for Barf Inc. Foo I2C devices");

/* a few non-GPL license types are also allowed */
MODULE_LICENSE("GPL");
The module_i2c_driver() macro can be used to reduce above code.

module_init(foo_init);
module_exit(foo_cleanup);
module_i2c_driver(foo_driver);

Note that some functions are marked by `__init'. These functions can
be removed after kernel booting (or module loading) is completed.
Likewise, functions marked by `__exit' are dropped by the compiler when
the code is built into the kernel, as they would never be called.


Driver Information
==================

/* Substitute your own name and email address */
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>"
MODULE_DESCRIPTION("Driver for Barf Inc. Foo I2C devices");

/* a few non-GPL license types are also allowed */
MODULE_LICENSE("GPL");


Power Management
================

Expand Down
6 changes: 5 additions & 1 deletion drivers/i2c/busses/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ config I2C_PIIX4
ATI IXP300
ATI IXP400
ATI SB600
ATI SB700
ATI SB700/SP5100
ATI SB800
AMD Hudson-2
Serverworks OSB4
Expand All @@ -143,6 +143,10 @@ config I2C_PIIX4
Serverworks HT-1100
SMSC Victory66

Some AMD chipsets contain two PIIX4-compatible SMBus
controllers. This driver will attempt to use both controllers
on the SB700/SP5100, if they have been initialized by the BIOS.

This driver can also be built as a module. If so, the module
will be called i2c-piix4.

Expand Down
13 changes: 1 addition & 12 deletions drivers/i2c/busses/i2c-ali1535.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,22 +531,11 @@ static struct pci_driver ali1535_driver = {
.remove = __devexit_p(ali1535_remove),
};

static int __init i2c_ali1535_init(void)
{
return pci_register_driver(&ali1535_driver);
}

static void __exit i2c_ali1535_exit(void)
{
pci_unregister_driver(&ali1535_driver);
}
module_pci_driver(ali1535_driver);

MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>, "
"Philip Edelbrock <phil@netroedge.com>, "
"Mark D. Studebaker <mdsxyz123@yahoo.com> "
"and Dan Eaton <dan.eaton@rocketlogix.com>");
MODULE_DESCRIPTION("ALI1535 SMBus driver");
MODULE_LICENSE("GPL");

module_init(i2c_ali1535_init);
module_exit(i2c_ali1535_exit);
14 changes: 1 addition & 13 deletions drivers/i2c/busses/i2c-ali1563.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,18 +431,6 @@ static struct pci_driver ali1563_pci_driver = {
.remove = __devexit_p(ali1563_remove),
};

static int __init ali1563_init(void)
{
return pci_register_driver(&ali1563_pci_driver);
}

module_init(ali1563_init);

static void __exit ali1563_exit(void)
{
pci_unregister_driver(&ali1563_pci_driver);
}

module_exit(ali1563_exit);
module_pci_driver(ali1563_pci_driver);

MODULE_LICENSE("GPL");
13 changes: 1 addition & 12 deletions drivers/i2c/busses/i2c-ali15x3.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,21 +513,10 @@ static struct pci_driver ali15x3_driver = {
.remove = __devexit_p(ali15x3_remove),
};

static int __init i2c_ali15x3_init(void)
{
return pci_register_driver(&ali15x3_driver);
}

static void __exit i2c_ali15x3_exit(void)
{
pci_unregister_driver(&ali15x3_driver);
}
module_pci_driver(ali15x3_driver);

MODULE_AUTHOR ("Frodo Looijaard <frodol@dds.nl>, "
"Philip Edelbrock <phil@netroedge.com>, "
"and Mark D. Studebaker <mdsxyz123@yahoo.com>");
MODULE_DESCRIPTION("ALI15X3 SMBus driver");
MODULE_LICENSE("GPL");

module_init(i2c_ali15x3_init);
module_exit(i2c_ali15x3_exit);
13 changes: 1 addition & 12 deletions drivers/i2c/busses/i2c-amd756.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,21 +410,10 @@ static struct pci_driver amd756_driver = {
.remove = __devexit_p(amd756_remove),
};

static int __init amd756_init(void)
{
return pci_register_driver(&amd756_driver);
}

static void __exit amd756_exit(void)
{
pci_unregister_driver(&amd756_driver);
}
module_pci_driver(amd756_driver);

MODULE_AUTHOR("Merlin Hughes <merlin@merlin.org>");
MODULE_DESCRIPTION("AMD756/766/768/8111 and nVidia nForce SMBus driver");
MODULE_LICENSE("GPL");

EXPORT_SYMBOL(amd756_smbus);

module_init(amd756_init)
module_exit(amd756_exit)
13 changes: 1 addition & 12 deletions drivers/i2c/busses/i2c-amd8111.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,15 +491,4 @@ static struct pci_driver amd8111_driver = {
.remove = __devexit_p(amd8111_remove),
};

static int __init i2c_amd8111_init(void)
{
return pci_register_driver(&amd8111_driver);
}

static void __exit i2c_amd8111_exit(void)
{
pci_unregister_driver(&amd8111_driver);
}

module_init(i2c_amd8111_init);
module_exit(i2c_amd8111_exit);
module_pci_driver(amd8111_driver);
12 changes: 1 addition & 11 deletions drivers/i2c/busses/i2c-designware-pcidrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,17 +374,7 @@ static struct pci_driver dw_i2c_driver = {
},
};

static int __init dw_i2c_init_driver(void)
{
return pci_register_driver(&dw_i2c_driver);
}
module_init(dw_i2c_init_driver);

static void __exit dw_i2c_exit_driver(void)
{
pci_unregister_driver(&dw_i2c_driver);
}
module_exit(dw_i2c_exit_driver);
module_pci_driver(dw_i2c_driver);

MODULE_AUTHOR("Baruch Siach <baruch@tkos.co.il>");
MODULE_DESCRIPTION("Synopsys DesignWare PCI I2C bus adapter");
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-diolan-u2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,6 @@ static struct usb_driver diolan_u2c_driver = {

module_usb_driver(diolan_u2c_driver);

MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>");
MODULE_AUTHOR("Guenter Roeck <linux@roeck-us.net>");
MODULE_DESCRIPTION(DRIVER_NAME " driver");
MODULE_LICENSE("GPL");
12 changes: 1 addition & 11 deletions drivers/i2c/busses/i2c-eg20t.c
Original file line number Diff line number Diff line change
Expand Up @@ -953,17 +953,7 @@ static struct pci_driver pch_pcidriver = {
.resume = pch_i2c_resume
};

static int __init pch_pci_init(void)
{
return pci_register_driver(&pch_pcidriver);
}
module_init(pch_pci_init);

static void __exit pch_pci_exit(void)
{
pci_unregister_driver(&pch_pcidriver);
}
module_exit(pch_pci_exit);
module_pci_driver(pch_pcidriver);

MODULE_DESCRIPTION("Intel EG20T PCH/LAPIS Semico ML7213/ML7223/ML7831 IOH I2C");
MODULE_LICENSE("GPL");
Expand Down
17 changes: 1 addition & 16 deletions drivers/i2c/busses/i2c-hydra.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,23 +156,8 @@ static struct pci_driver hydra_driver = {
.remove = __devexit_p(hydra_remove),
};

static int __init i2c_hydra_init(void)
{
return pci_register_driver(&hydra_driver);
}


static void __exit i2c_hydra_exit(void)
{
pci_unregister_driver(&hydra_driver);
}


module_pci_driver(hydra_driver);

MODULE_AUTHOR("Geert Uytterhoeven <geert@linux-m68k.org>");
MODULE_DESCRIPTION("i2c for Apple Hydra Mac I/O");
MODULE_LICENSE("GPL");

module_init(i2c_hydra_init);
module_exit(i2c_hydra_exit);

Loading

0 comments on commit ddb0344

Please sign in to comment.