Skip to contentSkip to conversation

i2c-i801: Enable interrupts for all post-ICH5 chips

PATCH Superseded Jean Delvare 2 participants 4 messages Oct 31, 2012 – Dec 15, 2012 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c-i801: Enable interrupts for all post-ICH5 chips

I did not receive a single bug report after interrupt support was added for a limited number of chips. So I'd say the code is good and should be enabled for all supported chips, that is: ICH5 and later.

For now the IDF channels are excluded as I have no idea if they support interrupts too or not.

---
Would be great if someone could test interrupts on IDF channels and report.

 drivers/i2c/busses/i2c-i801.c |   12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
drivers/i2c/busses/i2c-i801.c +2 -10
@@ -1109,6 +1109,8 @@ static int __devinit i801_probe(struct p
 		/* fall through */
 	default:
 		priv->features |= FEATURE_I2C_BLOCK_READ;
+		if (!(priv->features & FEATURE_IDF))
+			priv->features |= FEATURE_IRQ;
 		/* fall through */
 	case PCI_DEVICE_ID_INTEL_82801DB_3:
 		priv->features |= FEATURE_SMBUS_PEC;
@@ -1121,16 +1123,6 @@ static int __devinit i801_probe(struct p
 		break;
 	}
 
-	/* IRQ processing tested on CougarPoint PCH, ICH5, ICH7-M and ICH10 */
-	if (dev->device == PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS ||
-	    dev->device == PCI_DEVICE_ID_INTEL_82801EB_3 ||
-	    dev->device == PCI_DEVICE_ID_INTEL_ICH7_17 ||
-	    dev->device == PCI_DEVICE_ID_INTEL_ICH8_5 ||
-	    dev->device == PCI_DEVICE_ID_INTEL_ICH9_6 ||
-	    dev->device == PCI_DEVICE_ID_INTEL_ICH10_4 ||
-	    dev->device == PCI_DEVICE_ID_INTEL_ICH10_5)
-		priv->features |= FEATURE_IRQ;
-
 	/* Disable features on user request */
 	for (i = 0; i < ARRAY_SIZE(i801_feature_names); i++) {
 		if (priv->features & disable_features & (1 << i))
Signature · 1 line
Jean Delvare
#2 lore raw

PATCH v2 1/1 i2c-i801: Enable interrupts for all post-ICH5 chips

In reply to a message not in the archive

I did not receive a single bug report after interrupt support was added for a limited number of chips. So I'd say the code is good and should be enabled for all supported chips, that is: ICH5 and later.

---
I was able to test on Patsburg IDF channels and although I couldn't test all transaction types, interrupts seem to work the same as on the main SMBus channel so let's enable interrupts there too.

 drivers/i2c/busses/i2c-i801.c |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
drivers/i2c/busses/i2c-i801.c +1 -10
@@ -1109,6 +1109,7 @@ static int __devinit i801_probe(struct p
 		/* fall through */
 	default:
 		priv->features |= FEATURE_I2C_BLOCK_READ;
+		priv->features |= FEATURE_IRQ;
 		/* fall through */
 	case PCI_DEVICE_ID_INTEL_82801DB_3:
 		priv->features |= FEATURE_SMBUS_PEC;
@@ -1121,16 +1122,6 @@ static int __devinit i801_probe(struct p
 		break;
 	}
 
-	/* IRQ processing tested on CougarPoint PCH, ICH5, ICH7-M and ICH10 */
-	if (dev->device == PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS ||
-	    dev->device == PCI_DEVICE_ID_INTEL_82801EB_3 ||
-	    dev->device == PCI_DEVICE_ID_INTEL_ICH7_17 ||
-	    dev->device == PCI_DEVICE_ID_INTEL_ICH8_5 ||
-	    dev->device == PCI_DEVICE_ID_INTEL_ICH9_6 ||
-	    dev->device == PCI_DEVICE_ID_INTEL_ICH10_4 ||
-	    dev->device == PCI_DEVICE_ID_INTEL_ICH10_5)
-		priv->features |= FEATURE_IRQ;
-
 	/* Disable features on user request */
 	for (i = 0; i < ARRAY_SIZE(i801_feature_names); i++) {
 		if (priv->features & disable_features & (1 << i))
Signature · 1 line
Jean Delvare
Reviewed-by
#4 lore raw
In reply to a message not in the archive

Hi Jean,

Quoted 10 lines · Jean Delvare

I did not receive a single bug report after interrupt support was added for a limited number of chips. So I'd say the code is good and should be enabled for all supported chips, that is: ICH5 and later.

---
I was able to test on Patsburg IDF channels and although I couldn't test all transaction types, interrupts seem to work the same as on the main SMBus channel so let's enable interrupts there too.

I can confirm that the IRQ works on PantherPoint at least, if enabled (by this patch, for example). However, I don't know anything about IDF, so I can't help there.
Here's an R-B, if you need it:

Are you targeting this for 3.8?

Quoted 34 lines
 drivers/i2c/busses/i2c-i801.c |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
drivers/i2c/busses/i2c-i801.c 2012-11-06 19:26:04.073280924 +0100 renamed from drivers/i2c/busses/i2c-i801.c 2012-11-05 16:55:23.271739149 +0100 +1 -11
@@ -1109,6 +1109,7 @@ static int __devinit i801_probe(struct p
                /* fall through */
        default:
                priv->features |= FEATURE_I2C_BLOCK_READ;
+               priv->features |= FEATURE_IRQ;
                /* fall through */
        case PCI_DEVICE_ID_INTEL_82801DB_3:
                priv->features |= FEATURE_SMBUS_PEC;
@@ -1121,16 +1122,6 @@ static int __devinit i801_probe(struct p
                break;
        }
 
-       /* IRQ processing tested on CougarPoint PCH, ICH5, ICH7-M and ICH10 */
-       if (dev->device == PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS ||
-           dev->device == PCI_DEVICE_ID_INTEL_82801EB_3 ||
-           dev->device == PCI_DEVICE_ID_INTEL_ICH7_17 ||
-           dev->device == PCI_DEVICE_ID_INTEL_ICH8_5 ||
-           dev->device == PCI_DEVICE_ID_INTEL_ICH9_6 ||
-           dev->device == PCI_DEVICE_ID_INTEL_ICH10_4 ||
-           dev->device == PCI_DEVICE_ID_INTEL_ICH10_5)
-               priv->features |= FEATURE_IRQ;
-
        /* Disable features on user request */
        for (i = 0; i < ARRAY_SIZE(i801_feature_names); i++) {
                if (priv->features & disable_features & (1 << i))
 
--

Jean Delvare

#6 lore raw
In reply to a message not in the archive

Hi Daniel,

Quoted 15 lines · Daniel Kurtz

Hi Jean,

Quoted 10 lines · Jean Delvare

I did not receive a single bug report after interrupt support was added for a limited number of chips. So I'd say the code is good and should be enabled for all supported chips, that is: ICH5 and later.

---
I was able to test on Patsburg IDF channels and although I couldn't test all transaction types, interrupts seem to work the same as on the main SMBus channel so let's enable interrupts there too.

Quoted 6 lines

I can confirm that the IRQ works on PantherPoint at least, if enabled (by this patch, for example). However, I don't know anything about IDF, so I can't help there.
Here's an R-B, if you need it:

Thanks for the testing and review.

Quoted 1 line

Are you targeting this for 3.8?

Yes I am. I'll send the remaining patches in my i2c queue to Linus later today.

Signature · 1 line
Jean Delvare