[PATCH 11/20] sfc: Update board info for hardware monitor on SFN4111T-R5 and later

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ben Hutchings
Date: Thursday, January 29, 2009 - 12:19 pm

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
 drivers/net/sfc/sfe4001.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sfc/sfe4001.c b/drivers/net/sfc/sfe4001.c
index 95bb935..25037c7 100644
--- a/drivers/net/sfc/sfe4001.c
+++ b/drivers/net/sfc/sfe4001.c
@@ -375,18 +375,26 @@ static void sfn4111t_fini(struct efx_nic *efx)
 	i2c_unregister_device(efx->board_info.hwmon_client);
 }
 
-static struct i2c_board_info sfn4111t_hwmon_info = {
+static struct i2c_board_info sfn4111t_a0_hwmon_info = {
 	I2C_BOARD_INFO("max6647", 0x4e),
 	.irq		= -1,
 };
 
+static struct i2c_board_info sfn4111t_r5_hwmon_info = {
+	I2C_BOARD_INFO("max6646", 0x4d),
+	.irq		= -1,
+};
+
 int sfn4111t_init(struct efx_nic *efx)
 {
 	int i = 0;
 	int rc;
 
 	efx->board_info.hwmon_client =
-		i2c_new_device(&efx->i2c_adap, &sfn4111t_hwmon_info);
+		i2c_new_device(&efx->i2c_adap,
+			       (efx->board_info.minor < 5) ?
+			       &sfn4111t_a0_hwmon_info :
+			       &sfn4111t_r5_hwmon_info);
 	if (!efx->board_info.hwmon_client)
 		return -EIO;
 

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/20] sfc: Fixes and new PHY support for 2.6.29, Ben Hutchings, (Thu Jan 29, 12:12 pm)
[PATCH 02/20] sfc: Fix test for MDIO read failure, Ben Hutchings, (Thu Jan 29, 12:16 pm)
[PATCH 03/20] sfc: SFT9001: Enable robust link training, Ben Hutchings, (Thu Jan 29, 12:17 pm)
[PATCH 08/20] sfc: Fix post-reset MAC selection, Ben Hutchings, (Thu Jan 29, 12:19 pm)
[PATCH 11/20] sfc: Update board info for hardware monitor ..., Ben Hutchings, (Thu Jan 29, 12:19 pm)
[PATCH 13/20] sfc: SFX7101/SFT9001: Fix AN advertisements, Ben Hutchings, (Thu Jan 29, 12:20 pm)
[PATCH 15/20] sfc: Fix reporting of PHY id, Ben Hutchings, (Thu Jan 29, 12:20 pm)
[PATCH 16/20] sfc: Add support for QT2025C PHY, Ben Hutchings, (Thu Jan 29, 12:21 pm)
[PATCH 18/20] sfc: Clean up LED control, Ben Hutchings, (Thu Jan 29, 12:21 pm)
[PATCH 01/11] sfc: SFT9001: Enable robust link training, Ben Hutchings, (Thu Jan 29, 8:48 pm)
[PATCH 05/11] sfc: Fix post-reset MAC selection, Ben Hutchings, (Thu Jan 29, 8:49 pm)
[PATCH 10/11] sfc: SFX7101/SFT9001: Fix AN advertisements, Ben Hutchings, (Thu Jan 29, 8:59 pm)