From 1b0ba8e42b159244675e0ce5625e930eff46c2ec Mon Sep 17 00:00:00 2001
From: Devin Kim <dojip.kim@lge.com>
Date: Mon, 29 Sep 2014 16:09:03 -0700
Subject: [PATCH] msm_pwm_vibrator: Define the platform data in header file

Other driver may use the msm_pwm_vibrator's platform data. So define
it in a header file.

Change-Id: Icdc52fbcb502037eae2c786f4eb8ccfe90f3598e
Signed-off-by: Devin Kim <dojip.kim@lge.com>
---
 drivers/misc/msm_pwm_vibrator.c               | 28 +-----------
 .../linux/platform_data/msm_pwm_vibrator.h    | 44 +++++++++++++++++++
 2 files changed, 45 insertions(+), 27 deletions(-)
 create mode 100644 include/linux/platform_data/msm_pwm_vibrator.h

diff --git a/drivers/misc/msm_pwm_vibrator.c b/drivers/misc/msm_pwm_vibrator.c
index 5b2a998f12ac..009c7fa31ffa 100644
--- a/drivers/misc/msm_pwm_vibrator.c
+++ b/drivers/misc/msm_pwm_vibrator.c
@@ -37,6 +37,7 @@
 #include <mach/msm_iomap.h>
 
 #include "../staging/android/timed_output.h"
+#include <linux/platform_data/msm_pwm_vibrator.h>
 
 #define ANDROID_VIBRATOR_USE_WORKQUEUE
 
@@ -74,33 +75,6 @@ enum {
 	VIB_STAT_MAX,
 };
 
-struct timed_vibrator_data {
-	struct timed_output_dev dev;
-	struct hrtimer timer;
-	spinlock_t spinlock;
-	struct mutex lock;
-	int max_timeout;
-	int min_timeout;
-	int ms_time;            /* vibrator duration */
-	int status;             /* vibe status */
-	int gain;               /* default max gain(amp) */
-	int pwm;                /* n-value */
-	int braking_gain;
-	int braking_ms;
-	int clk_flag;
-	int haptic_en_gpio;
-	int motor_pwm_gpio;
-	int motor_pwm_func;
-	int warmup_ms;
-	int driving_ms;
-	ktime_t last_time;     /* time stamp */
-	struct delayed_work work_vibrator_off;
-	struct delayed_work work_vibrator_on;
-	bool use_vdd_supply;
-	struct regulator *vdd_reg;
-	const char *clk_name;
-};
-
 static struct clk *cam_clk;
 
 static int vibrator_regulator_init(
diff --git a/include/linux/platform_data/msm_pwm_vibrator.h b/include/linux/platform_data/msm_pwm_vibrator.h
new file mode 100644
index 000000000000..bc1d2d72be92
--- /dev/null
+++ b/include/linux/platform_data/msm_pwm_vibrator.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) LGE, Inc.
+ *
+ * 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.
+ */
+
+#ifndef __MSM_PWM_VIBRATOR_H
+#define __MSM_PWM_VIBRATOR_H
+
+struct timed_vibrator_data {
+	struct timed_output_dev dev;
+	struct hrtimer timer;
+	spinlock_t spinlock;
+	struct mutex lock;
+	int max_timeout;
+	int min_timeout;
+	int ms_time;            /* vibrator duration */
+	int status;             /* vibe status */
+	int gain;               /* default max gain(amp) */
+	int pwm;                /* n-value */
+	int braking_gain;
+	int braking_ms;
+	int clk_flag;
+	int haptic_en_gpio;
+	int motor_pwm_gpio;
+	int motor_pwm_func;
+	int warmup_ms;
+	int driving_ms;
+	ktime_t last_time;     /* time stamp */
+	struct delayed_work work_vibrator_off;
+	struct delayed_work work_vibrator_on;
+	bool use_vdd_supply;
+	struct regulator *vdd_reg;
+	const char *clk_name;
+};
+
+#endif
-- 
GitLab