All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: tegra: add regulator dependency
@ 2021-07-21 15:14 Arnd Bergmann
  2021-07-21 15:29 ` Dmitry Osipenko
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2021-07-21 15:14 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Dmitry Osipenko
  Cc: soc, Arnd Bergmann, Ulf Hansson, linux-tegra, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The two regulator drivers in the drivers/soc/ directory fail to build
when regulator support is disabled:

aarch64-linux-ld: drivers/soc/tegra/regulators-tegra20.o: in function `tegra20_regulator_reboot':
regulators-tegra20.c:(.text.tegra20_regulator_reboot+0x4c): undefined reference to `regulator_sync_voltage_rdev'
aarch64-linux-ld: regulators-tegra20.c:(.text.tegra20_regulator_reboot+0x58): undefined reference to `regulator_sync_voltage_rdev'
aarch64-linux-ld: drivers/soc/tegra/regulators-tegra30.o: in function `tegra30_regulator_reboot':
regulators-tegra30.c:(.text.tegra30_regulator_reboot+0x44): undefined reference to `regulator_sync_voltage_rdev'
aarch64-linux-ld: regulators-tegra30.c:(.text.tegra30_regulator_reboot+0x50): undefined reference to `regulator_sync_voltage_rdev'

Add a Kconfig dependency to avoid this configuration.

Fixes: 496747e7d907 ("soc/tegra: regulators: Add regulators coupler for Tegra20")
Fixes: 783807436f36 ("soc/tegra: regulators: Add regulators coupler for Tegra30")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/soc/tegra/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/soc/tegra/Kconfig b/drivers/soc/tegra/Kconfig
index db49075b1946..c56122be27a9 100644
--- a/drivers/soc/tegra/Kconfig
+++ b/drivers/soc/tegra/Kconfig
@@ -153,8 +153,10 @@ config SOC_TEGRA_POWERGATE_BPMP
 
 config SOC_TEGRA20_VOLTAGE_COUPLER
 	bool "Voltage scaling support for Tegra20 SoCs"
+	depends on REGULATOR
 	depends on ARCH_TEGRA_2x_SOC || COMPILE_TEST
 
 config SOC_TEGRA30_VOLTAGE_COUPLER
 	bool "Voltage scaling support for Tegra30 SoCs"
+	depends on REGULATOR
 	depends on ARCH_TEGRA_3x_SOC || COMPILE_TEST
-- 
2.29.2


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

* Re: [PATCH] arm64: tegra: add regulator dependency
  2021-07-21 15:14 [PATCH] arm64: tegra: add regulator dependency Arnd Bergmann
@ 2021-07-21 15:29 ` Dmitry Osipenko
  2021-07-21 19:59   ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Osipenko @ 2021-07-21 15:29 UTC (permalink / raw)
  To: Arnd Bergmann, Thierry Reding, Jonathan Hunter
  Cc: soc, Arnd Bergmann, Ulf Hansson, linux-tegra, linux-kernel

21.07.2021 18:14, Arnd Bergmann пишет:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The two regulator drivers in the drivers/soc/ directory fail to build
> when regulator support is disabled:
> 
> aarch64-linux-ld: drivers/soc/tegra/regulators-tegra20.o: in function `tegra20_regulator_reboot':
> regulators-tegra20.c:(.text.tegra20_regulator_reboot+0x4c): undefined reference to `regulator_sync_voltage_rdev'
> aarch64-linux-ld: regulators-tegra20.c:(.text.tegra20_regulator_reboot+0x58): undefined reference to `regulator_sync_voltage_rdev'
> aarch64-linux-ld: drivers/soc/tegra/regulators-tegra30.o: in function `tegra30_regulator_reboot':
> regulators-tegra30.c:(.text.tegra30_regulator_reboot+0x44): undefined reference to `regulator_sync_voltage_rdev'
> aarch64-linux-ld: regulators-tegra30.c:(.text.tegra30_regulator_reboot+0x50): undefined reference to `regulator_sync_voltage_rdev'
> 
> Add a Kconfig dependency to avoid this configuration.
> 
> Fixes: 496747e7d907 ("soc/tegra: regulators: Add regulators coupler for Tegra20")
> Fixes: 783807436f36 ("soc/tegra: regulators: Add regulators coupler for Tegra30")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/soc/tegra/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/soc/tegra/Kconfig b/drivers/soc/tegra/Kconfig
> index db49075b1946..c56122be27a9 100644
> --- a/drivers/soc/tegra/Kconfig
> +++ b/drivers/soc/tegra/Kconfig
> @@ -153,8 +153,10 @@ config SOC_TEGRA_POWERGATE_BPMP
>  
>  config SOC_TEGRA20_VOLTAGE_COUPLER
>  	bool "Voltage scaling support for Tegra20 SoCs"
> +	depends on REGULATOR
>  	depends on ARCH_TEGRA_2x_SOC || COMPILE_TEST
>  
>  config SOC_TEGRA30_VOLTAGE_COUPLER
>  	bool "Voltage scaling support for Tegra30 SoCs"
> +	depends on REGULATOR
>  	depends on ARCH_TEGRA_3x_SOC || COMPILE_TEST
> 

Hello Arnd,

Thank you for the patch!

I also sent out the fix [1] about a month ago and was trying to ping
Thierry. Unfortunately there was no reaction so far and now Thierry is
on vacation.

[1]
https://patchwork.ozlabs.org/project/linux-tegra/patch/20210621160739.22448-1-digetx@gmail.com/

It looks like my variant of the fix should be a bit more correct since
it won't build the regulator drivers if both TEGRA=n and REGULATOR=n.

I guess it should be fine if you could take the patch directly, perhaps
Jon could ack the patch for that. Otherwise we could wait for Thierry to
return.

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

* Re: [PATCH] arm64: tegra: add regulator dependency
  2021-07-21 15:29 ` Dmitry Osipenko
@ 2021-07-21 19:59   ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2021-07-21 19:59 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: Thierry Reding, Jonathan Hunter, SoC Team, Arnd Bergmann,
	Ulf Hansson, open list:TEGRA ARCHITECTURE SUPPORT,
	Linux Kernel Mailing List

On Wed, Jul 21, 2021 at 5:29 PM Dmitry Osipenko <digetx@gmail.com> wrote:
> 21.07.2021 18:14, Arnd Bergmann пишет:
>
> [1]
> https://patchwork.ozlabs.org/project/linux-tegra/patch/20210621160739.22448-1-digetx@gmail.com/
>
> It looks like my variant of the fix should be a bit more correct since
> it won't build the regulator drivers if both TEGRA=n and REGULATOR=n.
>
> I guess it should be fine if you could take the patch directly, perhaps
> Jon could ack the patch for that. Otherwise we could wait for Thierry to
> return.

Sounds good to me. Please send your patch to soc@kernel.org (with everyone
on Cc) so it lands in our patchwork, and if Jon or Thierry acks it that makes it
there as well.

        Arnd

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

* [PATCH] arm64: tegra: add regulator dependency
@ 2021-07-21 15:13 Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2021-07-21 15:13 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Dmitry Osipenko
  Cc: Arnd Bergmann, Ulf Hansson, linux-tegra, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The two regulator drivers in the drivers/soc/ directory fail to build
when regulator support is disabled:

aarch64-linux-ld: drivers/soc/tegra/regulators-tegra20.o: in function `tegra20_regulator_reboot':
regulators-tegra20.c:(.text.tegra20_regulator_reboot+0x4c): undefined reference to `regulator_sync_voltage_rdev'
aarch64-linux-ld: regulators-tegra20.c:(.text.tegra20_regulator_reboot+0x58): undefined reference to `regulator_sync_voltage_rdev'
aarch64-linux-ld: drivers/soc/tegra/regulators-tegra30.o: in function `tegra30_regulator_reboot':
regulators-tegra30.c:(.text.tegra30_regulator_reboot+0x44): undefined reference to `regulator_sync_voltage_rdev'
aarch64-linux-ld: regulators-tegra30.c:(.text.tegra30_regulator_reboot+0x50): undefined reference to `regulator_sync_voltage_rdev'

Add a Kconfig dependency to avoid this configuration.

Fixes: 496747e7d907 ("soc/tegra: regulators: Add regulators coupler for Tegra20")
Fixes: 783807436f36 ("soc/tegra: regulators: Add regulators coupler for Tegra30")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/soc/tegra/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/soc/tegra/Kconfig b/drivers/soc/tegra/Kconfig
index db49075b1946..c56122be27a9 100644
--- a/drivers/soc/tegra/Kconfig
+++ b/drivers/soc/tegra/Kconfig
@@ -153,8 +153,10 @@ config SOC_TEGRA_POWERGATE_BPMP
 
 config SOC_TEGRA20_VOLTAGE_COUPLER
 	bool "Voltage scaling support for Tegra20 SoCs"
+	depends on REGULATOR
 	depends on ARCH_TEGRA_2x_SOC || COMPILE_TEST
 
 config SOC_TEGRA30_VOLTAGE_COUPLER
 	bool "Voltage scaling support for Tegra30 SoCs"
+	depends on REGULATOR
 	depends on ARCH_TEGRA_3x_SOC || COMPILE_TEST
-- 
2.29.2


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

end of thread, other threads:[~2021-07-21 19:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 15:14 [PATCH] arm64: tegra: add regulator dependency Arnd Bergmann
2021-07-21 15:29 ` Dmitry Osipenko
2021-07-21 19:59   ` Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2021-07-21 15:13 Arnd Bergmann

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.