From b295dc430300c1d3dfbab9d69b4a860a680e604e Mon Sep 17 00:00:00 2001 From: Jishnu Prakash Date: Sun, 10 Jan 2021 20:44:57 +0530 Subject: [PATCH] backlight: qcom-spmi-wled: expose WLED selfie flash API with QTI_FLASH At present, the WLED selfie flash API wled_flash_led_prepare is exposed only for targets using QPNP_FLASH_V2 and WLED. Expose it for targets using the combination of QTI_FLASH and WLED too. Change-Id: I136b95f8219171534bad06109bd08423061a00c6 Signed-off-by: Jishnu Prakash --- include/linux/leds-qti-flash.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/include/linux/leds-qti-flash.h b/include/linux/leds-qti-flash.h index 337ba0369f91..0f5b9dc9e0ce 100644 --- a/include/linux/leds-qti-flash.h +++ b/include/linux/leds-qti-flash.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. */ #ifndef __LEDS_QTI_FLASH_H @@ -35,7 +35,18 @@ static inline int qti_flash_led_prepare(struct led_trigger *trig, } static inline int qti_flash_led_set_param(struct led_trigger *trig, - struct flash_led_param param); + struct flash_led_param param) +{ + return -EINVAL; +} +#endif + +#if IS_ENABLED(CONFIG_BACKLIGHT_QCOM_SPMI_WLED) +int wled_flash_led_prepare(struct led_trigger *trig, int options, + int *max_current); +#else +static inline int wled_flash_led_prepare(struct led_trigger *trig, int options, + int *max_current) { return -EINVAL; }