diff options
| author | Marcin Mielczarczyk <marcin.mielczarczyk@tieto.com> | 2010-06-18 10:04:45 +0200 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-19 15:56:12 +0200 |
| commit | 7759be585e6774826da8fb0d12daf7164292fdcc (patch) | |
| tree | 45eff97cf4aadcd72c2e5144dd91dbd92ce819b2 /include/linux/ste_timed_vibra.h | |
| parent | 9ab67899804448f2bea4087bb6e9e4d952a79258 (diff) | |
Vibrator: Timed output vibrator driver
ST-Ericsson vibrator driver which registers in Android specific
timed output device class.
Signed-off-by: Marcin Mielczarczyk <marcin.mielczarczyk@tieto.com>
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@tieto.com>
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Timed output vibrator: New functionality.
This patch allows to form the vibration characteristic
using few parameters defined in the platform data:
- boost level and period for start condition
- on level as moderate speed
- off level and period for brake condition
Detailed information can be found here:
Documentation\DocBook\ste_timed_vibra.html
Signed-off-by: Grzegorz Sygieda <grzegorz.sygieda@tieto.com>
Signed-off-by: Krzysztof Antonowicz <krzysztof.antonowicz@tieto.com>
Signed-off-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
vibrator: remove board specific control of vibrator
Platform specific control of vibrator should be
present in board file (here board-mop500.c).
So, for example if GPIO pins are used to control
the vibrator, its control function implemenation
should be in board file.
This patch provides the callback function support
in the driver for the same.
Signed-off-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
android: vibrator: dont directly access ktime_t members
Use ktime helper functions for converting ktime values
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
u8500: vibra: linear vibrators using vibra-pwm
Linear vibrators operate on thier required resonance
frequency (for COPAL and AAC its ~150Hz). This can be
provided using AUDIO DA5 path. This software *workaround*
enables linear vibrators using AB8500 vibra-pwm by
generating required resonace frequency using software.
In addition this patch provides support for separate
platform data for Linear and Rotarty vibrators.
Signed-off-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
u8500: vibra: disable vibrator after vibration
This patch disables vibrator i.e. configures
the PWM duty cycle to zero after vibration
duration is over.
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
Diffstat (limited to 'include/linux/ste_timed_vibra.h')
| -rw-r--r-- | include/linux/ste_timed_vibra.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/linux/ste_timed_vibra.h b/include/linux/ste_timed_vibra.h new file mode 100644 index 00000000000..24edf89aade --- /dev/null +++ b/include/linux/ste_timed_vibra.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) ST-Ericsson SA 2010 + * Authors: + * Grzegorz Sygieda <grzegorz.sygieda@tieto.com> for ST-Ericsson. + * Krzysztof Antonowicz <krzysztof.antonowicz@tieto.com> for ST-Ericsson. + * + * License Terms: GNU General Public License v2 + */ + +#ifndef _STE_TIMED_VIBRA_H_ +#define _STE_TIMED_VIBRA_H + +/* Vibrator states */ +enum ste_timed_vibra_states { + STE_VIBRA_IDLE = 0, + STE_VIBRA_BOOST, + STE_VIBRA_ON, + STE_VIBRA_OFF, +}; + +typedef void (*timed_vibra_control_fp)( + unsigned char speed_left_pos, + unsigned char speed_left_neg, + unsigned char speed_right_pos, + unsigned char speed_right_neg); + +/* + * Vibrator platform data structure + * For details check ste_timed_vibra docbook + */ +struct ste_timed_vibra_platform_data { + bool is_linear_vibra; + unsigned int boost_level; /* p1 */ + unsigned int boost_time; /* p2 */ + unsigned int on_level; /* p3 */ + unsigned int off_level; /* p4 */ + unsigned int off_time; /* p5 */ + timed_vibra_control_fp timed_vibra_control; +}; + +#endif /* _STE_TIMED_VIBRA_H_ */ |
