summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>2011-08-30 08:58:33 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:02:46 +0200
commit7f909ec174d03a18da0642309c1aa41d15ee3bc6 (patch)
tree4efe23bb3b952e85769d9f514add264992bf030c
parent3f9681a38f958bac86f014b8812160daca0cf980 (diff)
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 <Avinash.a@stericsson.com> Signed-off-by: Robert Marklund <robert.marklund@stericsson.com> 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 <Avinash.a@stericsson.com> 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 <naga.radheshy@stericsson.com> 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 <rajagopala.v@stericsson.com>
-rw-r--r--arch/arm/mach-ux500/board-u5500.c17
1 files changed, 17 insertions, 0 deletions
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 <linux/gpio/nomadik.h>
#include <linux/i2c.h>
#include <linux/mfd/abx500/ab5500.h>
+#include <linux/ab5500-vibra.h>
#include <linux/amba/pl022.h>
#include <linux/delay.h>
#include <linux/led-lm3530.h>
@@ -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)