All pastes #255000 Raw Edit

Diff

public text v1 · immutable
#255000 ·published 2006-11-22 15:30 UTC
rendered paste body
Index: htcuniversal.c===================================================================RCS file: /cvs/linux/kernel26/arch/arm/mach-pxa/htcuniversal/htcuniversal.c,vretrieving revision 1.14diff -u -r1.14 htcuniversal.c--- htcuniversal.c	15 Nov 2006 19:48:33 -0000	1.14+++ htcuniversal.c	22 Nov 2006 15:30:31 -0000@@ -95,7 +95,27 @@ static struct platform_device htcuniversal_lcd       = { .name = "htcuniversal_lcd", }; static struct platform_device htcuniversal_kbd       = { .name = "htcuniversal_kbd", }; //static struct platform_device htcuniversal_buttons   = { .name = "htcuniversal_buttons", };-static struct platform_device htcuniversal_ts        = { .name = "htcuniversal_ts", };++struct tsc2046_mach_info {+	int port;	+	int clock;+	int pwrbit_X;+	int pwrbit_Y;+};++static struct tsc2406_mach_info htcuniversal_ts_platform_data = {+	.port     = 1;+	.clock    = CKEN23_SSP1;+	.pwrbit_X = 1;+	.pwrbit_Y = 1;+}++static struct platform_device htcuniversal_ts        = {+	.name = "htcuniversal_ts",+	.dev  = {+		.platform_data = &htcuniversal_ts_platform_data;+	},+}; //static struct platform_device htcuniversal_bt        = { .name = "htcuniversal_bt", }; //static struct platform_device htcuniversal_phone        = { .name = "htcuniversal_phone", }; static struct platform_device htcuniversal_power        = { .name = "htcuniversal_power", };Index: htcuniversal_ts2.c===================================================================RCS file: /cvs/linux/kernel26/arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c,vretrieving revision 1.6diff -u -r1.6 htcuniversal_ts2.c--- htcuniversal_ts2.c	22 Nov 2006 14:55:33 -0000	1.6+++ htcuniversal_ts2.c	22 Nov 2006 15:30:31 -0000@@ -63,6 +63,13 @@     STATE_SAMPLING          /* Actively sampling ADC */ }; +struct tsc2046_mach_info {+    int port;	+    int clock;+    int pwrbit_X;+    int pwrbit_Y;+};+ struct touchscreen_data {     enum touchscreen_state state;     struct timer_list      timer;@@ -310,6 +317,7 @@ {     int retval;     struct touchscreen_data *ts;+    struct tsc2406_mach_info *mach = dev->dev.platform_data;      printk("htcuniversal: ts_probe\n"); @@ -349,13 +357,12 @@     platform_set_drvdata(dev, ts);      ts->port=-1;-/*--------------------------------*/-    /* HTC Universal */-    ts->port=1;-    ts->clock=CKEN23_SSP1;-    ts->pwrbit_X=1;-    ts->pwrbit_Y=1;-/*--------------------------------*/+    if (mach) {+        ts->port = mach->port;+        ts->clock = mach->clock;+        ts->pwrbit_X = mach->pwrbit_X;+        ts->pwrbit_Y = mach->pwrbit_Y;+    }      if (ts->port == -1)     {