Skip to contentSkip to conversation

i2c updates for 2.6.30

GIT PULL Jean Delvare 3 participants 5 messages Mar 28, 2009 – Apr 8, 2009 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

Hi Linus,

Please pull the i2c subsystem updates for Linux 2.6.30 from:

git://jdelvare.pck.nerim.net/jdelvare-2.6 i2c-for-linus

This adds support for 6 new SMBus controllers (nVidia MCP67, MCP73, MCP78S and MCP79, AMD SB800 and Broadcom HT1100), plus the usual amount of cleanups and random improvements, in particular to the i2c-algo-pca and i2c-algo-pcf drivers. Also a new document explaining the different way I2C devices can be instantiated. No core changes.

 Documentation/feature-removal-schedule.txt |    3 +-
 Documentation/i2c/busses/i2c-nforce2       |   12 +-
 Documentation/i2c/busses/i2c-piix4         |    2 +-
 Documentation/i2c/instantiating-devices    |  167 ++++++++++++++++++
 Documentation/i2c/writing-clients          |   19 ++-
 arch/sh/boards/board-sh7785lcr.c           |    2 +-
 drivers/i2c/algos/i2c-algo-bit.c           |    4 +-
 drivers/i2c/algos/i2c-algo-pca.c           |  250 ++++++++++++++++++++++-----
 drivers/i2c/algos/i2c-algo-pcf.c           |  261 +++++++++++++---------------
 drivers/i2c/busses/Kconfig                 |    9 +-
 drivers/i2c/busses/i2c-davinci.c           |    8 +-
 drivers/i2c/busses/i2c-ibm_iic.c           |    6 +-
 drivers/i2c/busses/i2c-iop3xx.c            |    2 +-
 drivers/i2c/busses/i2c-mpc.c               |    4 +-
 drivers/i2c/busses/i2c-mv64xxx.c           |    7 +-
 drivers/i2c/busses/i2c-nforce2.c           |   12 +-
 drivers/i2c/busses/i2c-pca-isa.c           |   39 +++--
 drivers/i2c/busses/i2c-pca-platform.c      |   48 +++---
 drivers/i2c/busses/i2c-piix4.c             |   77 ++++++++-
 drivers/i2c/busses/i2c-powermac.c          |    3 +-
 drivers/i2c/busses/i2c-pxa.c               |    9 +-
 drivers/i2c/i2c-core.c                     |   36 +++--
 drivers/misc/eeprom/Kconfig                |    2 +-
 include/linux/i2c-algo-pca.h               |   33 ++++-
 include/linux/i2c-pca-platform.h           |    2 +-
 include/linux/pci_ids.h                    |    5 +
 26 files changed, 746 insertions(+), 276 deletions(-)
 create mode 100644 Documentation/i2c/instantiating-devices

---------------

Flavio Leitner (1):
i2c-piix4: Add support for the Broadcom HT1100 chipset

Frank Seidel (2):
i2c: Add missing KERN_* constants to printks
i2c: Adapt debug macros for KERN_* constants

Jean Delvare (7):
i2c: Document the different ways to instantiate i2c devices
i2c: Let checkpatch shout on users of the legacy model
i2c: Clarify which clients are auto-removed
i2c-nforce2: Add support for MCP67, MCP73, MCP78S and MCP79
i2c: Set a default timeout value for all adapters
i2c: Adapter timeout is in jiffies
i2c-davinci: Fix timeout handling

Marco Aurelio da Costa (1):
i2c-algo-pca: Add PCA9665 support

Roel Kluin (2):
i2c-algo-pcf: Style cleanups
i2c-algo-pcf: Handle timeout correctly

Shane Huang (1):
i2c-piix4: Add support to SB800 SMBus changes

Wolfram Sang (4):
eeprom/at24: Remove EXPERIMENTAL
i2c-algo-pca: Rework waiting for a free bus
i2c-algo-pca: Use timeout for checking the state machine
i2c-pca-platform: Use defaults if no platform_data given

Zhenwen Xu (1):
i2c-core: Some style cleanups

Thanks,

Signature · 1 line
Jean Delvare
#1 lore raw
Quoted 4 lines · Jean Delvare

Please pull the i2c subsystem updates for Linux 2.6.30 from:

Wolfram Sang (4):
     i2c-algo-pca: Rework waiting for a free bus

This one introduced:

drivers/i2c/algos/i2c-algo-pca.c:197: warning: 'state' is used uninitialized in this function

Probably

        while (pca_status(adap) != 0xf8) {

should become

        while ((state = pca_status(adap)) != 0xf8) {

again.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw
Quoted 2 lines

drivers/i2c/algos/i2c-algo-pca.c:197: warning: 'state' is used uninitialized in this function

ACK. Will send a patch in a minute. Thanks for reporting!

Signature · 2 lines
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#3 lore raw
In reply to Geert Uytterhoeven

Hi Geert,

Quoted 13 lines · Geert Uytterhoeven
Quoted 4 lines · Jean Delvare

Please pull the i2c subsystem updates for Linux 2.6.30 from:

Wolfram Sang (4):
     i2c-algo-pca: Rework waiting for a free bus

This one introduced:

drivers/i2c/algos/i2c-algo-pca.c:197: warning: 'state' is used uninitialized in this function

Probably

Quoted 7 lines
        while (pca_status(adap) != 0xf8) {

should become

        while ((state = pca_status(adap)) != 0xf8) {

again.

You're perfectly right, I must have missed it because I didn't build any kernel with CONFIG_I2C_DEBUG_ALGO=y for a long time. Here's the fix I will push to Linus soon:

From: Jean Delvare <[email protected]>
Subject: i2c-algo-pca: Fix use of uninitialized variable in debug message

A recent change broke debugging of pca_xfer(), fix it.

---
 drivers/i2c/algos/i2c-algo-pca.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/algos/i2c-algo-pca.c +1 -1
@@ -190,7 +190,7 @@ static int pca_xfer(struct i2c_adapter *
 	int completed = 1;
 	unsigned long timeout = jiffies + i2c_adap->timeout;
 
-	while (pca_status(adap) != 0xf8) {
+	while ((state = pca_status(adap)) != 0xf8) {
 		if (time_before(jiffies, timeout)) {
 			msleep(10);
 		} else {
Signature · 1 line
Jean Delvare
Acked-by
#4 lore raw
Quoted 28 lines · Jean Delvare

Hi Geert,

Quoted 13 lines · Geert Uytterhoeven
Quoted 4 lines · Jean Delvare

Please pull the i2c subsystem updates for Linux 2.6.30 from:

Wolfram Sang (4):
     i2c-algo-pca: Rework waiting for a free bus

This one introduced:

drivers/i2c/algos/i2c-algo-pca.c:197: warning: 'state' is used uninitialized in this function

Probably

Quoted 7 lines
        while (pca_status(adap) != 0xf8) {

should become

        while ((state = pca_status(adap)) != 0xf8) {

again.

You're perfectly right, I must have missed it because I didn't build any kernel with CONFIG_I2C_DEBUG_ALGO=y for a long time. Here's the fix I will push to Linus soon:

Quoted 8 lines

From: Jean Delvare <[email protected]>
Subject: i2c-algo-pca: Fix use of uninitialized variable in debug message

A recent change broke debugging of pca_xfer(), fix it.

Heh, I was too slow :)

Quoted 23 lines
---
 drivers/i2c/algos/i2c-algo-pca.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/algos/i2c-algo-pca.c +1 -1
@@ -190,7 +190,7 @@ static int pca_xfer(struct i2c_adapter *
 	int completed = 1;
 	unsigned long timeout = jiffies + i2c_adap->timeout;
 
-	while (pca_status(adap) != 0xf8) {
+	while ((state = pca_status(adap)) != 0xf8) {
 		if (time_before(jiffies, timeout)) {
 			msleep(10);
 		} else {
Signature · 6 lines
-- 
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |