All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Restrict Mellanox platform and i2c dependencies
@ 2023-09-04 12:00 Geert Uytterhoeven
  2023-09-04 12:00 ` [PATCH 1/2] platform/mellanox: NVSW_SN2201 should depend on ACPI Geert Uytterhoeven
  2023-09-04 12:00 ` [PATCH 2/2] i2c: I2C_MLXCPLD on ARM64 " Geert Uytterhoeven
  0 siblings, 2 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2023-09-04 12:00 UTC (permalink / raw)
  To: Andi Shyti, Hans de Goede, Mark Gross, Vadim Pasternak,
	Michael Shych, Wolfram Sang
  Cc: linux-i2c, platform-driver-x86, linux-kernel, Geert Uytterhoeven

	Hi all,

This patch series makes the NVSW_SN2201 and I2C_MLXCPLD dependencies in
Kconfig stricter, to prevent asking the user about the corresponding
drivers when configuring kernels for systems where these drivers cannot
be used.

Thanks for your comments!

Geert Uytterhoeven (2):
  platform/mellanox: NVSW_SN2201 should depend on ACPI
  i2c: I2C_MLXCPLD on ARM64 should depend on ACPI

 drivers/i2c/busses/Kconfig        | 4 ++--
 drivers/platform/mellanox/Kconfig | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

-- 
2.34.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] platform/mellanox: NVSW_SN2201 should depend on ACPI
  2023-09-04 12:00 [PATCH 0/2] Restrict Mellanox platform and i2c dependencies Geert Uytterhoeven
@ 2023-09-04 12:00 ` Geert Uytterhoeven
  2023-09-04 12:25   ` Vadim Pasternak
                     ` (2 more replies)
  2023-09-04 12:00 ` [PATCH 2/2] i2c: I2C_MLXCPLD on ARM64 " Geert Uytterhoeven
  1 sibling, 3 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2023-09-04 12:00 UTC (permalink / raw)
  To: Andi Shyti, Hans de Goede, Mark Gross, Vadim Pasternak,
	Michael Shych, Wolfram Sang
  Cc: linux-i2c, platform-driver-x86, linux-kernel, Geert Uytterhoeven

The only probing method supported by the Nvidia SN2201 platform driver
is probing through an ACPI match table.  Hence add a dependency on
ACPI, to prevent asking the user about this driver when configuring a
kernel without ACPI support.

Fixes: 662f24826f954d49 ("platform/mellanox: Add support for new SN2201 system")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/platform/mellanox/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/mellanox/Kconfig b/drivers/platform/mellanox/Kconfig
index 382793e73a60a8b3..30b50920b278c94b 100644
--- a/drivers/platform/mellanox/Kconfig
+++ b/drivers/platform/mellanox/Kconfig
@@ -80,8 +80,8 @@ config MLXBF_PMC
 
 config NVSW_SN2201
 	tristate "Nvidia SN2201 platform driver support"
-	depends on HWMON
-	depends on I2C
+	depends on HWMON && I2C
+	depends on ACPI || COMPILE_TEST
 	select REGMAP_I2C
 	help
 	  This driver provides support for the Nvidia SN2201 platform.
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] i2c: I2C_MLXCPLD on ARM64 should depend on ACPI
  2023-09-04 12:00 [PATCH 0/2] Restrict Mellanox platform and i2c dependencies Geert Uytterhoeven
  2023-09-04 12:00 ` [PATCH 1/2] platform/mellanox: NVSW_SN2201 should depend on ACPI Geert Uytterhoeven
@ 2023-09-04 12:00 ` Geert Uytterhoeven
  2023-09-04 12:25   ` Vadim Pasternak
                     ` (2 more replies)
  1 sibling, 3 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2023-09-04 12:00 UTC (permalink / raw)
  To: Andi Shyti, Hans de Goede, Mark Gross, Vadim Pasternak,
	Michael Shych, Wolfram Sang
  Cc: linux-i2c, platform-driver-x86, linux-kernel, Geert Uytterhoeven

The "i2c_mlxcpld" platform device is only instantiated on X86 systems
(through drivers/platform/x86/mlx-platform.c), or on ARM64 systems with
ACPI (through drivers/platform/mellanox/nvsw-sn2201.c).  Hence further
restrict the dependency on ARM64 to ACPI, to prevent asking the user
about this driver when configuring an ARM64 kernel without ACPI support.

While at it, document in the Kconfig help text that the driver supports
ARM64/ACPI based systems, too.

Fixes: d7cf993f832ad2a4 ("i2c: mlxcpld: Allow driver to run on ARM64 architecture")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/i2c/busses/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 0aa97762332d8a87..bef2af50fb159baf 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -1391,10 +1391,10 @@ config I2C_ICY
 
 config I2C_MLXCPLD
 	tristate "Mellanox I2C driver"
-	depends on X86_64 || ARM64 || COMPILE_TEST
+	depends on X86_64 || (ARM64 && ACPI) || COMPILE_TEST
 	help
 	  This exposes the Mellanox platform I2C busses to the linux I2C layer
-	  for X86 based systems.
+	  for X86 and ARM64/ACPI based systems.
 	  Controller is implemented as CPLD logic.
 
 	  This driver can also be built as a module. If so, the module will be
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* RE: [PATCH 1/2] platform/mellanox: NVSW_SN2201 should depend on ACPI
  2023-09-04 12:00 ` [PATCH 1/2] platform/mellanox: NVSW_SN2201 should depend on ACPI Geert Uytterhoeven
@ 2023-09-04 12:25   ` Vadim Pasternak
  2023-09-05 23:03   ` Andi Shyti
  2023-09-11 11:25   ` Hans de Goede
  2 siblings, 0 replies; 9+ messages in thread
From: Vadim Pasternak @ 2023-09-04 12:25 UTC (permalink / raw)
  To: Geert Uytterhoeven, Andi Shyti, Hans de Goede, Mark Gross,
	Michael Shych, Wolfram Sang
  Cc: linux-i2c, platform-driver-x86, linux-kernel



> -----Original Message-----
> From: Geert Uytterhoeven <geert+renesas@glider.be>
> Sent: Monday, 4 September 2023 15:01
> To: Andi Shyti <andi.shyti@kernel.org>; Hans de Goede <hdegoede@redhat.com>;
> Mark Gross <markgross@kernel.org>; Vadim Pasternak <vadimp@nvidia.com>;
> Michael Shych <michaelsh@nvidia.com>; Wolfram Sang <wsa@kernel.org>
> Cc: linux-i2c@vger.kernel.org; platform-driver-x86@vger.kernel.org; linux-
> kernel@vger.kernel.org; Geert Uytterhoeven <geert+renesas@glider.be>
> Subject: [PATCH 1/2] platform/mellanox: NVSW_SN2201 should depend on ACPI
> 
> The only probing method supported by the Nvidia SN2201 platform driver is
> probing through an ACPI match table.  Hence add a dependency on ACPI, to
> prevent asking the user about this driver when configuring a kernel without ACPI
> support.
> 
> Fixes: 662f24826f954d49 ("platform/mellanox: Add support for new SN2201
> system")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Vadim Pasternak <vadimp@nvidia.com>

> ---
>  drivers/platform/mellanox/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/mellanox/Kconfig b/drivers/platform/mellanox/Kconfig
> index 382793e73a60a8b3..30b50920b278c94b 100644
> --- a/drivers/platform/mellanox/Kconfig
> +++ b/drivers/platform/mellanox/Kconfig
> @@ -80,8 +80,8 @@ config MLXBF_PMC
> 
>  config NVSW_SN2201
>  	tristate "Nvidia SN2201 platform driver support"
> -	depends on HWMON
> -	depends on I2C
> +	depends on HWMON && I2C
> +	depends on ACPI || COMPILE_TEST
>  	select REGMAP_I2C
>  	help
>  	  This driver provides support for the Nvidia SN2201 platform.
> --
> 2.34.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH 2/2] i2c: I2C_MLXCPLD on ARM64 should depend on ACPI
  2023-09-04 12:00 ` [PATCH 2/2] i2c: I2C_MLXCPLD on ARM64 " Geert Uytterhoeven
@ 2023-09-04 12:25   ` Vadim Pasternak
  2023-09-05 23:04   ` Andi Shyti
  2023-09-13  8:57   ` Wolfram Sang
  2 siblings, 0 replies; 9+ messages in thread
From: Vadim Pasternak @ 2023-09-04 12:25 UTC (permalink / raw)
  To: Geert Uytterhoeven, Andi Shyti, Hans de Goede, Mark Gross,
	Michael Shych, Wolfram Sang
  Cc: linux-i2c, platform-driver-x86, linux-kernel



> -----Original Message-----
> From: Geert Uytterhoeven <geert+renesas@glider.be>
> Sent: Monday, 4 September 2023 15:01
> To: Andi Shyti <andi.shyti@kernel.org>; Hans de Goede <hdegoede@redhat.com>;
> Mark Gross <markgross@kernel.org>; Vadim Pasternak <vadimp@nvidia.com>;
> Michael Shych <michaelsh@nvidia.com>; Wolfram Sang <wsa@kernel.org>
> Cc: linux-i2c@vger.kernel.org; platform-driver-x86@vger.kernel.org; linux-
> kernel@vger.kernel.org; Geert Uytterhoeven <geert+renesas@glider.be>
> Subject: [PATCH 2/2] i2c: I2C_MLXCPLD on ARM64 should depend on ACPI
> 
> The "i2c_mlxcpld" platform device is only instantiated on X86 systems (through
> drivers/platform/x86/mlx-platform.c), or on ARM64 systems with ACPI (through
> drivers/platform/mellanox/nvsw-sn2201.c).  Hence further restrict the dependency
> on ARM64 to ACPI, to prevent asking the user about this driver when configuring
> an ARM64 kernel without ACPI support.
> 
> While at it, document in the Kconfig help text that the driver supports
> ARM64/ACPI based systems, too.
> 
> Fixes: d7cf993f832ad2a4 ("i2c: mlxcpld: Allow driver to run on ARM64
> architecture")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Vadim Pasternak <vadimp@nvidia.com>

> ---
>  drivers/i2c/busses/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index
> 0aa97762332d8a87..bef2af50fb159baf 100644
> --- a/drivers/i2c/busses/Kconfig
> +++ b/drivers/i2c/busses/Kconfig
> @@ -1391,10 +1391,10 @@ config I2C_ICY
> 
>  config I2C_MLXCPLD
>  	tristate "Mellanox I2C driver"
> -	depends on X86_64 || ARM64 || COMPILE_TEST
> +	depends on X86_64 || (ARM64 && ACPI) || COMPILE_TEST
>  	help
>  	  This exposes the Mellanox platform I2C busses to the linux I2C layer
> -	  for X86 based systems.
> +	  for X86 and ARM64/ACPI based systems.
>  	  Controller is implemented as CPLD logic.
> 
>  	  This driver can also be built as a module. If so, the module will be
> --
> 2.34.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] platform/mellanox: NVSW_SN2201 should depend on ACPI
  2023-09-04 12:00 ` [PATCH 1/2] platform/mellanox: NVSW_SN2201 should depend on ACPI Geert Uytterhoeven
  2023-09-04 12:25   ` Vadim Pasternak
@ 2023-09-05 23:03   ` Andi Shyti
  2023-09-11 11:25   ` Hans de Goede
  2 siblings, 0 replies; 9+ messages in thread
From: Andi Shyti @ 2023-09-05 23:03 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Hans de Goede, Mark Gross, Vadim Pasternak, Michael Shych,
	Wolfram Sang, linux-i2c, platform-driver-x86, linux-kernel

Hi Geert,

On Mon, Sep 04, 2023 at 02:00:35PM +0200, Geert Uytterhoeven wrote:
> The only probing method supported by the Nvidia SN2201 platform driver
> is probing through an ACPI match table.  Hence add a dependency on
> ACPI, to prevent asking the user about this driver when configuring a
> kernel without ACPI support.
> 
> Fixes: 662f24826f954d49 ("platform/mellanox: Add support for new SN2201 system")

I don't think the Fixes tag is needed here...

> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/platform/mellanox/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/mellanox/Kconfig b/drivers/platform/mellanox/Kconfig
> index 382793e73a60a8b3..30b50920b278c94b 100644
> --- a/drivers/platform/mellanox/Kconfig
> +++ b/drivers/platform/mellanox/Kconfig
> @@ -80,8 +80,8 @@ config MLXBF_PMC
>  
>  config NVSW_SN2201
>  	tristate "Nvidia SN2201 platform driver support"
> -	depends on HWMON
> -	depends on I2C
> +	depends on HWMON && I2C
> +	depends on ACPI || COMPILE_TEST

Acked-by: Andi Shyti <andi.shyti@kernel.org> 

Andi

>  	select REGMAP_I2C
>  	help
>  	  This driver provides support for the Nvidia SN2201 platform.
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] i2c: I2C_MLXCPLD on ARM64 should depend on ACPI
  2023-09-04 12:00 ` [PATCH 2/2] i2c: I2C_MLXCPLD on ARM64 " Geert Uytterhoeven
  2023-09-04 12:25   ` Vadim Pasternak
@ 2023-09-05 23:04   ` Andi Shyti
  2023-09-13  8:57   ` Wolfram Sang
  2 siblings, 0 replies; 9+ messages in thread
From: Andi Shyti @ 2023-09-05 23:04 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Hans de Goede, Mark Gross, Vadim Pasternak, Michael Shych,
	Wolfram Sang, linux-i2c, platform-driver-x86, linux-kernel

Hi Geert,

On Mon, Sep 04, 2023 at 02:00:36PM +0200, Geert Uytterhoeven wrote:
> The "i2c_mlxcpld" platform device is only instantiated on X86 systems
> (through drivers/platform/x86/mlx-platform.c), or on ARM64 systems with
> ACPI (through drivers/platform/mellanox/nvsw-sn2201.c).  Hence further
> restrict the dependency on ARM64 to ACPI, to prevent asking the user
> about this driver when configuring an ARM64 kernel without ACPI support.
> 
> While at it, document in the Kconfig help text that the driver supports
> ARM64/ACPI based systems, too.
> 
> Fixes: d7cf993f832ad2a4 ("i2c: mlxcpld: Allow driver to run on ARM64 architecture")

I'd remove the fixes tag here, as well.

> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Andi Shyti <andi.shyti@kernel.org> 

Andi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] platform/mellanox: NVSW_SN2201 should depend on ACPI
  2023-09-04 12:00 ` [PATCH 1/2] platform/mellanox: NVSW_SN2201 should depend on ACPI Geert Uytterhoeven
  2023-09-04 12:25   ` Vadim Pasternak
  2023-09-05 23:03   ` Andi Shyti
@ 2023-09-11 11:25   ` Hans de Goede
  2 siblings, 0 replies; 9+ messages in thread
From: Hans de Goede @ 2023-09-11 11:25 UTC (permalink / raw)
  To: Geert Uytterhoeven, Andi Shyti, Mark Gross, Vadim Pasternak,
	Michael Shych, Wolfram Sang
  Cc: linux-i2c, platform-driver-x86, linux-kernel

Hi,

On 9/4/23 14:00, Geert Uytterhoeven wrote:
> The only probing method supported by the Nvidia SN2201 platform driver
> is probing through an ACPI match table.  Hence add a dependency on
> ACPI, to prevent asking the user about this driver when configuring a
> kernel without ACPI support.
> 
> Fixes: 662f24826f954d49 ("platform/mellanox: Add support for new SN2201 system")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Thank you for your patch, I've applied this patch to my fixes
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=fixes

Note it will show up in my fixes branch once I've pushed my
local branch there, which might take a while.

I will include this patch in my next fixes pull-req to Linus
for the current kernel development cycle.

Note I'm only picking up PATCH 1/2. I expect 2/2 to be merged
through the i2c tree.

Regards,

Hans



> ---
>  drivers/platform/mellanox/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/mellanox/Kconfig b/drivers/platform/mellanox/Kconfig
> index 382793e73a60a8b3..30b50920b278c94b 100644
> --- a/drivers/platform/mellanox/Kconfig
> +++ b/drivers/platform/mellanox/Kconfig
> @@ -80,8 +80,8 @@ config MLXBF_PMC
>  
>  config NVSW_SN2201
>  	tristate "Nvidia SN2201 platform driver support"
> -	depends on HWMON
> -	depends on I2C
> +	depends on HWMON && I2C
> +	depends on ACPI || COMPILE_TEST
>  	select REGMAP_I2C
>  	help
>  	  This driver provides support for the Nvidia SN2201 platform.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] i2c: I2C_MLXCPLD on ARM64 should depend on ACPI
  2023-09-04 12:00 ` [PATCH 2/2] i2c: I2C_MLXCPLD on ARM64 " Geert Uytterhoeven
  2023-09-04 12:25   ` Vadim Pasternak
  2023-09-05 23:04   ` Andi Shyti
@ 2023-09-13  8:57   ` Wolfram Sang
  2 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2023-09-13  8:57 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Andi Shyti, Hans de Goede, Mark Gross, Vadim Pasternak,
	Michael Shych, linux-i2c, platform-driver-x86, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 765 bytes --]

On Mon, Sep 04, 2023 at 02:00:36PM +0200, Geert Uytterhoeven wrote:
> The "i2c_mlxcpld" platform device is only instantiated on X86 systems
> (through drivers/platform/x86/mlx-platform.c), or on ARM64 systems with
> ACPI (through drivers/platform/mellanox/nvsw-sn2201.c).  Hence further
> restrict the dependency on ARM64 to ACPI, to prevent asking the user
> about this driver when configuring an ARM64 kernel without ACPI support.
> 
> While at it, document in the Kconfig help text that the driver supports
> ARM64/ACPI based systems, too.
> 
> Fixes: d7cf993f832ad2a4 ("i2c: mlxcpld: Allow driver to run on ARM64 architecture")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Removed Fixes tag and applied to for-current, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-09-13  8:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-04 12:00 [PATCH 0/2] Restrict Mellanox platform and i2c dependencies Geert Uytterhoeven
2023-09-04 12:00 ` [PATCH 1/2] platform/mellanox: NVSW_SN2201 should depend on ACPI Geert Uytterhoeven
2023-09-04 12:25   ` Vadim Pasternak
2023-09-05 23:03   ` Andi Shyti
2023-09-11 11:25   ` Hans de Goede
2023-09-04 12:00 ` [PATCH 2/2] i2c: I2C_MLXCPLD on ARM64 " Geert Uytterhoeven
2023-09-04 12:25   ` Vadim Pasternak
2023-09-05 23:04   ` Andi Shyti
2023-09-13  8:57   ` Wolfram Sang

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.