android_kernel_samsung_msm8976/include/linux/leds-sm5705.h
LuK1337 fc9499e55a Import latest Samsung release
* Package version: T713XXU2BQCO

Change-Id: I293d9e7f2df458c512d59b7a06f8ca6add610c99
2017-04-18 03:43:52 +02:00

42 lines
1.1 KiB
C

/*
* Flash-LED device driver for SM5705
*
* Copyright (C) 2015 Silicon Mitus
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#ifndef __LEDS_SM5705_H__
#define __LEDS_SM5705_H__
enum {
SM5705_FLED_0 = 0x0,
SM5705_FLED_1,
SM5705_FLED_MAX,
};
struct sm5705_fled_platform_data {
struct {
unsigned short flash_current_mA;
unsigned short torch_current_mA;
bool used_gpio;
int flash_en_pin;
int torch_en_pin;
}led[SM5705_FLED_MAX];
};
int sm5705_fled_prepare_flash(unsigned char index);
int sm5705_fled_torch_on(unsigned char index);
int sm5705_fled_flash_on(unsigned char index);
int sm5705_fled_led_off(unsigned char index);
int sm5705_fled_close_flash(unsigned char index);
#if defined(CONFIG_DUAL_LEDS_FLASH)
int sm5705_fled_pre_flash_on(unsigned char index, int32_t pre_flash_current_mA);
int sm5705_fled_flash_on_set_current(unsigned char index, int32_t flash_current_mA);
#endif
#endif