
qti_flash_led_prepare() API is used by flash clients (E.g. Camera) to query maximum current available for flash. Add support for this API which initially returns maximum current that is supported for flash LED module (2000 mA). Also, add a sysfs parameter under switch devices to show max available flash current. Change-Id: I3aed009a0d7e0f34a6d05a45af34fcd0f37a6fe7 Signed-off-by: Shyam Kumar Thella <sthella@codeaurora.org> Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
24 lines
507 B
C
24 lines
507 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef __LEDS_QTI_FLASH_H
|
|
#define __LEDS_QTI_FLASH_H
|
|
|
|
#include <linux/leds.h>
|
|
|
|
#define QUERY_MAX_AVAIL_CURRENT BIT(0)
|
|
|
|
#if IS_ENABLED(CONFIG_LEDS_QTI_FLASH)
|
|
int qti_flash_led_prepare(struct led_trigger *trig,
|
|
int options, int *max_current);
|
|
#else
|
|
static inline int qti_flash_led_prepare(struct led_trigger *trig,
|
|
int options, int *max_current)
|
|
{
|
|
return -EINVAL;
|
|
}
|
|
#endif
|
|
#endif
|