When CONFIG_LEDS_QPNP_FLASH_V2 is disabled,camera files that make use of qpnp_flash_led_prepare() fails the compilation as the reference is not available. Add the function to allow them compile. Change-Id: Idc9502543f067717afcaf92d80825182c750aaf2 Signed-off-by: Imran Ahmad <imrahm@codeaurora.org>
48 lines
1.4 KiB
C
48 lines
1.4 KiB
C
/* Copyright (c) 2016-2018, 2020, The Linux Foundation. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
* only version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#ifndef __LEDS_QPNP_FLASH_H
|
|
#define __LEDS_QPNP_FLASH_H
|
|
|
|
#include <linux/leds.h>
|
|
|
|
#define ENABLE_REGULATOR BIT(0)
|
|
#define DISABLE_REGULATOR BIT(1)
|
|
#define QUERY_MAX_AVAIL_CURRENT BIT(2)
|
|
#define QUERY_MAX_CURRENT BIT(3)
|
|
|
|
#define FLASH_LED_PREPARE_OPTIONS_MASK GENMASK(3, 0)
|
|
|
|
#if (defined CONFIG_LEDS_QTI_FLASH || defined CONFIG_LEDS_QPNP_FLASH_V2)
|
|
int qpnp_flash_led_prepare(struct led_trigger *trig, int options,
|
|
int *max_current);
|
|
#else
|
|
static inline int qpnp_flash_led_prepare(struct led_trigger *trig, int options,
|
|
int *max_current)
|
|
{
|
|
return -ENODEV;
|
|
}
|
|
#endif
|
|
|
|
#ifdef 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;
|
|
}
|
|
#endif
|
|
|
|
#endif
|