summaryrefslogtreecommitdiff
path: root/include/linux/leds-qpnp-flash.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/leds-qpnp-flash.h')
-rw-r--r--include/linux/leds-qpnp-flash.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/leds-qpnp-flash.h b/include/linux/leds-qpnp-flash.h
new file mode 100644
index 000000000000..4b5a339970fa
--- /dev/null
+++ b/include/linux/leds-qpnp-flash.h
@@ -0,0 +1,28 @@
+/* Copyright (c) 2016, 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_CURRENT BIT(2)
+#define PRE_FLASH 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