android_kernel_samsung_sm8650/include/linux/leds-qpnp-flash-v2.h
Zihang Hu a37b2a48dc drivers: leds: Add qpnp-flash-v2 driver
Add qpnp-flash-v2 driver for kona.

This is taken as a snapshot from msm-5.4 kernel
'commit 40ccd6775f80 ("qpnp-flash-v2: Add
support for qpnp-flash-v2 driver")'.

Also, replace the iio_channel_get with devm_iio_channel_get.

Change-Id: I90bfda0ace7b86deb96efac169978c6fb7f8fa23
Signed-off-by: Zihang Hu <quic_zihahu@quicinc.com>
2023-06-09 12:46:15 +05:30

28 lines
688 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2016, 2020, 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