2 * Copyright (C) 2012 Spreadtrum Communications Inc.
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 #include <linux/module.h>
14 #include <linux/kernel.h>
15 #include <linux/init.h>
18 #include <mach/hardware.h>
19 #include <mach/board.h>
25 #define SPRD_FLASH_ON 1
26 #define SPRD_FLASH_OFF 0
28 int sprd_flash_on(void)
30 printk("sprd_flash_on \n");
31 gpio_request(GPIO_CAM_FLASH_EN,"cam_flash_en");
32 gpio_direction_output(GPIO_CAM_FLASH_EN, SPRD_FLASH_ON);
33 gpio_free(GPIO_CAM_FLASH_EN);
37 int sprd_flash_high_light(void)
39 printk("sprd_flash_high_light \n");
40 gpio_request(GPIO_CAM_FLASH_EN,"cam_flash_en");
41 gpio_direction_output(GPIO_CAM_FLASH_EN, SPRD_FLASH_ON);
42 gpio_free(GPIO_CAM_FLASH_EN);
46 int sprd_flash_close(void)
48 printk("sprd_flash_close \n");
49 gpio_request(GPIO_CAM_FLASH_EN,"cam_flash_en");
50 gpio_direction_output(GPIO_CAM_FLASH_EN, SPRD_FLASH_OFF);
51 gpio_free(GPIO_CAM_FLASH_EN);