c388c4f15a
QPNP Flash v2 LED driver supports the flash LED peripheral on QTI PMICs like PMI8998, PM8150L and their derivatives to support camera flash operation. This is taken as a snapshot from msm-4.14 kernel 'commit 9bb584ae3a9d ("msm/sde/rotator: Add rev checks for sdmmagpie")' This change also splits some functions to fix cyclomatic complexity warnings. Change-Id: I168b1e3e5ce62852f37ee2653aada90f2a75e2ec Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
27 lines
677 B
C
27 lines
677 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (c) 2016, The Linux Foundation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef __LEDS_QPNP_FLASH_V2_H
|
|
#define __LEDS_QPNP_FLASH_V2_H
|
|
|
|
#include <linux/leds.h>
|
|
#include <linux/notifier.h>
|
|
|
|
enum flash_led_irq_type {
|
|
LED_FAULT_IRQ = BIT(0),
|
|
MITIGATION_IRQ = BIT(1),
|
|
FLASH_TIMER_EXP_IRQ = BIT(2),
|
|
ALL_RAMP_DOWN_DONE_IRQ = BIT(3),
|
|
ALL_RAMP_UP_DONE_IRQ = BIT(4),
|
|
LED3_RAMP_UP_DONE_IRQ = BIT(5),
|
|
LED2_RAMP_UP_DONE_IRQ = BIT(6),
|
|
LED1_RAMP_UP_DONE_IRQ = BIT(7),
|
|
INVALID_IRQ = BIT(8),
|
|
};
|
|
|
|
int qpnp_flash_led_register_irq_notifier(struct notifier_block *nb);
|
|
int qpnp_flash_led_unregister_irq_notifier(struct notifier_block *nb);
|
|
|
|
#endif
|