blob: e020933cfe3171b61dd26f5bf7bd12df0629d72e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/*
* 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 <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#ifndef CONFIG_64BIT
#include <mach/hardware.h>
#include <mach/board.h>
#include <mach/adi.h>
#endif
#include <asm/gpio.h>
#define SPRD_FLASH_ON 1
#define SPRD_FLASH_OFF 0
int sprd_flash_on(void)
{
printk("sprd_flash_on \n");
gpio_request(GPIO_CAM_FLASH_EN,"cam_flash_en");
gpio_direction_output(GPIO_CAM_FLASH_EN, SPRD_FLASH_ON);
gpio_free(GPIO_CAM_FLASH_EN);
return 0;
}
int sprd_flash_high_light(void)
{
printk("sprd_flash_high_light \n");
gpio_request(GPIO_CAM_FLASH_EN,"cam_flash_en");
gpio_direction_output(GPIO_CAM_FLASH_EN, SPRD_FLASH_ON);
gpio_free(GPIO_CAM_FLASH_EN);
return 0;
}
int sprd_flash_close(void)
{
printk("sprd_flash_close \n");
gpio_request(GPIO_CAM_FLASH_EN,"cam_flash_en");
gpio_direction_output(GPIO_CAM_FLASH_EN, SPRD_FLASH_OFF);
gpio_free(GPIO_CAM_FLASH_EN);
return 0;
}
|