From 8e4bff4cab0ddac6060645b0715210484d02ff40 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 30 Aug 2017 08:25:59 +0000 Subject: Initial file dump from open source release --- drivers/media/sprd_dcam/flash/flash_sm5701.c | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 drivers/media/sprd_dcam/flash/flash_sm5701.c (limited to 'drivers/media/sprd_dcam/flash/flash_sm5701.c') diff --git a/drivers/media/sprd_dcam/flash/flash_sm5701.c b/drivers/media/sprd_dcam/flash/flash_sm5701.c new file mode 100644 index 00000000..81354ec1 --- /dev/null +++ b/drivers/media/sprd_dcam/flash/flash_sm5701.c @@ -0,0 +1,48 @@ +/* +* * Copyright (C) 2012 Spreadtrum Communications Inc. +* * +* * This software is licensed under the terms of the GNU General Public +* * License version 2, as published by the Free Software Foundation, and +* * may be copied, distributed, and modified under those terms. +* * +* * 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. +* */ +#include +#include +#include +#include +#include +#include +#include +#include + +int sprd_flash_on(void) +{ + printk("sprd_flash_on\n"); + sm5701_led_ready(MOVIE_MODE); + sm5701_set_fleden(SM5701_FLEDEN_ON_MOVIE); + + return 0; +} + +int sprd_flash_high_light(void) +{ + printk("sprd_flash_high_light\n"); + sm5701_led_ready(FLASH_MODE); + sm5701_set_fleden(SM5701_FLEDEN_ON_FLASH); + + return 0; +} + +int sprd_flash_close(void) +{ + printk("sprd_flash_close\n"); + sm5701_set_fleden(SM5701_FLEDEN_DISABLED); + sm5701_led_ready(LED_DISABLE); + + return 0; +} + -- cgit v1.3.1