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 <jprakash@codeaurora.org>
This commit is contained in:
Jishnu Prakash 2021-01-10 20:44:57 +05:30
parent dffc1577de
commit b295dc4303

View File

@ -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;
}