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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
|
Index: linux-2.6.24/arch/arm/mach-pxa/ezx-pcap.c
===================================================================
--- /dev/null
+++ linux-2.6.24/arch/arm/mach-pxa/ezx-pcap.c
@@ -0,0 +1,513 @@
+/* Driver for Motorola PCAP2 as present in EZX phones
+ *
+ * This is both a SPI device driver for PCAP itself, as well as
+ * an IRQ demultiplexer for handling PCAP generated events such as
+ * headphone jack sense by downstream drivers.
+ *
+ * Copyright (C) 2006 Harald Welte <laforge@openezx.org>
+ * Copyright (C) 2007 Daniel Ribeiro <wyrm@openezx.org>
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/interrupt.h>
+#include <linux/kernel_stat.h>
+#include <linux/proc_fs.h>
+
+#include <asm/hardware.h>
+#include <asm/mach-types.h>
+
+#include <asm/arch/ezx.h>
+#include <asm/arch/ssp.h>
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/ezx-pcap.h>
+#include <asm/arch/irqs.h>
+#include <asm/mach/irq.h>
+
+#if 0
+#define DEBUGP(x, args...) printk(x, ## args)
+#else
+#define DEBUGP(x, args...)
+#endif
+
+static DEFINE_SPINLOCK(ezx_ssp_lock);
+static struct ssp_dev ezx_ssp_dev;
+static struct ssp_state ezx_ssp_state;
+static struct pcap_platform_data *pcap_data;
+static int pcap_irq;
+
+static unsigned long ezx_ssp_pcap_putget(ulong data)
+{
+ unsigned long flag;
+ u32 ret = 0;
+
+ spin_lock_irqsave(&ezx_ssp_lock, flag);
+ if (pcap_data->cs >= 0) {
+ if (pcap_data->flags & PCAP_CS_AH)
+ GPSR(pcap_data->cs) = GPIO_bit(pcap_data->cs);
+ else
+ GPCR(pcap_data->cs) = GPIO_bit(pcap_data->cs);
+ }
+
+ ssp_write_word(&ezx_ssp_dev,data);
+ ssp_read_word(&ezx_ssp_dev, &ret);
+
+ if (pcap_data->cs >= 0) {
+ if(pcap_data->flags & PCAP_CS_AH)
+ GPCR(pcap_data->cs) = GPIO_bit(pcap_data->cs);
+ else
+ GPSR(pcap_data->cs) = GPIO_bit(pcap_data->cs);
+ }
+
+ spin_unlock_irqrestore(&ezx_ssp_lock, flag);
+
+ return ret;
+}
+
+int ezx_pcap_write(u_int8_t reg_num, u_int32_t value)
+{
+ value &= PCAP_REGISTER_VALUE_MASK;
+ value |= PCAP_REGISTER_WRITE_OP_BIT
+ | (reg_num<<PCAP_REGISTER_ADDRESS_SHIFT);
+
+ ezx_ssp_pcap_putget(value);
+
+ DEBUGP("pcap write r%x: 0x%08x\n", reg_num, value);
+ return 0;
+}
+EXPORT_SYMBOL_GPL(ezx_pcap_write);
+
+int ezx_pcap_read(u_int8_t reg_num, u_int32_t *value)
+{
+ u_int32_t frame = PCAP_REGISTER_READ_OP_BIT
+ | (reg_num<<PCAP_REGISTER_ADDRESS_SHIFT);
+
+ *value = ezx_ssp_pcap_putget(frame);
+
+ DEBUGP("pcap read r%x: 0x%08x\n", reg_num, *value);
+ return 0;
+}
+EXPORT_SYMBOL_GPL(ezx_pcap_read);
+
+int ezx_pcap_bit_set(u_int32_t sspPcapBit, u_int8_t to)
+{
+ int ret;
+ u_int32_t tmp;
+ u_int32_t bit = (sspPcapBit & PCAP_REGISTER_VALUE_MASK);
+ u_int8_t reg_num = (sspPcapBit & PCAP_REGISTER_ADDRESS_MASK)
+ >> PCAP_REGISTER_ADDRESS_SHIFT;
+
+ ret = ezx_pcap_read(reg_num, &tmp);
+ if (ret < 0)
+ return ret;
+
+ if (to == 0)
+ tmp &= ~bit;
+ else
+ tmp |= bit;
+
+ return ezx_pcap_write(reg_num, tmp);
+}
+EXPORT_SYMBOL_GPL(ezx_pcap_bit_set);
+
+int ezx_pcap_read_bit(u_int32_t bit)
+{
+ int ret;
+ u_int32_t tmp;
+ u_int8_t reg_num = (bit & PCAP_REGISTER_ADDRESS_MASK)
+ >> PCAP_REGISTER_ADDRESS_SHIFT;
+
+ ret = ezx_pcap_read(reg_num, &tmp);
+ if (ret < 0)
+ return ret;
+
+ return tmp & (bit & PCAP_REGISTER_VALUE_MASK);
+}
+EXPORT_SYMBOL_GPL(ezx_pcap_read_bit);
+
+/* /proc/pcap support */
+#ifdef CONFIG_PROC_FS
+
+static struct proc_dir_entry *proc_pcap;
+
+char *pcap_registers[] = {
+ "ISR\t", "MSR\t", "PSTAT\t", "INT_SEL\t", "SWCTRL\t", "VREG1\t",
+ "VREG2\t", "VREG\t", "BATT_DAC", "ADC1\t", "ADC2\t", "AUD_CODEC",
+ "RX_AUD_AMPS", "ST_DAC\t", "RTC_TOD\t", "RTC_TODA", "RTC_DAY\t",
+ "RTC_DAYA", "MTRTMR\t", "PWRCTRL\t", "BUSCTRL\t", "PERIPH\t",
+ "AUXVREG_MASK", "VENDOR_REV", "LOWPWR_CTRL", "PERIPH_MASK",
+ "TX_AUD_AMPS", "GP\t",
+ NULL, NULL, NULL, NULL
+};
+
+static int pcap_read_proc(char *page, char **start, off_t off, int count,
+ int *eof, void *data_unused)
+{
+ int len = 0;
+ u_int8_t r;
+ u_int32_t v;
+ off_t begin = 0;
+
+ for(r = 0; r < 32; r++) {
+ if (pcap_registers[r] == NULL)
+ continue;
+ ezx_pcap_read(r, &v);
+ len += sprintf(page+len, "%s\t%08X\n", pcap_registers[r], v);
+ if(len + begin > off + count)
+ goto done;
+ if(len + begin < off) {
+ begin += len;
+ len = 0;
+ }
+ }
+ *eof = 1;
+done:
+ if (off >= len+begin)
+ return 0;
+ *start = page + (off-begin);
+ return ((count < begin+len-off) ? count : begin+len-off);
+}
+#endif
+
+void ezx_pcap_vibrator_level(u_int32_t value)
+{
+ u_int32_t tmp;
+
+ ezx_pcap_read(PCAP_REG_AUXVREG, &tmp);
+
+ tmp &= ~PCAP_AUXVREG_V_VIB_MASK;
+ tmp |= ((value << PCAP_AUXVREG_V_VIB_SHIFT) & PCAP_AUXVREG_V_VIB_MASK);
+
+ ezx_pcap_write(PCAP_REG_AUXVREG, tmp);
+}
+EXPORT_SYMBOL_GPL(ezx_pcap_vibrator_level);
+
+/* MMC/SD specific functions */
+
+void ezx_pcap_mmcsd_voltage(u_int32_t bits)
+{
+ unsigned int tmp;
+ ezx_pcap_read(PCAP_REG_AUXVREG, &tmp);
+ if (pcap_data->flags & PCAP_MCI_SD) {
+ tmp &= ~PCAP_AUXVREG_VAUX2_MASK;
+ tmp |= ((bits << PCAP_AUXVREG_VAUX2_SHIFT) &
+ PCAP_AUXVREG_VAUX2_MASK);
+ }
+ else if (pcap_data->flags & PCAP_MCI_TF) {
+ tmp &= ~PCAP_AUXVREG_VAUX3_MASK;
+ tmp |= ((bits << PCAP_AUXVREG_VAUX3_SHIFT) &
+ PCAP_AUXVREG_VAUX3_MASK);
+ }
+ ezx_pcap_write(PCAP_REG_AUXVREG, tmp);
+}
+EXPORT_SYMBOL_GPL(ezx_pcap_mmcsd_voltage);
+
+int ezx_pcap_mmcsd_power(int on)
+{
+ if (on > 0) on = 1;
+ else on = 0;
+
+ if (pcap_data->flags & PCAP_MCI_SD)
+ return ezx_pcap_bit_set(PCAP_BIT_AUXVREG_VAUX2_EN, on);
+ else if (pcap_data->flags & PCAP_MCI_TF)
+ return ezx_pcap_bit_set(PCAP_BIT_AUXVREG_VAUX3_EN, on);
+ else
+ return -ENODEV;
+}
+EXPORT_SYMBOL_GPL(ezx_pcap_mmcsd_power);
+
+/* IRQ Handling */
+
+/* Array indexed by BIT POSITION of PCAP register, returns IRQ number */
+static unsigned int pcap2irq[] = {
+ [0] = EZX_IRQ_ADCDONE,
+ [1] = EZX_IRQ_TS,
+ [2] = EZX_IRQ_1HZ, /* 1HZ */
+ [3] = EZX_IRQ_WH, /* WH */
+ [4] = EZX_IRQ_WL, /* WL */
+ [5] = EZX_IRQ_TODA, /* TODA */
+ [6] = EZX_IRQ_USB4V,
+ [7] = EZX_IRQ_ONOFF, /* ONOFF */
+ [8] = EZX_IRQ_ONOFF2, /* ONOFF2 */
+ [9] = EZX_IRQ_USB1V,
+ [10] = EZX_IRQ_MOBPORT, /* MOBPORT */
+ [11] = EZX_IRQ_MIC,
+ [12] = EZX_IRQ_HEADJACK,
+ [13] = EZX_IRQ_ST, /* ST */
+ [14] = EZX_IRQ_PC, /* PC */
+ [15] = EZX_IRQ_WARM, /* WARM */
+ [16] = EZX_IRQ_EOL, /* EOL */
+ [17] = EZX_IRQ_CLK, /* CLK */
+ [18] = EZX_IRQ_SYSRST, /* SYSRST */
+ [19] = 0,
+ [20] = EZX_IRQ_ADCDONE2,
+ [21] = EZX_IRQ_SOFTRESET, /* SOFTRESET */
+ [22] = EZX_IRQ_MNEXB, /* MNEXB */
+};
+
+/* Array indexed by IRQ NUMBER, returns PCAP absolute value */
+static unsigned int irq2pcap[] = {
+ [EZX_IRQ_MNEXB] = PCAP_IRQ_MNEXB,
+ [EZX_IRQ_SOFTRESET] = PCAP_IRQ_SOFTRESET,
+ [EZX_IRQ_SYSRST] = PCAP_IRQ_SYSRST,
+ [EZX_IRQ_CLK] = PCAP_IRQ_CLK,
+ [EZX_IRQ_EOL] = PCAP_IRQ_EOL,
+ [EZX_IRQ_WARM] = PCAP_IRQ_WARM,
+ [EZX_IRQ_PC] = PCAP_IRQ_PC,
+ [EZX_IRQ_ST] = PCAP_IRQ_ST,
+ [EZX_IRQ_MOBPORT] = PCAP_IRQ_MOBPORT,
+ [EZX_IRQ_ONOFF2] = PCAP_IRQ_ONOFF2,
+ [EZX_IRQ_ONOFF] = PCAP_IRQ_ONOFF,
+ [EZX_IRQ_TODA] = PCAP_IRQ_TODA,
+ [EZX_IRQ_WL] = PCAP_IRQ_WL,
+ [EZX_IRQ_WH] = PCAP_IRQ_WH,
+ [EZX_IRQ_1HZ] = PCAP_IRQ_1HZ,
+ [EZX_IRQ_USB4V] = PCAP_IRQ_USB4V,
+ [EZX_IRQ_USB1V] = PCAP_IRQ_USB1V,
+ [EZX_IRQ_HEADJACK] = PCAP_IRQ_A1,
+ [EZX_IRQ_MIC] = PCAP_IRQ_MB2,
+ [EZX_IRQ_TS] = PCAP_IRQ_TS,
+ [EZX_IRQ_ADCDONE] = PCAP_IRQ_ADCDONE,
+ [EZX_IRQ_ADCDONE2] = PCAP_IRQ_ADCDONE2,
+};
+
+static void pcap_ack_irq(unsigned int irq)
+{
+ DEBUGP("pcap_ack_irq: %u\n", irq);
+ ezx_pcap_write(PCAP_REG_ISR, irq2pcap[irq]);
+}
+
+static void pcap_mask_irq(unsigned int irq)
+{
+ u_int32_t reg;
+ unsigned long flag;
+
+ spin_lock_irqsave(&ezx_ssp_lock, flag);
+ DEBUGP("pcap_mask_irq: %u\n", irq);
+ ezx_pcap_read(PCAP_REG_MSR, ®);
+ reg |= irq2pcap[irq];
+ ezx_pcap_write(PCAP_REG_MSR, reg);
+ spin_unlock_irqrestore(&ezx_ssp_lock, flag);
+}
+
+static void pcap_unmask_irq(unsigned int irq)
+{
+ u_int32_t tmp;
+ unsigned long flag;
+
+ spin_lock_irqsave(&ezx_ssp_lock, flag);
+ DEBUGP("pcap_unmask_irq: %u\n", irq);
+ ezx_pcap_read(PCAP_REG_MSR, &tmp);
+ tmp &= ~irq2pcap[irq];
+ ezx_pcap_write(PCAP_REG_MSR, tmp);
+ spin_unlock_irqrestore(&ezx_ssp_lock, flag);
+}
+
+static struct irq_chip pcap_chip = {
+ .ack = pcap_ack_irq,
+ .mask = pcap_mask_irq,
+ .unmask = pcap_unmask_irq,
+};
+
+/* handler for interrupt received from PCAP via GPIO */
+static void pcap_irq_demux_handler(unsigned int irq, struct irq_desc *desc)
+{
+ const unsigned int cpu = smp_processor_id();
+ int i;
+ u_int32_t isr, msr;
+
+ spin_lock(&desc->lock);
+ desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
+ if (unlikely(desc->status & (IRQ_INPROGRESS | IRQ_DISABLED))) {
+ desc->status |= (IRQ_PENDING | IRQ_MASKED);
+ desc->chip->mask(irq);
+ desc->chip->ack(irq);
+ goto out_unlock;
+ }
+ kstat_cpu(cpu).irqs[irq]++;
+ desc->chip->ack(irq);
+ desc->status |= IRQ_INPROGRESS;
+ do {
+ if (unlikely((desc->status &
+ (IRQ_PENDING | IRQ_MASKED | IRQ_DISABLED)) ==
+ (IRQ_PENDING | IRQ_MASKED))) {
+ desc->chip->unmask(irq);
+ desc->status &= ~IRQ_MASKED;
+ }
+ desc->status &= ~IRQ_PENDING;
+
+ ezx_pcap_read(PCAP_REG_ISR, &isr);
+ ezx_pcap_read(PCAP_REG_MSR, &msr);
+ for (i = ARRAY_SIZE(pcap2irq)-1; i >= 0; i--) {
+ unsigned int pirq = pcap2irq[i];
+ struct irq_desc *subdesc;
+ if (pirq == 0 || !(isr & irq2pcap[pirq]))
+ continue;
+ subdesc = irq_desc + pirq;
+ if (msr & irq2pcap[pirq])
+ continue;
+ DEBUGP("found irq %u\n", pirq);
+ spin_unlock(&desc->lock);
+ desc_handle_irq(pirq, subdesc);
+ spin_lock(&desc->lock);
+ }
+
+ } while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING);
+
+ desc->status &= ~IRQ_INPROGRESS;
+out_unlock:
+ spin_unlock(&desc->lock);
+}
+
+static int ezx_pcap_remove(struct platform_device *pdev)
+{
+ int irq;
+ DEBUGP("exz_pcap_remove entered\n");
+
+ set_irq_chained_handler(pcap_irq, NULL);
+
+ for (irq = EZX_IRQ(0); irq <= EZX_IRQ(21); irq++) {
+ set_irq_chip(irq, NULL);
+ set_irq_handler(irq, NULL);
+ set_irq_flags(irq, 0);
+ }
+
+ ssp_exit(&ezx_ssp_dev);
+
+ return 0;
+}
+
+static int __init ezx_pcap_probe(struct platform_device *pdev)
+{
+ unsigned int ret, irq;
+ DEBUGP("ezx_pcap_probe entered\n");
+
+ pcap_data = pdev->dev.platform_data;
+
+ /* configure ssp port */
+ pxa_gpio_mode(29|GPIO_ALT_FN_3_OUT);
+ pxa_gpio_mode(GPIO24_SFRM_MD);
+ pxa_gpio_mode(GPIO25_STXD_MD);
+ pxa_gpio_mode(GPIO26_SRXD_MD);
+
+ if (pcap_data->cs >= 0) {
+ if (pcap_data->flags & PCAP_CS_AH)
+ pxa_gpio_mode(pcap_data->cs | GPIO_OUT);
+ else
+ pxa_gpio_mode(pcap_data->cs | GPIO_OUT
+ | GPIO_DFLT_HIGH);
+ }
+ pcap_irq = platform_get_irq(pdev, 0);
+ if(pcap_irq < 0) {
+ printk(KERN_ERR "Unable to get IRQ for pcap!\n");
+ return pcap_irq;
+ }
+
+ ret = ssp_init(&ezx_ssp_dev, pcap_data->port, 0);
+ if (ret) {
+ printk(KERN_ERR "Unable to register SSP handler!\n");
+ return ret;
+ }
+
+ ssp_disable(&ezx_ssp_dev);
+ ssp_config(&ezx_ssp_dev,
+ (SSCR0_Motorola | SSCR0_DataSize(16) | SSCR0_EDSS),
+ (SSCR1_TxTresh(1) | SSCR1_RxTresh(1)),
+ 0, SSCR0_SerClkDiv(pcap_data->clk));
+ ssp_enable(&ezx_ssp_dev);
+
+ /* mask/ack all PCAP interrupts */
+ ezx_pcap_write(PCAP_REG_MSR, PCAP_MASK_ALL_INTERRUPT);
+ ezx_pcap_write(PCAP_REG_ISR, PCAP_CLEAR_INTERRUPT_REGISTER);
+
+ if (pcap_data->init)
+ pcap_data->init();
+
+ /* set up interrupt demultiplexing code for PCAP2 irqs */
+ set_irq_type(pcap_irq, IRQT_RISING);
+ for (irq = EZX_IRQ(0); irq <= EZX_IRQ(21); irq++) {
+ set_irq_chip(irq, &pcap_chip);
+ set_irq_handler(irq, handle_level_irq);
+ set_irq_flags(irq, IRQF_VALID);
+ }
+ set_irq_chained_handler(pcap_irq, pcap_irq_demux_handler);
+ set_irq_wake(pcap_irq, 1);
+
+ printk("ezx-pcap: ssp driver registered\n");
+ return ret;
+}
+
+static int ezx_pcap_suspend(struct platform_device *dev, pm_message_t state)
+{
+ DEBUGP("pcap suspend!\n");
+ ssp_flush(&ezx_ssp_dev);
+ ssp_save_state(&ezx_ssp_dev, &ezx_ssp_state);
+ if (pcap_data->cs >= 0)
+ pxa_gpio_mode(pcap_data->cs | GPIO_IN);
+ return 0;
+}
+
+static int ezx_pcap_resume(struct platform_device *dev)
+{
+ DEBUGP("pcap resume!\n");
+
+ if (pcap_data->cs >= 0) {
+ if (pcap_data->flags & PCAP_CS_AH) {
+ pxa_gpio_mode(pcap_data->cs | GPIO_OUT);
+ GPCR(pcap_data->cs) = GPIO_bit(pcap_data->cs);
+ }
+ else {
+ pxa_gpio_mode(pcap_data->cs | GPIO_OUT | GPIO_DFLT_HIGH);
+ GPSR(pcap_data->cs) = GPIO_bit(pcap_data->cs);
+ }
+ }
+ ssp_restore_state(&ezx_ssp_dev,&ezx_ssp_state);
+ ssp_enable(&ezx_ssp_dev);
+
+ ezx_pcap_write(PCAP_REG_ISR, PCAP_CLEAR_INTERRUPT_REGISTER);
+
+ return 0;
+}
+
+static struct platform_driver ezxpcap_driver = {
+ .probe = ezx_pcap_probe,
+ .remove = ezx_pcap_remove,
+ .suspend = ezx_pcap_suspend,
+ .resume = ezx_pcap_resume,
+ .driver = {
+ .name = "ezx-pcap",
+ .owner = THIS_MODULE,
+ },
+};
+
+static int __init ezx_pcap_init(void)
+{
+ DEBUGP("ezx_pcap_init entered\n");
+
+#ifdef CONFIG_PROC_FS
+ if((proc_pcap = create_proc_entry("pcap", 0, NULL)))
+ proc_pcap->read_proc = pcap_read_proc;
+#endif
+
+ return platform_driver_register(&ezxpcap_driver);
+}
+
+static void __exit ezx_pcap_exit(void)
+{
+#ifdef CONFIG_PROC_FS
+ if (proc_pcap)
+ remove_proc_entry("pcap", NULL);
+#endif
+
+ return platform_driver_unregister(&ezxpcap_driver);
+}
+
+module_init(ezx_pcap_init);
+module_exit(ezx_pcap_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Harald Welte");
+MODULE_DESCRIPTION("SPI Driver for Motorola PCAP2");
+
Index: linux-2.6.24/include/asm-arm/arch-pxa/ezx-pcap.h
===================================================================
--- /dev/null
+++ linux-2.6.24/include/asm-arm/arch-pxa/ezx-pcap.h
@@ -0,0 +1,248 @@
+/*
+ * Copyright 2007 Daniel Ribeiro <wyrm@openezx.org>
+ */
+
+#ifndef EZX_PCAP_H
+#define EZX_PCAP_H
+
+struct pcap_platform_data {
+ int port; /* SSP port */
+ int cs; /* CS gpio */
+ int clk;
+ int flags; /* driver flags */
+ int (*init)(void); /* board specific driver init */
+};
+
+/* driver configuration */
+#define PCAP_CS_AH (1 << 0) /* CS pin is active high */
+#define PCAP_MCI_SD (1 << 1) /* SD card slot */
+#define PCAP_MCI_TF (1 << 2) /* TF card slot */
+
+#define PCAP_REGISTER_WRITE_OP_BIT 0x80000000
+#define PCAP_REGISTER_READ_OP_BIT 0x00000000
+
+#define PCAP_REGISTER_VALUE_MASK 0x01ffffff
+#define PCAP_REGISTER_ADDRESS_MASK 0x7c000000
+#define PCAP_REGISTER_ADDRESS_SHIFT 26
+#define PCAP_REGISTER_NUMBER 32
+#define PCAP_CLEAR_INTERRUPT_REGISTER 0x01ffffff
+#define PCAP_MASK_ALL_INTERRUPT 0x01ffffff
+
+
+#define pbit(reg, bit) ((reg << PCAP_REGISTER_ADDRESS_SHIFT) | bit)
+
+/* registers acessible by both pcap ports */
+#define PCAP_REG_ISR 0x0 /* Interrupt Status */
+#define PCAP_REG_MSR 0x1 /* Interrupt Mask */
+#define PCAP_REG_PSTAT 0x2 /* Processor Status */
+#define PCAP_REG_VREG2 0x6 /* Regulator Bank 2 Control */
+#define PCAP_REG_AUXVREG 0x7 /* Auxiliary Regulator Control */
+#define PCAP_REG_BATT 0x8 /* Battery Control */
+#define PCAP_REG_ADC1 0x9 /* AD Control */
+#define PCAP_REG_ADC2 0xa /* AD Result */
+#define PCAP_REG_CODEC 0xb /* Audio Codec Control */
+#define PCAP_REG_RX_AMPS 0xc /* RX Audio Amplifiers Control */
+#define PCAP_REG_ST_DAC 0xd /* Stereo DAC Control */
+#define PCAP_REG_BUSCTRL 0x14 /* Connectivity Control */
+#define PCAP_REG_PERIPH 0x15 /* Peripheral Control */
+#define PCAP_REG_LOWPWR 0x18 /* Regulator Low Power Control */
+#define PCAP_REG_TX_AMPS 0x1a /* TX Audio Amplifiers Control */
+#define PCAP_REG_GP 0x1b /* General Purpose */
+
+/* registers acessible by pcap port 1 only (a1200, e2 & e6) */
+#define PCAP_REG_INT_SEL 0x3 /* Interrupt Select */
+#define PCAP_REG_SWCTRL 0x4 /* Switching Regulator Control */
+#define PCAP_REG_VREG1 0x5 /* Regulator Bank 1 Control */
+#define PCAP_REG_RTC_TOD 0xe /* RTC Time of Day */
+#define PCAP_REG_RTC_TODA 0xf /* RTC Time of Day Alarm */
+#define PCAP_REG_RTC_DAY 0x10 /* RTC Day */
+#define PCAP_REG_RTC_DAYA 0x11 /* RTC Day Alarm */
+#define PCAP_REG_MTRTMR 0x12 /* AD Monitor Timer */
+#define PCAP_REG_PWR 0x13 /* Power Control */
+#define PCAP_REG_AUXVREG_MASK 0x16 /* Auxiliary Regulator Mask */
+#define PCAP_REG_VENDOR_REV 0x17
+#define PCAP_REG_PERIPH_MASK 0x19 /* Peripheral Mask */
+
+/* interrupts - registers 0, 1, 2, 3 */
+#define PCAP_IRQ_ADCDONE (1 << 0) /* AD Conversion Done Port 1 */
+#define PCAP_IRQ_TS (1 << 1) /* Touch Screen */
+#define PCAP_IRQ_1HZ (1 << 2) /* 1HZ Timer */
+#define PCAP_IRQ_WH (1 << 3)
+#define PCAP_IRQ_WL (1 << 4)
+#define PCAP_IRQ_TODA (1 << 5)
+#define PCAP_IRQ_USB4V (1 << 6)
+#define PCAP_IRQ_ONOFF (1 << 7)
+#define PCAP_IRQ_ONOFF2 (1 << 8)
+#define PCAP_IRQ_USB1V (1 << 9)
+#define PCAP_IRQ_MOBPORT (1 << 10)
+#define PCAP_IRQ_MB2 (1 << 11) /* Mic */
+#define PCAP_IRQ_A1 (1 << 12) /* Audio jack */
+#define PCAP_IRQ_ST (1 << 13)
+#define PCAP_IRQ_PC (1 << 14)
+#define PCAP_IRQ_WARM (1 << 15)
+#define PCAP_IRQ_EOL (1 << 16)
+#define PCAP_IRQ_CLK (1 << 17)
+#define PCAP_IRQ_SYSRST (1 << 18)
+#define PCAP_IRQ_ADCDONE2 (1 << 20) /* AD Conversion Done Port 2 */
+#define PCAP_IRQ_SOFTRESET (1 << 21)
+#define PCAP_IRQ_MNEXB (1 << 22)
+
+#define PCAP_BIT_VREG2_V1_STBY pbit(PCAP_REG_VREG2, (1 << 0))
+#define PCAP_BIT_VREG2_V2_STBY pbit(PCAP_REG_VREG2, (1 << 1))
+#define PCAP_BIT_VREG2_V3_STBY pbit(PCAP_REG_VREG2, (1 << 2))
+#define PCAP_BIT_VREG2_V4_STBY pbit(PCAP_REG_VREG2, (1 << 3))
+#define PCAP_BIT_VREG2_V5_STBY pbit(PCAP_REG_VREG2, (1 << 4))
+#define PCAP_BIT_VREG2_V6_STBY pbit(PCAP_REG_VREG2, (1 << 5))
+#define PCAP_BIT_VREG2_V7_STBY pbit(PCAP_REG_VREG2, (1 << 6))
+#define PCAP_BIT_VREG2_V8_STBY pbit(PCAP_REG_VREG2, (1 << 7))
+#define PCAP_BIT_VREG2_V9_STBY pbit(PCAP_REG_VREG2, (1 << 8))
+#define PCAP_BIT_VREG2_V10_STBY pbit(PCAP_REG_VREG2, (1 << 9))
+#define PCAP_BIT_VREG2_V1_LOWPWR pbit(PCAP_REG_VREG2, (1 << 10))
+#define PCAP_BIT_VREG2_V2_LOWPWR pbit(PCAP_REG_VREG2, (1 << 11))
+#define PCAP_BIT_VREG2_V3_LOWPWR pbit(PCAP_REG_VREG2, (1 << 12))
+#define PCAP_BIT_VREG2_V4_LOWPWR pbit(PCAP_REG_VREG2, (1 << 13))
+#define PCAP_BIT_VREG2_V5_LOWPWR pbit(PCAP_REG_VREG2, (1 << 14))
+#define PCAP_BIT_VREG2_V6_LOWPWR pbit(PCAP_REG_VREG2, (1 << 15))
+#define PCAP_BIT_VREG2_V7_LOWPWR pbit(PCAP_REG_VREG2, (1 << 16))
+#define PCAP_BIT_VREG2_V8_LOWPWR pbit(PCAP_REG_VREG2, (1 << 17))
+#define PCAP_BIT_VREG2_V9_LOWPWR pbit(PCAP_REG_VREG2, (1 << 18))
+#define PCAP_BIT_VREG2_V10_LOWPWR pbit(PCAP_REG_VREG2, (1 << 19))
+
+#define PCAP_BIT_AUXVREG_VAUX1_EN pbit(PCAP_REG_AUXVREG, (1 << 1))
+#define PCAP_AUXVREG_VAUX1_MASK 0x0000000c
+#define PCAP_AUXVREG_VAUX1_SHIFT 2
+#define PCAP_BIT_AUXVREG_VAUX2_EN pbit(PCAP_REG_AUXVREG, (1 << 4))
+#define PCAP_AUXVREG_VAUX2_MASK 0x00000060
+#define PCAP_AUXVREG_VAUX2_SHIFT 5
+#define PCAP_BIT_AUXVREG_VAUX3_EN pbit(PCAP_REG_AUXVREG, (1 << 7))
+#define PCAP_AUXVREG_VAUX3_MASK 0x00000f00
+#define PCAP_AUXVREG_VAUX3_SHIFT 8
+#define PCAP_BIT_AUXVREG_VAUX4_EN pbit(PCAP_REG_AUXVREG, (1 << 12))
+#define PCAP_AUXVREG_VAUX4_MASK 0x00006000
+#define PCAP_AUXVREG_VAUX4_SHIFT 13
+#define PCAP_BIT_AUXVREG_VSIM2_EN pbit(PCAP_REG_AUXVREG, (1 << 16))
+#define PCAP_BIT_AUXVREG_VSIM_EN pbit(PCAP_REG_AUXVREG, (1 << 17))
+#define PCAP_BIT_AUXVREG_VSIM_0 pbit(PCAP_REG_AUXVREG, (1 << 18))
+#define PCAP_BIT_AUXVREG_V_VIB_EN pbit(PCAP_REG_AUXVREG, (1 << 19))
+#define PCAP_AUXVREG_V_VIB_MASK 0x00300000
+#define PCAP_AUXVREG_V_VIB_SHIFT 20
+#define PCAP_BIT_AUXVREG_VAUX1_STBY pbit(PCAP_REG_AUXVREG, (1 << 22))
+#define PCAP_BIT_AUXVREG_VAUX1_LOWPWR pbit(PCAP_REG_AUXVREG, (1 << 23))
+#define PCAP_BIT_AUXVREG_SW3_STBY pbit(PCAP_REG_AUXVREG, (1 << 24))
+
+#define PCAP_BATT_DAC_MASK 0x000000ff
+#define PCAP_BATT_DAC_SHIFT 0
+#define PCAP_BIT_BATT_B_FDBK pbit(PCAP_REG_BATT, (1 << 8))
+#define PCAP_BIT_BATT_EXT_ISENSE pbit(PCAP_REG_BATT, (1 << 9))
+#define PCAP_BATT_V_COIN_MASK 0x00003c00
+#define PCAP_BATT_V_COIN_SHIFT 10
+#define PCAP_BIT_BATT_I_COIN pbit(PCAP_REG_BATT, (1 << 14))
+#define PCAP_BIT_BATT_COIN_CH_EN pbit(PCAP_REG_BATT, (1 << 15))
+#define PCAP_BATT_EOL_SEL_MASK 0x000e0000
+#define PCAP_BATT_EOL_SEL_SHIFT 17
+#define PCAP_BIT_BATT_EOL_CMP_EN pbit(PCAP_REG_BATT, (1 << 20))
+#define PCAP_BIT_BATT_BATT_DET_EN pbit(PCAP_REG_BATT, (1 << 21))
+#define PCAP_BIT_BATT_THERMBIAS_CTRL pbit(PCAP_REG_BATT, (1 << 22))
+
+#define PCAP_BIT_ADC1_ADEN pbit(PCAP_REG_ADC1, (1 << 0))
+#define PCAP_BIT_ADC1_RAND pbit(PCAP_REG_ADC1, (1 << 1))
+#define PCAP_BIT_ADC1_AD_SEL1 pbit(PCAP_REG_ADC1, (1 << 2))
+#define PCAP_BIT_ADC1_AD_SEL2 pbit(PCAP_REG_ADC1, (1 << 3))
+#define PCAP_ADC1_ADA1_MASK 0x00000070
+#define PCAP_ADC1_ADA1_SHIFT 4
+#define PCAP_ADC1_ADA2_MASK 0x00000380
+#define PCAP_ADC1_ADA2_SHIFT 7
+#define PCAP_ADC1_ATO_MASK 0x00003c00
+#define PCAP_ADC1_ATO_SHIFT 10
+#define PCAP_BIT_ADC1_ATOX pbit(PCAP_REG_ADC1, (1 << 14))
+#define PCAP_BIT_ADC1_MTR1 pbit(PCAP_REG_ADC1, (1 << 15))
+#define PCAP_BIT_ADC1_MTR2 pbit(PCAP_REG_ADC1, (1 << 16))
+#define PCAP_ADC1_TS_M_MASK 0x000e0000
+#define PCAP_ADC1_TS_M_SHIFT 17
+#define PCAP_BIT_ADC1_TS_REF_LOWPWR pbit(PCAP_REG_ADC1, (1 << 20))
+#define PCAP_BIT_ADC1_TS_REFENB pbit(PCAP_REG_ADC1, (1 << 21))
+#define PCAP_BIT_ADC1_BATT_I_POLARITY pbit(PCAP_REG_ADC1, (1 << 22))
+#define PCAP_BIT_ADC1_BATT_I_ADC pbit(PCAP_REG_ADC1, (1 << 23))
+
+#define PCAP_ADC2_ADD1_MASK 0x000003ff
+#define PCAP_ADC2_ADD1_SHIFT 0
+#define PCAP_ADC2_ADD2_MASK 0x000ffc00
+#define PCAP_ADC2_ADD2_SHIFT 10
+#define PCAP_BIT_ADC2_ADINC1 pbit(PCAP_REG_ADC2, (1 << 20))
+#define PCAP_BIT_ADC2_ADINC2 pbit(PCAP_REG_ADC2, (1 << 21))
+#define PCAP_BIT_ADC2_ASC pbit(PCAP_REG_ADC2, (1 << 22))
+
+#define PCAP_BIT_BUSCTRL_FSENB 0x50000001
+#define PCAP_BIT_BUSCTRL_USB_SUSPEND 0x50000002
+#define PCAP_BIT_BUSCTRL_USB_PU 0x50000004
+#define PCAP_BIT_BUSCTRL_USB_PD 0x50000008
+#define PCAP_BIT_BUSCTRL_VUSB_EN 0x50000010
+#define PCAP_BIT_BUSCTRL_USB_PS 0x50000020
+#define PCAP_BIT_BUSCTRL_VUSB_MSTR_EN 0x50000040
+#define PCAP_BIT_BUSCTRL_VBUS_PD_ENB 0x50000080
+#define PCAP_BIT_BUSCTRL_CURRLIM 0x50000100
+#define PCAP_BIT_BUSCTRL_RS232ENB 0x50000200
+#define PCAP_BIT_BUSCTRL_RS232_DIR 0x50000400
+#define PCAP_BIT_BUSCTRL_SE0_CONN 0x50000800
+#define PCAP_BIT_BUSCTRL_USB_PDM 0x50001000
+#define PCAP_BIT_BUSCTRL_BUS_PRI_ADJ 0x51000000
+
+#define PCAP_BIT_PERIPH_BL_CTRL0 0x54000001
+#define PCAP_BIT_PERIPH_BL_CTRL1 0x54000002
+#define PCAP_BIT_PERIPH_BL_CTRL2 0x54000004
+#define PCAP_BIT_PERIPH_BL_CTRL3 0x54000008
+#define PCAP_BIT_PERIPH_BL_CTRL4 0x54000010
+#define PCAP_BIT_PERIPH_LEDR_EN 0x54000020
+#define PCAP_BIT_PERIPH_LEDG_EN 0x54000040
+#define PCAP_BIT_PERIPH_LEDR_CTRL0 0x54000080
+#define PCAP_BIT_PERIPH_LEDR_CTRL1 0x54000100
+#define PCAP_BIT_PERIPH_LEDR_CTRL2 0x54000200
+#define PCAP_BIT_PERIPH_LEDR_CTRL3 0x54000400
+#define PCAP_BIT_PERIPH_LEDG_CTRL0 0x54000800
+#define PCAP_BIT_PERIPH_LEDG_CTRL1 0x54001000
+#define PCAP_BIT_PERIPH_LEDG_CTRL2 0x54002000
+#define PCAP_BIT_PERIPH_LEDG_CTRL3 0x54004000
+#define PCAP_BIT_PERIPH_LEDR_I0 0x54008000
+#define PCAP_BIT_PERIPH_LEDR_I1 0x54010000
+#define PCAP_BIT_PERIPH_LEDG_I0 0x54020000
+#define PCAP_BIT_PERIPH_LEDG_I1 0x54040000
+#define PCAP_BIT_PERIPH_SKIP 0x54080000
+#define PCAP_BIT_PERIPH_BL2_CTRL0 0x54100000
+#define PCAP_BIT_PERIPH_BL2_CTRL1 0x54200000
+#define PCAP_BIT_PERIPH_BL2_CTRL2 0x54400000
+#define PCAP_BIT_PERIPH_BL2_CTRL3 0x54800000
+#define PCAP_BIT_PERIPH_BL2_CTRL4 0x55000000
+
+#define PCAP_BIT_LOWPWR_VAUX2_STBY 0x60000001
+#define PCAP_BIT_LOWPWR_VAUX2_LOWPWR 0x60000002
+#define PCAP_BIT_LOWPWR_VAUX3_STBY 0x60000004
+#define PCAP_BIT_LOWPWR_VAUX3_LOWPWR 0x60000008
+#define PCAP_BIT_LOWPWR_VAUX4_STBY 0x60000010
+#define PCAP_BIT_LOWPWR_VAUX4_LOWPWR 0x60000020
+#define PCAP_BIT_LOWPWR_VSIM_LOWPWR 0x60000040
+#define PCAP_BIT_LOWPWR_VSIM2_LOWPWR 0x60000080
+#define PCAP_BIT_LOWPWR_SW1_MODE00 0x60000100
+#define PCAP_BIT_LOWPWR_SW1_MODE01 0x60000200
+#define PCAP_BIT_LOWPWR_SW1_MODE10 0x60000400
+#define PCAP_BIT_LOWPWR_SW1_MODE11 0x60000800
+#define PCAP_BIT_LOWPWR_SW10_DVS 0x60001000
+#define PCAP_BIT_LOWPWR_SW11_DVS 0x60002000
+#define PCAP_BIT_LOWPWR_SW12_DVS 0x60004000
+#define PCAP_BIT_LOWPWR_SW13_DVS 0x60008000
+#define PCAP_BIT_LOWPWR_SW2_MODE00 0x60010000
+#define PCAP_BIT_LOWPWR_SW2_MODE01 0x60020000
+#define PCAP_BIT_LOWPWR_SW2_MODE10 0x60040000
+#define PCAP_BIT_LOWPWR_SW2_MODE11 0x60080000
+#define PCAP_BIT_LOWPWR_SW20_DVS 0x60100000
+#define PCAP_BIT_LOWPWR_SW21_DVS 0x60200000
+#define PCAP_BIT_LOWPWR_SW22_DVS 0x60400000
+#define PCAP_BIT_LOWPWR_SW23_DVS 0x60800000
+#define PCAP_BIT_LOWPWR_VC_STBY 0x61000000
+
+extern int ezx_pcap_write(u_int8_t, u_int32_t);
+extern int ezx_pcap_read(u_int8_t, u_int32_t *);
+extern int ezx_pcap_bit_set(u_int32_t, u_int8_t);
+extern int ezx_pcap_bit_get(u_int32_t);
+extern int ezx_pcap_read_bit(u_int32_t);
+extern void ezx_pcap_vibrator_level(u_int32_t);
+#endif
Index: linux-2.6.24/include/asm-arm/arch-pxa/irqs.h
===================================================================
--- linux-2.6.24.orig/include/asm-arm/arch-pxa/irqs.h
+++ linux-2.6.24/include/asm-arm/arch-pxa/irqs.h
@@ -89,7 +89,7 @@
* within sensible limits.
*/
#define IRQ_BOARD_START (PXA_GPIO_IRQ_BASE + PXA_GPIO_IRQ_NUM)
-#define IRQ_BOARD_END (IRQ_BOARD_START + 16)
+#define IRQ_BOARD_END (IRQ_BOARD_START + 22)
#define IRQ_SA1111_START (IRQ_BOARD_END)
#define IRQ_GPAIN0 (IRQ_BOARD_END + 0)
@@ -180,7 +180,8 @@
#define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1)
#elif defined(CONFIG_ARCH_LUBBOCK) || \
defined(CONFIG_MACH_LOGICPD_PXA270) || \
- defined(CONFIG_MACH_MAINSTONE)
+ defined(CONFIG_MACH_MAINSTONE) || \
+ defined(CONFIG_PXA_EZX)
#define NR_IRQS (IRQ_BOARD_END)
#else
#define NR_IRQS (IRQ_BOARD_START)
@@ -227,6 +228,31 @@
#define IRQ_LOCOMO_LT_BASE (IRQ_BOARD_START + 2)
#define IRQ_LOCOMO_SPI_BASE (IRQ_BOARD_START + 3)
+/* EZX Interrupts (CONFIG_EZX) */
+#define EZX_IRQ(x) (IRQ_BOARD_START + (x))
+#define EZX_IRQ_USB4V EZX_IRQ(0) /* EMU */
+#define EZX_IRQ_USB1V EZX_IRQ(1) /* EMU */
+#define EZX_IRQ_HEADJACK EZX_IRQ(2) /* Audio connector */
+#define EZX_IRQ_MIC EZX_IRQ(3) /* Audio connector */
+#define EZX_IRQ_ADCDONE EZX_IRQ(4)
+#define EZX_IRQ_TS EZX_IRQ(5) /* TS touch */
+#define EZX_IRQ_ADCDONE2 EZX_IRQ(6) /* TS x/y ADC ready */
+#define EZX_IRQ_WH EZX_IRQ(7)
+#define EZX_IRQ_WL EZX_IRQ(8)
+#define EZX_IRQ_ONOFF EZX_IRQ(9)
+#define EZX_IRQ_ONOFF2 EZX_IRQ(10)
+#define EZX_IRQ_MOBPORT EZX_IRQ(11)
+#define EZX_IRQ_TODA EZX_IRQ(12)
+#define EZX_IRQ_1HZ EZX_IRQ(13)
+#define EZX_IRQ_MNEXB EZX_IRQ(14)
+#define EZX_IRQ_ST EZX_IRQ(15)
+#define EZX_IRQ_PC EZX_IRQ(16)
+#define EZX_IRQ_SYSRST EZX_IRQ(17)
+#define EZX_IRQ_SOFTRESET EZX_IRQ(18)
+#define EZX_IRQ_EOL EZX_IRQ(19)
+#define EZX_IRQ_CLK EZX_IRQ(20)
+#define EZX_IRQ_WARM EZX_IRQ(21)
+
/* ITE8152 irqs */
/* add IT8152 IRQs beyond BOARD_END */
#ifdef CONFIG_PCI_HOST_ITE8152
Index: linux-2.6.24/arch/arm/mach-pxa/Kconfig
===================================================================
--- linux-2.6.24.orig/arch/arm/mach-pxa/Kconfig
+++ linux-2.6.24/arch/arm/mach-pxa/Kconfig
@@ -139,6 +139,9 @@
This enables control code for the BP (baseband processor) found in
Motorola's EZX smartphone platform.
+config EZX_PCAP
+ bool "PCAP Support"
+
endif
endmenu
Index: linux-2.6.24/arch/arm/mach-pxa/Makefile
===================================================================
--- linux-2.6.24.orig/arch/arm/mach-pxa/Makefile
+++ linux-2.6.24/arch/arm/mach-pxa/Makefile
@@ -37,6 +37,7 @@
obj-$(CONFIG_PXA_EZX_A1200) += ezx-a1200.o
obj-$(CONFIG_PXA_EZX_E6) += ezx-e6.o
obj-$(CONFIG_EZX_BP) += ezx-bp.o
+obj-$(CONFIG_EZX_PCAP) += ezx-pcap.o
# Support for blinky lights
led-y := leds.o
|