blob: bfd886c89497db885db3a2004d2d44c132613cfc [file] [log] [blame]
Devin Kima3085422012-06-14 18:23:41 -07001/*
2 * Copyright (C) 2011 LGE, Inc.
3 *
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.
7 *
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.
12 */
13
14#ifndef __LINUX_ANDROID_VIBRATOR_H
15#define __LINUX_ANDROID_VIBRATOR_H
16
17/* android vibrator platform data */
18struct android_vibrator_platform_data {
19 int enable_status;
20 int amp;
21 int vibe_n_value;
22 int (*power_set)(int enable); /* LDO Power Set Function */
23 int (*pwm_set)(int enable, int gain, int n_value); /* PWM Set Function */
24 int (*ic_enable_set)(int enable); /* Motor IC Set Function */
25 int (*vibrator_init)(void);
26};
27
28
29/* Debug Mask setting */
30#define VIBRATOR_DEBUG_PRINT (1)
31#define VIBRATOR_ERROR_PRINT (1)
32#define VIBRATOR_INFO_PRINT (0)
33
34#if (VIBRATOR_INFO_PRINT)
35#define INFO_MSG(fmt, args...) \
36 printk(KERN_INFO "[%s] " \
37 fmt, __FUNCTION__, ##args);
38#else
39#define INFO_MSG(fmt, args...)
40#endif
41
42#if (VIBRATOR_DEBUG_PRINT)
43#define DEBUG_MSG(fmt, args...) \
44 printk(KERN_INFO "[%s %d] " \
45 fmt, __FUNCTION__, __LINE__, ##args);
46#else
47#define DEBUG_MSG(fmt, args...)
48#endif
49
50#if (VIBRATOR_ERROR_PRINT)
51#define ERR_MSG(fmt, args...) \
52 printk(KERN_ERR "[%s %d] " \
53 fmt, __FUNCTION__, __LINE__, ##args);
54#else
55#define ERR_MSG(fmt, args...)
56#endif
57
58
59#endif
60