Skip to contentSkip to conversation

leds: qcom-lpg: add QCOM_PBS dependency

PATCH Applied Arnd Bergmann 3 participants 3 messages Feb 12, 2024 – Feb 23, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 leds: qcom-lpg: add QCOM_PBS dependency

From: Arnd Bergmann <[email protected]>

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")
---
 drivers/leds/rgb/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/leds/rgb/Kconfig +1 -0
index e66bd21b9852..eaeafdd5eaae 100644
@@ -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
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 24 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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")
---
 drivers/leds/rgb/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/leds/rgb/Kconfig +0 -0
index e66bd21b9852..eaeafdd5eaae 100644

drivers/leds/rgb/Kconfig config LEDS_QCOM_LPG · line 47

Quoted 7 lines
drivers/leds/rgb/Kconfig +1 -0
@@ -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

Thanks,

Signature · 2 lines
Jean Delvare
SUSE L3 Support
maintainer Applied
#2 lore raw

Re: (subset) [PATCH] leds: qcom-lpg: add QCOM_PBS dependency

In reply to Arnd Bergmann
Quoted 8 lines · Arnd Bergmann

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 [李琼斯]