public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] leds: qcom-lpg: add QCOM_PBS dependency
@ 2024-02-12 11:15 Arnd Bergmann
  2024-02-12 20:06 ` Jean Delvare
  2024-02-23 14:52 ` (subset) " Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2024-02-12 11:15 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones, Anjelique Melendez
  Cc: Arnd Bergmann, Jean Delvare, linux-leds, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The lpg driver fails to link now when the pbs driver is in a loadable module:

x86_64-linux-ld: drivers/leds/rgb/leds-qcom-lpg.o: in function `lpg_brightness_set':
leds-qcom-lpg.c:(.text+0xe7f): undefined reference to `qcom_pbs_trigger_event'
x86_64-linux-ld: drivers/leds/rgb/leds-qcom-lpg.o: in function `lpg_probe':
leds-qcom-lpg.c:(.text+0x16a5): undefined reference to `get_pbs_client_device'

Add a dependency to avoid the broken configuration. Apparently there is still
a use for lpg with pbs disabled entirely for certain chips, so allow both
but not LEDS_QCOM_LPG=y with QCOM_PBS=m.

Fixes: 214110175679 ("leds: rgb: leds-qcom-lpg: Add support for PPG through single SDAM")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/leds/rgb/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/leds/rgb/Kconfig b/drivers/leds/rgb/Kconfig
index e66bd21b9852..eaeafdd5eaae 100644
--- a/drivers/leds/rgb/Kconfig
+++ b/drivers/leds/rgb/Kconfig
@@ -41,6 +41,7 @@ config LEDS_QCOM_LPG
 	tristate "LED support for Qualcomm LPG"
 	depends on OF
 	depends on PWM
+	depends on QCOM_PBS || !QCOM_PBS
 	depends on SPMI
 	help
 	  This option enables support for the Light Pulse Generator found in a
-- 
2.39.2


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

* Re: [PATCH] leds: qcom-lpg: add QCOM_PBS dependency
  2024-02-12 11:15 [PATCH] leds: qcom-lpg: add QCOM_PBS dependency Arnd Bergmann
@ 2024-02-12 20:06 ` Jean Delvare
  2024-02-23 14:52 ` (subset) " Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2024-02-12 20:06 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Pavel Machek, Lee Jones, Anjelique Melendez, Arnd Bergmann,
	linux-leds, linux-kernel

On Mon, 12 Feb 2024 12:15:02 +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The lpg driver fails to link now when the pbs driver is in a loadable module:
> 
> x86_64-linux-ld: drivers/leds/rgb/leds-qcom-lpg.o: in function `lpg_brightness_set':
> leds-qcom-lpg.c:(.text+0xe7f): undefined reference to `qcom_pbs_trigger_event'
> x86_64-linux-ld: drivers/leds/rgb/leds-qcom-lpg.o: in function `lpg_probe':
> leds-qcom-lpg.c:(.text+0x16a5): undefined reference to `get_pbs_client_device'
> 
> Add a dependency to avoid the broken configuration. Apparently there is still
> a use for lpg with pbs disabled entirely for certain chips, so allow both
> but not LEDS_QCOM_LPG=y with QCOM_PBS=m.
> 
> Fixes: 214110175679 ("leds: rgb: leds-qcom-lpg: Add support for PPG through single SDAM")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/leds/rgb/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/leds/rgb/Kconfig b/drivers/leds/rgb/Kconfig
> index e66bd21b9852..eaeafdd5eaae 100644
> --- a/drivers/leds/rgb/Kconfig
> +++ b/drivers/leds/rgb/Kconfig
> @@ -41,6 +41,7 @@ config LEDS_QCOM_LPG
>  	tristate "LED support for Qualcomm LPG"
>  	depends on OF
>  	depends on PWM
> +	depends on QCOM_PBS || !QCOM_PBS
>  	depends on SPMI
>  	help
>  	  This option enables support for the Light Pulse Generator found in a

Reviewed-by: Jean Delvare <jdelvare@suse.de>

Thanks,
-- 
Jean Delvare
SUSE L3 Support

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

* Re: (subset) [PATCH] leds: qcom-lpg: add QCOM_PBS dependency
  2024-02-12 11:15 [PATCH] leds: qcom-lpg: add QCOM_PBS dependency Arnd Bergmann
  2024-02-12 20:06 ` Jean Delvare
@ 2024-02-23 14:52 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2024-02-23 14:52 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones, Anjelique Melendez, Arnd Bergmann
  Cc: Arnd Bergmann, Jean Delvare, linux-leds, linux-kernel

On Mon, 12 Feb 2024 12:15:02 +0100, Arnd Bergmann wrote:
> The lpg driver fails to link now when the pbs driver is in a loadable module:
> 
> x86_64-linux-ld: drivers/leds/rgb/leds-qcom-lpg.o: in function `lpg_brightness_set':
> leds-qcom-lpg.c:(.text+0xe7f): undefined reference to `qcom_pbs_trigger_event'
> x86_64-linux-ld: drivers/leds/rgb/leds-qcom-lpg.o: in function `lpg_probe':
> leds-qcom-lpg.c:(.text+0x16a5): undefined reference to `get_pbs_client_device'
> 
> [...]

Applied, thanks!

[1/1] leds: qcom-lpg: add QCOM_PBS dependency
      commit: 2b6e12192159605ed7cffd36892cea2c82786975

--
Lee Jones [李琼斯]


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

end of thread, other threads:[~2024-02-23 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-12 11:15 [PATCH] leds: qcom-lpg: add QCOM_PBS dependency Arnd Bergmann
2024-02-12 20:06 ` Jean Delvare
2024-02-23 14:52 ` (subset) " Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox