All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vadim Pasternak <vadimp@nvidia.com>
To: <hdegoede@redhat.com>
Cc: <ilpo.jarvinen@linux.intel.com>,
	<platform-driver-x86@vger.kernel.org>,
	Michael Shych <michaelsh@nvidia.com>,
	Vadim Pasternak <vadimp@nvidia.com>
Subject: [PATCH platform-next v2 15/16] platform: mellanox: nvsw-sn2201: change fans i2c busses.
Date: Mon, 14 Aug 2023 20:34:05 +0000	[thread overview]
Message-ID: <20230814203406.12399-16-vadimp@nvidia.com> (raw)
In-Reply-To: <20230814203406.12399-1-vadimp@nvidia.com>

From: Michael Shych <michaelsh@nvidia.com>

Define the exact i2c bus (adapter number) of fans on the SN2201 system.
This will cause fan's EEPROMs be connected already from nvsw-sn2201
platform driver and not from user space after receiving udev events.

Signed-off-by: Michael Shych <michaelsh@nvidia.com>
Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
---
 drivers/platform/mellanox/nvsw-sn2201.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/platform/mellanox/nvsw-sn2201.c b/drivers/platform/mellanox/nvsw-sn2201.c
index 7b9c107c17ce..75b699676ca6 100644
--- a/drivers/platform/mellanox/nvsw-sn2201.c
+++ b/drivers/platform/mellanox/nvsw-sn2201.c
@@ -84,6 +84,10 @@
 #define NVSW_SN2201_MAIN_MUX_CH5_NR	(NVSW_SN2201_MAIN_MUX_CH0_NR + 5)
 #define NVSW_SN2201_MAIN_MUX_CH6_NR	(NVSW_SN2201_MAIN_MUX_CH0_NR + 6)
 #define NVSW_SN2201_MAIN_MUX_CH7_NR	(NVSW_SN2201_MAIN_MUX_CH0_NR + 7)
+#define NVSW_SN2201_2ND_MUX_CH0_NR	(NVSW_SN2201_MAIN_MUX_CH7_NR + 1)
+#define NVSW_SN2201_2ND_MUX_CH1_NR	(NVSW_SN2201_MAIN_MUX_CH7_NR + 2)
+#define NVSW_SN2201_2ND_MUX_CH2_NR	(NVSW_SN2201_MAIN_MUX_CH7_NR + 3)
+#define NVSW_SN2201_2ND_MUX_CH3_NR	(NVSW_SN2201_MAIN_MUX_CH7_NR + 4)
 
 #define NVSW_SN2201_CPLD_NR		NVSW_SN2201_MAIN_MUX_CH0_NR
 #define NVSW_SN2201_NR_NONE		-1
@@ -425,28 +429,28 @@ static struct mlxreg_core_data nvsw_sn2201_fan_items_data[] = {
 		.reg = NVSW_SN2201_FAN_PRSNT_STATUS_OFFSET,
 		.mask = BIT(0),
 		.hpdev.brdinfo = &nvsw_sn2201_fan_devices[0],
-		.hpdev.nr = NVSW_SN2201_NR_NONE,
+		.hpdev.nr = NVSW_SN2201_2ND_MUX_CH0_NR,
 	},
 	{
 		.label = "fan2",
 		.reg = NVSW_SN2201_FAN_PRSNT_STATUS_OFFSET,
 		.mask = BIT(1),
 		.hpdev.brdinfo = &nvsw_sn2201_fan_devices[1],
-		.hpdev.nr = NVSW_SN2201_NR_NONE,
+		.hpdev.nr = NVSW_SN2201_2ND_MUX_CH1_NR,
 	},
 	{
 		.label = "fan3",
 		.reg = NVSW_SN2201_FAN_PRSNT_STATUS_OFFSET,
 		.mask = BIT(2),
 		.hpdev.brdinfo = &nvsw_sn2201_fan_devices[2],
-		.hpdev.nr = NVSW_SN2201_NR_NONE,
+		.hpdev.nr = NVSW_SN2201_2ND_MUX_CH2_NR,
 	},
 	{
 		.label = "fan4",
 		.reg = NVSW_SN2201_FAN_PRSNT_STATUS_OFFSET,
 		.mask = BIT(3),
 		.hpdev.brdinfo = &nvsw_sn2201_fan_devices[3],
-		.hpdev.nr = NVSW_SN2201_NR_NONE,
+		.hpdev.nr = NVSW_SN2201_2ND_MUX_CH3_NR,
 	},
 };
 
-- 
2.20.1


  parent reply	other threads:[~2023-08-14 20:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14 20:33 [PATCH platform-next v2 00/16] Add new features and amendments for Nvidia systems Vadim Pasternak
2023-08-14 20:33 ` [PATCH platform-next v2 01/16] platform: mellanox: Add new attributes Vadim Pasternak
2023-08-14 20:33 ` [PATCH platform-next v2 02/16] platform: mellanox: Add field upgrade capability register Vadim Pasternak
2023-08-14 20:33 ` [PATCH platform-next v2 03/16] platform: mellanox: Modify reset causes description Vadim Pasternak
2023-08-14 20:33 ` [PATCH platform-next v2 04/16] platform: mellanox: mlx-platform: Modify health and power hotplug action Vadim Pasternak
2023-08-14 20:33 ` [PATCH platform-next v2 05/16] platform: mellanox: mlx-platform: Add reset cause attribute Vadim Pasternak
2023-08-14 20:33 ` [PATCH platform-next v2 06/16] platform: mellanox: mlx-platform: add support for additional CPLD Vadim Pasternak
2023-08-14 20:33 ` [PATCH platform-next v2 07/16] platform: mellanox: mlx-platform: Modify power off callback Vadim Pasternak
2023-08-14 20:33 ` [PATCH platform-next v2 08/16] platform: mellanox: Cosmetic changes Vadim Pasternak
2023-08-14 20:33 ` [PATCH platform-next v2 09/16] platform: mellanox: mlx-platform: Add reset callback Vadim Pasternak
2023-08-14 20:34 ` [PATCH platform-next v2 10/16] platform: mellanox: mlx-platform: Prepare driver to allow probing through ACPI infrastructure Vadim Pasternak
2023-08-14 20:34 ` [PATCH platform-next v2 11/16] platform: mellanox: mlx-platform: Introduce ACPI init flow Vadim Pasternak
2023-08-14 20:34 ` [PATCH platform-next v2 12/16] platform: mellanox: mlx-platform: Get interrupt line through ACPI Vadim Pasternak
2023-08-14 20:34 ` [PATCH platform-next v2 13/16] platform: mellanox: Add initial support for PCIe based programming logic device Vadim Pasternak
2023-08-14 20:34 ` [PATCH platform-next v2 14/16] platform/mellanox: mlxreg-hotplug: Extend condition for notification callback processing Vadim Pasternak
2023-08-14 20:34 ` Vadim Pasternak [this message]
2023-08-14 20:34 ` [PATCH platform-next v2 16/16] Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces Vadim Pasternak
2023-08-15  8:05 ` [PATCH platform-next v2 00/16] Add new features and amendments for Nvidia systems Hans de Goede
2023-08-15  8:09   ` Vadim Pasternak
2023-08-15  8:15     ` Hans de Goede
2023-08-15  8:15     ` Hans de Goede
2023-08-15  8:20       ` Vadim Pasternak
2023-08-21 13:19 ` Hans de Goede
2023-08-21 16:29   ` Vadim Pasternak
2023-08-21 17:05     ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230814203406.12399-16-vadimp@nvidia.com \
    --to=vadimp@nvidia.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=michaelsh@nvidia.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.