leds: qcom-lpg: Add QCOM_PBS dependency
authorArnd Bergmann <arnd@arndb.de>
Mon, 12 Feb 2024 11:15:02 +0000 (12:15 +0100)
committerLee Jones <lee@kernel.org>
Thu, 7 Mar 2024 08:48:09 +0000 (08:48 +0000)
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>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Link: https://lore.kernel.org/r/20240212111526.829122-1-arnd@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/rgb/Kconfig

index e66bd21b9852ec5d1df1ac14babf21eacb93792c..eaeafdd5eaaea31b6a029aa18fe5a7f032a489c0 100644 (file)
@@ -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