diff options
author | Dan Murphy <dmurphy@ti.com> | 2011-05-31 09:22:57 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-05-31 11:04:30 +0100 |
commit | 6f12d1a9fc157dd659b1ecf9715662ad94d91404 (patch) | |
tree | 6783612fcb3fc82640ac39869d3c749909baeb93 /include | |
parent | 49b4cd6aa762f06ee7b76a18f7c4800ea0c5a5b9 (diff) |
misc: twl6040-vib: Add timed output vibrator support
Add initial support for TWL6040 vibrator driver. This implementation
can be plugged directly with Android Vibrator HAL without any changes.
Change-Id: I731217c97cd18c2a1959ac06e2ac2a7fef0b8445
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/i2c/twl.h | 6 | ||||
-rw-r--r-- | include/linux/twl6040-vib.h | 30 |
2 files changed, 36 insertions, 0 deletions
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 028aaaf082f..7cc832460ee 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h @@ -650,6 +650,12 @@ struct twl4030_codec_audio_data { struct twl4030_codec_vibra_data { unsigned int coexist; + + /* timed-output based implementations */ + int max_timeout; + int initial_vibrate; + int (*init)(void); + void (*exit)(void); }; struct twl4030_codec_data { diff --git a/include/linux/twl6040-vib.h b/include/linux/twl6040-vib.h new file mode 100644 index 00000000000..0a85a67afe2 --- /dev/null +++ b/include/linux/twl6040-vib.h @@ -0,0 +1,30 @@ +/* drivers/misc/twl6040-vib.h + * + * Copyright (C) 2010 Texas Instruments, Inc. + * Copyright (C) 2008 Google, Inc. + * Author: Dan Murphy <dmurphy@ti.com> + * + * 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. + * + * Derived from: vib-gpio.h + */ + +#ifndef _LINUX_TWL6040_VIB_H +#define _LINUX_TWL6040_VIB_H + +#ifdef __KERNEL__ + +#define VIB_NAME "vib-twl6040" + +#endif /* __KERNEL__ */ + +void vibrator_haptic_fire(int value); + +#endif /* _LINUX_TWL6040_VIB_H */ |