From 7f909ec174d03a18da0642309c1aa41d15ee3bc6 Mon Sep 17 00:00:00 2001 From: Shreshtha Kumar Sahu Date: Tue, 30 Aug 2011 08:58:33 +0100 Subject: ux500: u5500: timed output driver for ab5500 vibrator Simple timed output vibrator driver for AB5500 MFD chips. This chip supports Rotary and Linear vibrator hardware types. Resonance frequency of 100-198 Hz is supported. ST-Ericsson ID: WP 256408 Signed-off-by: Avinash A Signed-off-by: Robert Marklund u5500: enable vibrator when new timeout is requested with this patch new timeout value will be accepted/updated even if vibrator is already executing. ST-Ericsson ID: 360178 Signed-off-by: Avinash A vibra:Remove unnecessary assignment of dev->parent Remove unnecessary assignment of dev->parent, because of this during timed out class unregister it is trying to free resources of parent which does not exist ST-Ericsson ID: 410065 Signed-off-by: Naga Radhesh u5500: Add vibra end of life support Detect and disable vibra when vibra end of life(eol) condition is detected at boot sequence. ST-Ericsson ID: 265890 Signed-off-by: Rajagopala V --- arch/arm/mach-ux500/board-u5500.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c index c3bae368bd7..6c18f916795 100644 --- a/arch/arm/mach-ux500/board-u5500.c +++ b/arch/arm/mach-ux500/board-u5500.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -149,6 +150,20 @@ static struct ab5500_ponkey_platform_data ab5500_ponkey_data = { .shutdown_secs = 10, }; +/* ab5500-vibra */ +static struct ab5500_vibra_platform_data ab5500_vibra_data = { + .type = AB5500_VIB_ROTARY, + .voltage = AB5500_VIB_VOLT_MIN, + /* + * EOL voltage in millivolts. By default, it is + * disabled. Set threshold volatge to enable. + */ + .eol_voltage = 0, + .res_freq = AB5500_VIB_RFREQ_150HZ, + .magnitude = 0x7F, + .pulse = AB5500_VIB_PULSE_130ms, +}; + /* * I2C */ @@ -486,6 +501,8 @@ static struct ab5500_platform_data ab5500_plf_data = { #endif .dev_data[AB5500_DEVID_LEDS] = &ab5500_hvleds_data, .dev_data_sz[AB5500_DEVID_LEDS] = sizeof(ab5500_hvleds_data), + .dev_data[AB5500_DEVID_VIBRATOR] = &ab5500_vibra_data, + .dev_data_sz[AB5500_DEVID_VIBRATOR] = sizeof(ab5500_vibra_data), .init_settings = &ab5500_init_settings, .init_settings_sz = ARRAY_SIZE(ab5500_init_settings), #if defined(CONFIG_AB5500_BM) -- cgit v1.2.3