msm-4.14/include/linux/leds-qpnp-flash.h
Subbaraman Narayanamurthy 2946916d5f leds: qpnp-flash: Add support to query maximum current
Currently, MAX_CURRENT option is used to query the maximum
available current which is a relative value based on the battery
parameters. Rename it to MAX_AVAIL_CURRENT so that MAX_CURRENT
option can be used to query the maximum current that is supported
for flash LED devices.

Change-Id: Id48327c818a42e4407627055c6b243591ab441fe
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2018-05-18 15:16:30 -07:00

29 lines
909 B
C

/* Copyright (c) 2016-2018, 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)
int qpnp_flash_led_prepare(struct led_trigger *trig, int options,
int *max_current);
#endif