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 <soc/sprd/hardware.h>
19 #include <soc/sprd/board.h>
20 #include <soc/sprd/adi.h>
25 #define SPRD_FLASH_ON 1
26 #define SPRD_FLASH_OFF 0
28 #undef GPIO_CAM_FLASH_EN
29 #define GPIO_CAM_FLASH_EN 131
31 int sprd_flash_on(void)
33 printk("sprd_flash_on \n");
34 gpio_request(GPIO_CAM_FLASH_EN,"cam_flash_en");
35 gpio_direction_output(GPIO_CAM_FLASH_EN, SPRD_FLASH_ON);
36 gpio_free(GPIO_CAM_FLASH_EN);
40 int sprd_flash_high_light(void)
42 printk("sprd_flash_high_light \n");
43 gpio_request(GPIO_CAM_FLASH_EN,"cam_flash_en");
44 gpio_direction_output(GPIO_CAM_FLASH_EN, SPRD_FLASH_ON);
45 gpio_free(GPIO_CAM_FLASH_EN);
49 int sprd_flash_close(void)
51 printk("sprd_flash_close \n");
52 gpio_request(GPIO_CAM_FLASH_EN,"cam_flash_en");
53 gpio_direction_output(GPIO_CAM_FLASH_EN, SPRD_FLASH_OFF);
54 gpio_free(GPIO_CAM_FLASH_EN);