summaryrefslogtreecommitdiff
path: root/include
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:01:41 +0200
commit4af8850368fc894f920e504e5569779d179940f6 (patch)
tree183a7bfd0316b1e6ba3fee067d1550cdeb71fa9f /include
parent05f4e15da7ed2daf165d9472e1834e07ce44b9ab (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ab5500-vibra.h57
-rw-r--r--include/linux/mfd/abx500/ab5500-gpadc.h1
2 files changed, 58 insertions, 0 deletions
diff --git a/include/linux/ab5500-vibra.h b/include/linux/ab5500-vibra.h
new file mode 100644
index 00000000000..e85048dd801
--- /dev/null
+++ b/include/linux/ab5500-vibra.h
@@ -0,0 +1,57 @@
+/*----------------------------------------------------------------------------
+ * ab5500-vibra.h header file for ab5500 vibrator driver
+ *
+ * Copyright (C) 2011 ST-Ericsson SA.
+ *
+ * License Terms: GNU General Public License v2
+ *
+ * Author: Shreshtha Kumar SAHU <shreshthakumar.sahu@stericsson.com>
+ *
+ */
+
+#ifndef __AB5500_VIBRA_H__
+#define __AB5500_VIBRA_H__
+
+enum ab5500_vibra_type {
+ AB5500_VIB_ROTARY,
+ AB5500_VIB_LINEAR,
+};
+
+/* Vibrator Voltage */
+#define AB5500_VIB_VOLT_MIN (0x00) /* 1.3 Volt */
+#define AB5500_VIB_VOLT_MAX (0x0A) /* 3.5 Volt */
+#define AB5500_VIB_VOLT_STEP (0x01) /* 0.2 Volt */
+
+
+/* Linear Vibrator Resonance Frequncy */
+#define AB5500_VIB_RFREQ_100HZ (0xFB)
+#define AB5500_VIB_RFREQ_150HZ (0x52)
+#define AB5500_VIB_RFREQ_196HZ (0x03)
+
+/* Vibrator pulse duration in milliseconds */
+enum ab5500_vibra_pulse {
+ AB5500_VIB_PULSE_OFF,
+ AB5500_VIB_PULSE_20ms,
+ AB5500_VIB_PULSE_75ms,
+ AB5500_VIB_PULSE_130ms,
+ AB5500_VIB_PULSE_170ms,
+};
+
+/**
+ * struct ab5500_vibra_platform_data
+ * @voltage: Vibra output voltage
+ * @res_freq: Linear vibra resonance freq.
+ * @type: Vibra HW type
+ * @pulse: Vibra pulse duration in ms
+ * @eol_voltage: EOL voltage in mV
+ */
+struct ab5500_vibra_platform_data {
+ u8 voltage;
+ u8 res_freq;
+ u8 magnitude;
+ enum ab5500_vibra_type type;
+ enum ab5500_vibra_pulse pulse;
+ int eol_voltage;
+};
+
+#endif /* __AB5500_VIBRA_H__ */
diff --git a/include/linux/mfd/abx500/ab5500-gpadc.h b/include/linux/mfd/abx500/ab5500-gpadc.h
index 67dc3cc9034..8bddafc7f79 100644
--- a/include/linux/mfd/abx500/ab5500-gpadc.h
+++ b/include/linux/mfd/abx500/ab5500-gpadc.h
@@ -34,6 +34,7 @@
/* VBAT with TX off only min trigger */
#define MAIN_BAT_V_TRIG_MIN 14
#define GPADC0_V 15
+#define VIBRA_KELVIN 16
/*
* Frequency of auto adc conversion