1 #include <linux/kernel.h>
2 #include <linux/module.h>
3 #include <linux/init.h>
4 #include <linux/types.h>
5 #include <linux/wait.h>
6 #include <linux/slab.h>
8 #include <linux/sched.h>
9 #include <linux/poll.h>
10 #include <linux/device.h>
11 #include <linux/interrupt.h>
12 #include <linux/delay.h>
13 #include <linux/platform_device.h>
14 #include <linux/cdev.h>
15 #include <linux/errno.h>
16 #include <linux/time.h>
17 #include "kd_flashlight.h"
19 #include <asm/uaccess.h>
20 #include "kd_camera_hw.h"
21 #include <cust_gpio_usage.h>
22 #include <linux/hrtimer.h>
23 #include <linux/ktime.h>
24 #include <linux/xlog.h>
25 #include <linux/version.h>
26 /******************************************************************************
28 ******************************************************************************/
29 // availible parameter
32 // ANDROID_LOG_WARNING
35 // ANDROID_LOG_VERBOSE
36 #define TAG_NAME "leds_strobe.c"
37 #define PK_DBG_NONE(fmt, arg...) do {} while (0)
38 #define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg)
39 #define PK_WARN(fmt, arg...) xlog_printk(ANDROID_LOG_WARNING, TAG_NAME, KERN_WARNING "%s: " fmt, __FUNCTION__ ,##arg)
40 #define PK_NOTICE(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_NOTICE "%s: " fmt, __FUNCTION__ ,##arg)
41 #define PK_INFO(fmt, arg...) xlog_printk(ANDROID_LOG_INFO , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg)
42 #define PK_TRC_FUNC(f) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, "<%s>\n", __FUNCTION__);
43 #define PK_TRC_VERBOSE(fmt, arg...) xlog_printk(ANDROID_LOG_VERBOSE, TAG_NAME, fmt, ##arg)
44 #define PK_ERROR(fmt, arg...) xlog_printk(ANDROID_LOG_ERROR , TAG_NAME, KERN_ERR "%s: " fmt, __FUNCTION__ ,##arg)
47 #define DEBUG_LEDS_STROBE
48 #ifdef DEBUG_LEDS_STROBE
49 #define PK_DBG PK_DBG_FUNC
50 #define PK_VER PK_TRC_VERBOSE
51 #define PK_ERR PK_ERROR
59 static int sub_strobe_ioctl(MUINT32 cmd
, MUINT32 arg
)
61 PK_DBG("sub dummy ioctl");
65 static int sub_strobe_open(void *pArg
)
67 PK_DBG("sub dummy open");
72 static int sub_strobe_release(void *pArg
)
74 PK_DBG("sub dummy release");
79 FLASHLIGHT_FUNCTION_STRUCT subStrobeFunc
=
87 MUINT32
subStrobeInit(PFLASHLIGHT_FUNCTION_STRUCT
*pfFunc
)
91 *pfFunc
= &subStrobeFunc
;