From patchwork Thu Jun 27 17:48:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 808557 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F74419A299; Thu, 27 Jun 2024 17:48:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719510500; cv=none; b=WnzRfiVeU+BdnsnD+wtoU/C1KiRY15gEo/lm6ZXe6leZWZt6CaXlJDc/lOMm2OVPiMf7kUynyhrS/wxgNzucuWBRKk6JzSVoLg9pxTA/eVZsk5sX1HSfRd2OvKJqD5BrTLnEzli3w6fLbl+uYOymJJScI15QPklLOBRjIaJgBds= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719510500; c=relaxed/simple; bh=yPO4IKPS0N+e3zR4PMFA1NoA+jkkataabWTf+ErtjDU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SLBCNGAY1Q9HK7d8Q6uKctVkTYn3E7jhM+GE2VR1LYirg44PuO2e4TNxkm/gwVqAvKNembNbMT1BBRaV59SixsUeqtZ5KAP8VInCLdh/M8vgUAtGIVyKx0TD9pvYhEh1GHE870eSTy3F9qExGK1y5g3yp4SdJtwsIBvi0x/gW6A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=UIba0sIb; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="UIba0sIb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1719510495; bh=yPO4IKPS0N+e3zR4PMFA1NoA+jkkataabWTf+ErtjDU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=UIba0sIbWfcUVDf8EitPZTjtGvqavs+Xu5FgzAwHtqg7fZ5G9Pqko+E6oE4YgK5oF lRLvsjAsp4UnrBrR3VUA/y3K7BsC6W2B5CldNQGefuyfGxJY8dDxBFNToE6/VSjoEj yhn8qWxhSA4Zpu/zibfr9HmmkeQIzc9piNBm4GuI= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 27 Jun 2024 19:48:11 +0200 Subject: [PATCH v2 1/4] i2c: smbus: only limit max banks to eight Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240627-piix4-spd-v2-1-617ce47b8ff4@weissschuh.net> References: <20240627-piix4-spd-v2-0-617ce47b8ff4@weissschuh.net> In-Reply-To: <20240627-piix4-spd-v2-0-617ce47b8ff4@weissschuh.net> To: Andi Shyti , Jean Delvare Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck , Wolfram Sang , Heiner Kallweit , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1719510495; l=865; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=yPO4IKPS0N+e3zR4PMFA1NoA+jkkataabWTf+ErtjDU=; b=Y66WjhpWOZRLhm35AV6JPaD7yribSRCu8ucSopHb4SqQyPN4a7sbAJE7OIrVF1OUlwLzPSTE6 3RdjLUbVs45DgQ63mQIL+JmUJFcXN9uZjqlQy0QNckubXvD8CMcVYLZ X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= If there are less than eight slots in total, only probe those. Now the code matches the comment "..., then limit slots to 8". Fixes: 8821c8376993 ("i2c: smbus: Prepare i2c_register_spd for usage on muxed segments") Signed-off-by: Thomas Weißschuh --- drivers/i2c/i2c-smbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c index f809f0ef2004..8f0403652606 100644 --- a/drivers/i2c/i2c-smbus.c +++ b/drivers/i2c/i2c-smbus.c @@ -356,7 +356,7 @@ void i2c_register_spd(struct i2c_adapter *adap) * as this is the max number of SPD EEPROMs that can be addressed per bus. */ if (i2c_parent_is_i2c_adapter(adap)) { - slot_count = 8; + slot_count = min(slot_count, 8); } else { if (slot_count > 8) { dev_warn(&adap->dev, From patchwork Thu Jun 27 17:48:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 807965 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4D0319A28A; Thu, 27 Jun 2024 17:48:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719510500; cv=none; b=AW8J7/tTmtR+nwIXtJfBOa/lxBFbbjf2P6Tw27jgJMnk0wu364r6oig4yn8LLl2IKOaY2VRHIh27TjevPbVU2QnzV9TGxQklqWFvAZ+Hgc5JldvqPeP6TZ/Vauv2IsjTVAQZaya55BTJzsBSeC0W87XoYO64n9clttDb1LS2Lho= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719510500; c=relaxed/simple; bh=ON98I4kxeBsfWE8Kg8UOWYTMrbSepNH46iR8CasugEg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QLNK5iSNi20ryfUIsjGRO4tzXgNeSuygnMvTrYaUR6gD6y/pW5SlxlVW8kRC7t1nBz9MkP9ej9TmlSJVCvgHyVKdQPaNGBAsSUXxBDKpn43zSasoZ3OETZChjEiKVKMdapzrglA6cDnnm0W2iV1C0dCcscix1zxSytLlcblNcA4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=XSGMW+Me; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="XSGMW+Me" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1719510495; bh=ON98I4kxeBsfWE8Kg8UOWYTMrbSepNH46iR8CasugEg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=XSGMW+MePHfSnMTzrF0P/I12Lbfhu4BCkn55MoAWP1DQnGDeIDCEsOpt0VQRZNkuC CuHyaSl7cSxWI0AxJLDWhPXyhg2I+fjK3PuJE5ti6oXGp3r6/J+hvpMMvdpi4M082b 9H0a+wz6Za5YQ1eSyoZWrDo2O77tv3pNS+rkDVxs= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 27 Jun 2024 19:48:12 +0200 Subject: [PATCH v2 2/4] i2c: smbus: probe SPDs on a best-effort basis Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240627-piix4-spd-v2-2-617ce47b8ff4@weissschuh.net> References: <20240627-piix4-spd-v2-0-617ce47b8ff4@weissschuh.net> In-Reply-To: <20240627-piix4-spd-v2-0-617ce47b8ff4@weissschuh.net> To: Andi Shyti , Jean Delvare Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck , Wolfram Sang , Heiner Kallweit , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1719510495; l=1540; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=ON98I4kxeBsfWE8Kg8UOWYTMrbSepNH46iR8CasugEg=; b=wftM+6W7fxyEYP80QZeSIqbQJNDZgzmvy3o3RPBgWTvmM4vWBcm0/GCK+ssuJDPoc7/QhrCr/ zTJSydUdULNC7YLITfGUsKA3wuezzBn9H/DGVCK/JtpsHVjWZUiykEl X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Even if it is likely that not all slots can be probed, then at least probe the 8 slots that can. Also adapt the comment to better fit the new logic. Signed-off-by: Thomas Weißschuh --- drivers/i2c/i2c-smbus.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c index 8f0403652606..cdbb95fe104e 100644 --- a/drivers/i2c/i2c-smbus.c +++ b/drivers/i2c/i2c-smbus.c @@ -352,18 +352,15 @@ void i2c_register_spd(struct i2c_adapter *adap) return; /* - * If we're a child adapter on a muxed segment, then limit slots to 8, - * as this is the max number of SPD EEPROMs that can be addressed per bus. + * The max number of SPD EEPROMs that can be addressed per bus is 8. + * If more slots are present either muxed or multiple busses are + * necessary or the additional slots are ignored. */ - if (i2c_parent_is_i2c_adapter(adap)) { - slot_count = min(slot_count, 8); - } else { - if (slot_count > 8) { - dev_warn(&adap->dev, - "More than 8 memory slots on a single bus, contact i801 maintainer to add missing mux config\n"); - return; - } + if (!i2c_parent_is_i2c_adapter(adap) && slot_count > 8) { + dev_warn(&adap->dev, + "More than 8 memory slots on a single bus, contact i801 maintainer to add missing mux config\n"); } + slot_count = min(slot_count, 8); /* * Memory types could be found at section 7.18.2 (Memory Device — Type), table 78 From patchwork Thu Jun 27 17:48:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 807964 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 80D3319A2BB; Thu, 27 Jun 2024 17:48:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719510501; cv=none; b=qhspYu3eMDzSZXiBl0U8HxeKoqobh0mm/FeQ8l3nggwjdMr7apRqMNJKneHGX3dvyGHamhXPEIltMFOSKl2XjmYaM2iAunevEkU29c43afrzPgmWvi/foMQ7CgUWTrxQfvFtKPlqve42CytG9jCj8PMEuBrm59lwLZxB/wWyd+c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719510501; c=relaxed/simple; bh=74A2TeSAT5o1avYbR2JpzelxgqxU5FX2kun/CTEKwN4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CCNcZjAR2k7uKwz8NHuOwiWTtKC0PSxKAMOD91ZNM3m04QRb6FClyfkKJvTkzZsfw1vyTik23GD1UaTRoja//MqOnvnb8mSMRAXDIUAMIPWty8Zhrad+F9N92eu7yn5OSjdLAP0qhiV+O0/Xr4AOlK3CDKhF2EWeGiEaYzpoemI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=gmup1eXA; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="gmup1eXA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1719510495; bh=74A2TeSAT5o1avYbR2JpzelxgqxU5FX2kun/CTEKwN4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=gmup1eXAValqk5KZJRHFkrxVqF08NtXLaY1W0yKUesCXJA8YsW5uRjmEwwTwziodP UdfI20rQhq6yj/6JfGYije9lC5qUK3rBLCGznsPtpPslC+lXn7HS2fb7zQBumlDm8m dbPh9w1/3R/uH+knp4Y9g+bye5rOAqo0/LRqqGbs= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 27 Jun 2024 19:48:13 +0200 Subject: [PATCH v2 3/4] i2c: smbus: drop warning about muxed segments requirement Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240627-piix4-spd-v2-3-617ce47b8ff4@weissschuh.net> References: <20240627-piix4-spd-v2-0-617ce47b8ff4@weissschuh.net> In-Reply-To: <20240627-piix4-spd-v2-0-617ce47b8ff4@weissschuh.net> To: Andi Shyti , Jean Delvare Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck , Wolfram Sang , Heiner Kallweit , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1719510495; l=1101; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=74A2TeSAT5o1avYbR2JpzelxgqxU5FX2kun/CTEKwN4=; b=yC9URugz+cyNN1RocUi46I5h/SJGkMuUXjGeWBCPNZpQxafsEVZeu6WUPG2IftrphyoHfTM9k Txl9BRqMPRiC31gsWhFl5znH8vWbNDVVQHHs3X+wziwXPfqOcnueh/s X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= The check and warning are very specific to the SPD usage of the i801 driver. That was fine as long as i801 was the only caller of i2c_register_spd(). Now that piix4 also wants to do the same the check and warning are not accurate anymore. Instead of introducing a more complicated calling protocol only to print a warning, drop the warning. Signed-off-by: Thomas Weißschuh --- drivers/i2c/i2c-smbus.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c index cdbb95fe104e..f0ac35fd0c5a 100644 --- a/drivers/i2c/i2c-smbus.c +++ b/drivers/i2c/i2c-smbus.c @@ -356,10 +356,6 @@ void i2c_register_spd(struct i2c_adapter *adap) * If more slots are present either muxed or multiple busses are * necessary or the additional slots are ignored. */ - if (!i2c_parent_is_i2c_adapter(adap) && slot_count > 8) { - dev_warn(&adap->dev, - "More than 8 memory slots on a single bus, contact i801 maintainer to add missing mux config\n"); - } slot_count = min(slot_count, 8); /* From patchwork Thu Jun 27 17:48:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 808556 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5DC2813A276; Thu, 27 Jun 2024 17:48:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719510500; cv=none; b=qzjwB5IhSpRWOiAxIG1QIX000ttFC6PGRf75R6tasjBn5yA7zsNhD4oFxfxljdGnoxuK0nHGmqM/jiUVn9Xv8E9+toW+hohRIQ0Al+XiNK64l7YabxXBh1XIWkDm0Gb3lo/3RyhRa19sXkxxdYXJ0Zanecfb+Ort4uTNEMewEFY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719510500; c=relaxed/simple; bh=F5zM9c3sLk5y1V8R5kNiRFk6k52sqvTRsb9rfOdCx78=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fdnMg8HjT19XlzvOGEsGxYFXJ67ZaKAfQscTgsv7MZwL2hxjhqyPT+a33HoXrV1BQIzl7lhWkhH7LO6Zgpg/pwH5hOD9cVMGRXfCvLNFJHrtLB+12p+UeGw7DOwLV+gXr82bhdscAT8c3wwXZdvEI/BU5ZxuVDyW+HRCAXXN3aA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=Redjctvd; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="Redjctvd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1719510495; bh=F5zM9c3sLk5y1V8R5kNiRFk6k52sqvTRsb9rfOdCx78=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=RedjctvdnqXxkPWIyQJV+iwAyUlBi/eKAfDSyzntxSNp+iW5+QUKd8V4qT/097GuR M4qlPyKa71fSwsQCw6R4abpFjBXqpCwceGXaSn3kWyfNXFXNmepAkGbqjCPMVwDa/j J7qfUncEJJPrelMSTAwm81++xwRcscN2/vDK0N8g= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 27 Jun 2024 19:48:14 +0200 Subject: [PATCH v2 4/4] i2c: piix4: Register SPDs Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240627-piix4-spd-v2-4-617ce47b8ff4@weissschuh.net> References: <20240627-piix4-spd-v2-0-617ce47b8ff4@weissschuh.net> In-Reply-To: <20240627-piix4-spd-v2-0-617ce47b8ff4@weissschuh.net> To: Andi Shyti , Jean Delvare Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck , Wolfram Sang , Heiner Kallweit , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1719510495; l=1719; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=F5zM9c3sLk5y1V8R5kNiRFk6k52sqvTRsb9rfOdCx78=; b=f+RWLTJXANNZ4wAUVKUqW8wbUWbONFLTNeUJwavC6tGwV75o0QrJx59dliWVEm3qQHebj0P8A WNvNx6Wjx0NA96nNt6tvco8dvYQK7boZ3wD9dxiyhlN2Vy0vR8owNKJ X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= The piix4 I2C bus can carry SPDs, register them if present. Only look on bus 0, as this is where the SPDs seem to be located. Only the first 8 slots are supported. If the system has more, then these will not be visible. The AUX bus can not be probed as on some platforms it reports all devices present and all reads return "0". This would allow the ee1004 to be probed incorrectly. Signed-off-by: Thomas Weißschuh --- drivers/i2c/busses/Kconfig | 1 + drivers/i2c/busses/i2c-piix4.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index fe6e8a1bb607..ff66e883b348 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -195,6 +195,7 @@ config I2C_ISMT config I2C_PIIX4 tristate "Intel PIIX4 and compatible (ATI/AMD/Serverworks/Broadcom/SMSC)" depends on PCI && HAS_IOPORT + select I2C_SMBUS help If you say yes to this option, support will be included for the Intel PIIX4 family of mainboard I2C interfaces. Specifically, the following diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c index 6a0392172b2f..14752d946f58 100644 --- a/drivers/i2c/busses/i2c-piix4.c +++ b/drivers/i2c/busses/i2c-piix4.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -982,6 +983,9 @@ static int piix4_add_adapter(struct pci_dev *dev, unsigned short smba, return retval; } + if (port == 0) + i2c_register_spd(adap); + *padap = adap; return 0; }