blob: 1ae77e2e277b088b80ad79bf77ac739923da187c [file] [log] [blame]
David Collins8885f792017-01-26 14:36:34 -08001/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details. 1
11 */
12
13#ifndef __LEDS_QPNP_FLASH_V2_H
14#define __LEDS_QPNP_FLASH_V2_H
15
16#include <linux/leds.h>
17#include <linux/notifier.h>
18
19enum flash_led_irq_type {
20 LED_FAULT_IRQ = BIT(0),
21 MITIGATION_IRQ = BIT(1),
22 FLASH_TIMER_EXP_IRQ = BIT(2),
23 ALL_RAMP_DOWN_DONE_IRQ = BIT(3),
24 ALL_RAMP_UP_DONE_IRQ = BIT(4),
25 LED3_RAMP_UP_DONE_IRQ = BIT(5),
26 LED2_RAMP_UP_DONE_IRQ = BIT(6),
27 LED1_RAMP_UP_DONE_IRQ = BIT(7),
28 INVALID_IRQ = BIT(8),
29};
30
31int qpnp_flash_led_register_irq_notifier(struct notifier_block *nb);
32int qpnp_flash_led_unregister_irq_notifier(struct notifier_block *nb);
33
34#endif