summaryrefslogtreecommitdiff
path: root/packages/linux/linux-openmoko/gta-vibro-pwm-suspend.patch
blob: a98f5c8ca504d6f0249efd66c5cc55f4fc474d99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Index: linux-2.6.22/drivers/leds/leds-gta01.c
===================================================================
--- linux-2.6.22.orig/drivers/leds/leds-gta01.c	2007-11-09 16:27:03.000000000 +0000
+++ linux-2.6.22/drivers/leds/leds-gta01.c	2007-11-09 16:27:13.000000000 +0000
@@ -33,6 +33,8 @@
 	struct s3c2410_pwm pwm;
 };
 
+static int gta01vib_init_hw(struct gta01_vib_priv *vp);
+
 static inline struct gta01_vib_priv *pdev_to_vpriv(struct platform_device *dev)
 {
 	return platform_get_drvdata(dev);
@@ -80,7 +82,13 @@
 
 static int gta01vib_resume(struct platform_device *dev)
 {
+	struct gta01_vib_priv *vp = pdev_to_vpriv(dev);
+
 	led_classdev_resume(&gta01_vib_led);
+
+	if (vp->has_pwm)
+		gta01vib_init_hw(vp);
+
 	return 0;
 }
 #endif