# 0001-ARM-mach-pxa-basic-c550-support-for-v3.12.patch -rw-r--r-- 90.2 KiB View raw
                                                                                
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
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
From 47b7826906cc2bb9cb1ea92aab6e3f5e4699476c Mon Sep 17 00:00:00 2001
From: David Heidelberg <david@ixit.cz>
Date: Thu, 14 Nov 2013 17:47:23 +0100
Subject: [PATCH] ARM: mach-pxa: basic c550 support for v3.12

ARM: mach-pxa: loox550: extend pin init, add PWM backlight regulation
ARM: mach-pxa: loox: remove lcd driver (not used) and remove backlight driver deprecated by backlight-pwm
ARM: mach-pxa: Add bluetooth power control.
ARM: mach-pxa: loox: improve soc driver, get rid of warning
ARM: mach-pxa: loox: asoc: Allow setting internal Speaker mode to on/off
ARM: mach-pxa: loox: proper audio output, input not implemented
ARM: mach-pxa: loox: use recommended values for PWM
ARM: mach-pxa: loox: asoc: allow change cradle jack power

Co-Author: Jakub Cejl

Signed-off-by: David Heidelberg <david@ixit.cz>
---
 arch/arm/Kconfig                              |   1 -
 arch/arm/mach-pxa/Kconfig                     |   8 +
 arch/arm/mach-pxa/Makefile                    |   1 +
 arch/arm/mach-pxa/Makefile.boot               |   5 +
 arch/arm/mach-pxa/include/mach/gpio.h         |   4 +
 arch/arm/mach-pxa/include/mach/loox550-gpio.h |  90 ++++
 arch/arm/mach-pxa/include/mach/loox550.h      |  30 ++
 arch/arm/mach-pxa/include/mach/loox5xx_leds.h |  27 ++
 arch/arm/mach-pxa/include/mach/map.h          |  36 ++
 arch/arm/mach-pxa/include/mach/pxa-pm_ll.h    |   6 +
 arch/arm/mach-pxa/include/mach/pxa2xx-regs.h  |  13 +
 arch/arm/mach-pxa/loox550/Kconfig             |  55 +++
 arch/arm/mach-pxa/loox550/Makefile            |   7 +
 arch/arm/mach-pxa/loox550/loox550-cpld.h      | 163 +++++++
 arch/arm/mach-pxa/loox550/loox550.c           | 443 ++++++++++++++++++
 arch/arm/mach-pxa/loox550/loox550_battery.c   | 190 ++++++++
 arch/arm/mach-pxa/loox550/loox550_cpld.c      | 427 +++++++++++++++++
 arch/arm/mach-pxa/loox550/loox550_flash.c     |  54 +++
 arch/arm/mach-pxa/loox550/loox550_flash_old.c |  87 ++++
 arch/arm/mach-pxa/loox550/loox550_pm.c        | 322 +++++++++++++
 arch/arm/mach-pxa/loox550/loox550_rfkill.c    | 153 ++++++
 arch/arm/mach-pxa/loox550/loox5xx_leds.c      | 379 +++++++++++++++
 arch/arm/mach-pxa/loox550/looxn560_pm.c       | 106 +++++
 arch/arm/tools/mach-types                     |   1 +
 sound/soc/pxa/Kconfig                         |  12 +
 sound/soc/pxa/Makefile                        |   2 +
 sound/soc/pxa/loox7xx.c                       | 300 ++++++++++++
 sound/soc/pxa/loox7xx.h                       |  52 ++
 28 files changed, 2973 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/mach-pxa/include/mach/loox550-gpio.h
 create mode 100644 arch/arm/mach-pxa/include/mach/loox550.h
 create mode 100644 arch/arm/mach-pxa/include/mach/loox5xx_leds.h
 create mode 100644 arch/arm/mach-pxa/include/mach/map.h
 create mode 100644 arch/arm/mach-pxa/include/mach/pxa-pm_ll.h
 create mode 100644 arch/arm/mach-pxa/loox550/Kconfig
 create mode 100644 arch/arm/mach-pxa/loox550/Makefile
 create mode 100644 arch/arm/mach-pxa/loox550/loox550-cpld.h
 create mode 100644 arch/arm/mach-pxa/loox550/loox550.c
 create mode 100644 arch/arm/mach-pxa/loox550/loox550_battery.c
 create mode 100644 arch/arm/mach-pxa/loox550/loox550_cpld.c
 create mode 100644 arch/arm/mach-pxa/loox550/loox550_flash.c
 create mode 100644 arch/arm/mach-pxa/loox550/loox550_flash_old.c
 create mode 100644 arch/arm/mach-pxa/loox550/loox550_pm.c
 create mode 100644 arch/arm/mach-pxa/loox550/loox550_rfkill.c
 create mode 100644 arch/arm/mach-pxa/loox550/loox5xx_leds.c
 create mode 100644 arch/arm/mach-pxa/loox550/looxn560_pm.c
 create mode 100644 sound/soc/pxa/loox7xx.c
 create mode 100644 sound/soc/pxa/loox7xx.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1ad6fb6c094d..0b7df8288c3c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -615,7 +615,6 @@ config ARCH_PXA
 	select ARCH_MTD_XIP
 	select ARCH_REQUIRE_GPIOLIB
 	select ARM_CPU_SUSPEND if PM
-	select AUTO_ZRELADDR
 	select CLKDEV_LOOKUP
 	select CLKSRC_MMIO
 	select GENERIC_CLOCKEVENTS
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index a8427115ee07..dd132b6f31f1 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -344,6 +344,13 @@ config MACH_MP900C
 	bool "Nec Mobilepro 900/c"
 	select PXA25x
 
+config MACH_LOOX550
+        bool "Fujitsu-Siemens PocketLoox 550 PDA device"
+        select PXA27x
+        select HTC_EGPIO
+	select IWMMXT
+        select PXA_SUSPEND_SAVE_EXTRA_REGS
+
 config ARCH_PXA_PALM
 	bool "PXA based Palm PDAs"
 	select HAVE_PWM
@@ -700,4 +707,5 @@ config PXA_HAVE_ISA_IRQS
 config PXA310_ULPI
 	bool
 
+source "arch/arm/mach-pxa/loox550/Kconfig"
 endif
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index 648867a8caa8..2c0b8dedd80e 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -34,6 +34,7 @@ obj-$(CONFIG_MACH_SAAR)		+= saar.o
 # 3rd Party Dev Platforms
 obj-$(CONFIG_ARCH_PXA_IDP)	+= idp.o
 obj-$(CONFIG_ARCH_VIPER)	+= viper.o
+obj-$(CONFIG_MACH_LOOX550)      += loox550/
 obj-$(CONFIG_MACH_ARCOM_ZEUS)	+= zeus.o
 obj-$(CONFIG_MACH_BALLOON3)	+= balloon3.o
 obj-$(CONFIG_MACH_CSB726)	+= csb726.o
diff --git a/arch/arm/mach-pxa/Makefile.boot b/arch/arm/mach-pxa/Makefile.boot
index 2c1ae92f2106..96ac9d6b40be 100644
--- a/arch/arm/mach-pxa/Makefile.boot
+++ b/arch/arm/mach-pxa/Makefile.boot
@@ -1,2 +1,7 @@
    zreladdr-y	+= 0xa0008000
 
+ifeq ($(CONFIG_MACH_LOOX550),y)
+   zreladdr-y   :=      $(CONFIG_PHYS_OFFSET)+0x8000
+endif
+
+
diff --git a/arch/arm/mach-pxa/include/mach/gpio.h b/arch/arm/mach-pxa/include/mach/gpio.h
index 0248e433bc98..87452319539c 100644
--- a/arch/arm/mach-pxa/include/mach/gpio.h
+++ b/arch/arm/mach-pxa/include/mach/gpio.h
@@ -24,6 +24,10 @@
 #ifndef __ASM_ARCH_PXA_GPIO_H
 #define __ASM_ARCH_PXA_GPIO_H
 
+#ifdef CONFIG_MACH_LOOX550
+#define ARCH_NR_GPIOS   (256 + 96)
+#endif
+
 #include <asm-generic/gpio.h>
 
 #include <mach/irqs.h>
diff --git a/arch/arm/mach-pxa/include/mach/loox550-gpio.h b/arch/arm/mach-pxa/include/mach/loox550-gpio.h
new file mode 100644
index 000000000000..bcd386de54e1
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/loox550-gpio.h
@@ -0,0 +1,90 @@
+/*
+ * mach/loox550-gpio.h
+ * 
+ * Loox 550 GPIO list
+ * Reused the hx4700-gpio.h file as a template.
+ *
+ * History:
+ */
+
+
+#ifndef _LOOX550_GPIO_H_
+#define _LOOX550_GPIO_H_
+
+// CPLD
+#define LOOX5XX_EGPIO_BASE                      PXA_NR_BUILTIN_GPIO
+
+#define LOOX5XX_EGPIO_LED_1                     (LOOX5XX_EGPIO_BASE + 1*16 + 0)
+#define LOOX5XX_EGPIO_LED_2                     (LOOX5XX_EGPIO_BASE + 1*16 + 1)
+#define LOOX5XX_EGPIO_LED_3                     (LOOX5XX_EGPIO_BASE + 1*16 + 2)
+
+#define LOOX5XX_EGPIO_LED_4                     (LOOX5XX_EGPIO_BASE + 2*16 + 0)
+#define LOOX5XX_EGPIO_LED_5                     (LOOX5XX_EGPIO_BASE + 2*16 + 1)
+#define LOOX5XX_EGPIO_LED_6                     (LOOX5XX_EGPIO_BASE + 2*16 + 2)
+
+#define LOOX5XX_EGPIO_LED_7                     (LOOX5XX_EGPIO_BASE + 3*16 + 0)
+
+/*
+ * GPIOs operating as Application-Specific GPIO
+ */
+
+#define GPIO_NR_LOOXC550_KEYPWR                 0
+
+#define GPIO_NR_LOOXC550_BATTCOVER              4
+
+#define GPIO_NR_LOOXC550_AC_IN_N                9
+
+#define GPIO_NR_LOOXC550_BATTERY_FULL_N         11 //virstud
+
+#define GPIO_NR_LOOXC550_USB_DETECT_N           13
+
+#define GPIO_NR_LOOXC550_SD_RO                  15
+
+#define GPIO_NR_LOOXC550_BT_RESET1              22
+
+#define GPIO_NR_LOOXC550_GPS_PWRON              53
+
+#define GPIO_NR_LOOXC550_CRADLE_POWER           56
+#define GPIO_NR_LOOXC550_USB_PULLUP             57
+
+#define GPIO_NR_LOOXC550_SD_DETECT              78
+#define GPIO_NR_LOOXC550_CRADLE_JACK            79
+
+#define GPIO_NR_LOOXC550_GPS_IR_MUX             81
+
+#define GPIO_NR_LOOXC550_CPU_BT_RESET_N         22
+
+#define GPIO_NR_LOOXC550_HP_JACK                93
+#define GPIO_NR_LOOXC550_TOUCHPANEL_IRQ_N       94
+
+#define GPIO_NR_LOOXC550_KP_MKIN3               97
+#define GPIO_NR_LOOXC550_KP_MKIN4               98
+#define GPIO_NR_LOOXC550_CHARGE_EN_N            99
+
+
+#define GPIO_NR_LOOXC550_KP_MKIN0               100
+#define GPIO_NR_LOOXC550_KP_MKIN1               101
+#define GPIO_NR_LOOXC550_KP_MKIN2               102
+#define GPIO_NR_LOOXC550_KP_MKOUT0              103
+#define GPIO_NR_LOOXC550_KP_MKOUT1              104
+
+#define GPIO_NR_LOOXC550_USB_CHARGE_RATE_N      107
+#define GPIO_NR_LOOXC550_SD_POWER               108
+
+#define GPIO_NR_LOOXC550_KP_MKIN0_MD            (GPIO_NR_LOOXC550_KP_MKIN0 | GPIO_ALT_FN_1_IN)
+#define GPIO_NR_LOOXC550_KP_MKIN1_MD            (GPIO_NR_LOOXC550_KP_MKIN1 | GPIO_ALT_FN_1_IN)
+#define GPIO_NR_LOOXC550_KP_MKIN2_MD            (GPIO_NR_LOOXC550_KP_MKIN2 | GPIO_ALT_FN_1_IN)
+#define GPIO_NR_LOOXC550_KP_MKIN3_MD            (GPIO_NR_LOOXC550_KP_MKIN3 | GPIO_ALT_FN_3_IN)
+#define GPIO_NR_LOOXC550_KP_MKIN4_MD            (GPIO_NR_LOOXC550_KP_MKIN4 | GPIO_ALT_FN_3_IN)
+
+#define GPIO_NR_LOOXC550_KP_MKOUT0_MD           (GPIO_NR_LOOXC550_KP_MKOUT0 | GPIO_ALT_FN_2_OUT)
+#define GPIO_NR_LOOXC550_KP_MKOUT1_MD           (GPIO_NR_LOOXC550_KP_MKOUT1 | GPIO_ALT_FN_2_OUT)
+
+
+#define LOOX5XX_EGPIO_BT_POWER1                 (LOOX5XX_EGPIO_BASE + 0 * 16 + 0)
+#define LOOX5XX_EGPIO_BT_POWER2                 (LOOX5XX_EGPIO_BASE + 3 * 16 + 2)
+#define LOOX5XX_EGPIO_SPK_POWER                 (LOOX5XX_EGPIO_BASE + 4 * 16 + 0)
+#define LOOX5XX_EGPIO_BT_RESET2                 (LOOX5XX_EGPIO_BASE + 4 * 16 + 1)
+
+
+#endif /* _LOOX550_GPIO_H */
diff --git a/arch/arm/mach-pxa/include/mach/loox550.h b/arch/arm/mach-pxa/include/mach/loox550.h
new file mode 100644
index 000000000000..1e99b6b3649d
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/loox550.h
@@ -0,0 +1,30 @@
+/*
+ * include/asm/arm/arch-pxa/loox720.h
+ */
+
+#ifndef _LOOX720_H_
+#define _LOOX720_H_
+
+/* Loox 720 general header
+ */
+
+struct loox720_bt_funcs {
+        void (*configure) ( int state );
+};
+
+#endif /* _LOOX720_H_ */
+
+/*
+ * Loox 720 Leds
+ */
+
+#define LOOX720_LED_LEFT 0
+#define LOOX720_LED_RIGHT 1
+#define LOOX720_LED_COLOR_A 1
+#define LOOX720_LED_COLOR_B 2
+#define LOOX720_LED_COLOR_C 3
+#define LOOX720_LED_BLINK 4
+#define LOOX720_LED_BLINK_ALT 12
+
+extern void loox720_enable_led(int led, int mode);
+extern void loox720_disable_led(int led, int mode);
diff --git a/arch/arm/mach-pxa/include/mach/loox5xx_leds.h b/arch/arm/mach-pxa/include/mach/loox5xx_leds.h
new file mode 100644
index 000000000000..99e07bbd9548
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/loox5xx_leds.h
@@ -0,0 +1,27 @@
+/*
+ *
+ * Leds support for Fujitsu-Siemens Loox 5xx PDAs
+ *
+ * Evgeny Chukreev <akshaal@akshaal.info>   http://www.akshaal.info
+ *
+ */
+
+#ifndef _LOOX5XX_LEDS_H_
+#define _LOOX5XX_LEDS_H_
+
+#define LOOX5XX_LED_KEYBOARD        1
+#define LOOX5XX_LED_LEFT_GREEN      2
+#define LOOX5XX_LED_LEFT_BLUE       4
+#define LOOX5XX_LED_LEFT_ORANGE     8
+#define LOOX5XX_LED_RIGHT_GREEN     16
+
+// These functions are for leds having two states
+extern void loox5xx_enable_leds (u32 leds);
+extern void loox5xx_disable_leds (u32 leds);
+
+// Power led has three states
+extern void loox5xx_enable_power_led (void);
+extern void loox5xx_disable_power_led (void);
+extern void loox5xx_blink_power_led (void);
+
+#endif /* _LOOX720_H_ */
diff --git a/arch/arm/mach-pxa/include/mach/map.h b/arch/arm/mach-pxa/include/mach/map.h
new file mode 100644
index 000000000000..7ef3c8390180
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/map.h
@@ -0,0 +1,36 @@
+/*
+ *  linux/include/asm-arm/map.h
+ *
+ *  Copyright (C) 1999-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  Page table mapping constructs and function prototypes
+ */
+#include <asm/io.h>
+
+struct map_desc {
+	unsigned long virtual;
+	unsigned long pfn;
+	unsigned long length;
+	unsigned int type;
+};
+
+/* types 0-3 are defined in asm/io.h */
+#define MT_CACHECLEAN		4
+#define MT_MINICLEAN		5
+#define MT_LOW_VECTORS		6
+#define MT_HIGH_VECTORS		7
+#define MT_MEMORY		8
+#define MT_ROM			9
+
+#define MT_NONSHARED_DEVICE	MT_DEVICE_NONSHARED
+#define MT_IXP2000_DEVICE	MT_DEVICE_IXP2000
+
+#ifdef CONFIG_MMU
+extern void iotable_init(struct map_desc *, int);
+#else
+#define iotable_init(map,num)	do { } while (0)
+#endif
diff --git a/arch/arm/mach-pxa/include/mach/pxa-pm_ll.h b/arch/arm/mach-pxa/include/mach/pxa-pm_ll.h
new file mode 100644
index 000000000000..638ed2f61fe5
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/pxa-pm_ll.h
@@ -0,0 +1,6 @@
+struct pxa_ll_pm_ops {
+	void (*suspend)(unsigned long);
+	void (*resume)(void);
+};
+
+extern struct pxa_ll_pm_ops *pxa_pm_set_ll_ops(struct pxa_ll_pm_ops *new_ops);
diff --git a/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h b/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h
index ee6ced1cea7f..028d055ab6b0 100644
--- a/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h
+++ b/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h
@@ -74,6 +74,19 @@
 #define PCMD30	__REG(0x40F00080 + 30 * 4)
 #define PCMD31	__REG(0x40F00080 + 31 * 4)
 
+/*
+ * Pulse Width Modulator
+ */
+
+#define PWM_CTRL0      __REG(0x40B00000)  /* PWM 0 Control Register */
+#define PWM_PWDUTY0    __REG(0x40B00004)  /* PWM 0 Duty Cycle Register */
+#define PWM_PERVAL0    __REG(0x40B00008)  /* PWM 0 Period Control Register */
+
+#define PWM_CTRL1      __REG(0x40C00000)  /* PWM 1Control Register */
+#define PWM_PWDUTY1    __REG(0x40C00004)  /* PWM 1 Duty Cycle Register */
+#define PWM_PERVAL1    __REG(0x40C00008)  /* PWM 1 Period Control Register */
+
+
 #define PCMD_MBC	(1<<12)
 #define PCMD_DCE	(1<<11)
 #define PCMD_LC	(1<<10)
diff --git a/arch/arm/mach-pxa/loox550/Kconfig b/arch/arm/mach-pxa/loox550/Kconfig
new file mode 100644
index 000000000000..2a1c65f3e146
--- /dev/null
+++ b/arch/arm/mach-pxa/loox550/Kconfig
@@ -0,0 +1,55 @@
+menu "Fujitsu-Siemens PocketLoox 550 configuration"
+    depends on MACH_LOOX550
+
+config LOOX550_LCD
+    bool "FSC Loox 550 LCD"
+    select FB
+    select FB_BACKLIGHT
+    select BACKLIGHT_PMW
+    select LCD_CLASS_DEVICE
+    depends on MACH_LOOX550
+    help
+        This driver provides support for changing power and brightness
+        on Loox 550 LCD display.
+
+config LOOX550_BATTERY
+    bool "FSC Loox 550 Battery support (say Y!)"
+    depends on MACH_LOOX550
+    default y
+    select POWER_SUPPLY
+    select BATTERY_LOOX550
+    help
+        FSC Loox 550/560 power/battery support. You really should say Y here,
+        to get charging on empty battery, AC/USB charging capabilities etc
+
+
+config LOOX550_BUTTONS
+    bool "FSC Loox 550 Buttons"
+    depends on MACH_LOOX550
+    select INPUT_KEYBOARD
+    select KEYBOARD_GPIO
+    select KEYBOARD_PXA27x
+    help
+        FSC Loox 550 buttons support. Including power button.
+
+config LOOX550_RFKILL
+    tristate "FSC Loox 550 Bluetooth (BRF6150) power control"
+    depends on MACH_LOOX550 && RFKILL
+    select BT
+    select BT_HCIUART
+    select BT_HCIUART_LL
+    help
+        This driver provides support for control power
+        of Loox 550 Bluetooth (BRF6150)
+
+config LOOX550_FLASH
+    tristate "FSC Loox 550 Flash ROM"
+    select MTD
+    select MTD_CFI
+    select MTD_PARTITIONS
+    select MTD_CFI_INTELEXT
+    select MTD_PXA2XX
+    depends on MACH_LOOX550
+    help
+        FSC Loox 550 internal flash ROM support.
+endmenu
diff --git a/arch/arm/mach-pxa/loox550/Makefile b/arch/arm/mach-pxa/loox550/Makefile
new file mode 100644
index 000000000000..97555c5c3e85
--- /dev/null
+++ b/arch/arm/mach-pxa/loox550/Makefile
@@ -0,0 +1,7 @@
+#
+# FS Loox Makefile for the linux kernel.
+#
+obj-$(CONFIG_MACH_LOOX550)	+= loox550.o loox5xx_leds.o
+obj-$(CONFIG_LOOX550_BATTERY)	+= loox550_battery.o
+obj-$(CONFIG_LOOX550_FLASH)	+= loox550_flash.o
+obj-$(CONFIG_LOOX550_RFKILL)	+= loox550_rfkill.o
diff --git a/arch/arm/mach-pxa/loox550/loox550-cpld.h b/arch/arm/mach-pxa/loox550/loox550-cpld.h
new file mode 100644
index 000000000000..3185f3d1150f
--- /dev/null
+++ b/arch/arm/mach-pxa/loox550/loox550-cpld.h
@@ -0,0 +1,163 @@
+/*
+ * mach/loox550-cpld.h
+ *
+ * Authors: 	Piotr Czechowicz 	<p.czechowicz@admitech.pl>
+ *		Tomasz Figa		<tomasz.figa@gmail.com>
+ *		Jan Rinze Peterzon	<janrinze@gmail.com>
+ *
+ * Loox 720 CPLD structure:
+ * 16 registers (16-bit) located at physical address (0x10000000):
+ * reg 1 	- interrupt status
+ * reg 2 	- interrupt mask
+ * reg 3 	- input pins
+ * regs 4-7 	- unknown
+ * regs 8-16 	- output pins
+ *
+ */
+
+#ifndef _LOOX550_CPLD_H_
+#define _LOOX550_CPLD_H_
+
+#include <mach/pxa-regs.h>
+#include <linux/irq.h>
+#define __IRQT_RISEDGE	IRQ_TYPE_EDGE_RISING
+#define IRQT_RISING	(__IRQT_RISEDGE)
+
+
+#define LOOX720_CPLD_PHYS	PXA_CS4_PHYS
+#define LOOX720_CPLD_SIZE	32
+
+/*
+    adapted these methods for 16 bit..
+    Hopefully noone else uses these..
+    a carefull grep showed noone yet does..
+    the names are too generic..
+*/
+
+#define BIT_POS(x)	(x>>4)
+#define BIT_SHIFT(x)	(x&15)
+#define BIT_MSK(x)	(u32)(1<<BIT_SHIFT(x))
+
+/*
+Bitmasks of LED modes in LEDs' cache.
+*/
+
+#define LOOX720_LED1_BLUE		1
+#define LOOX720_LED1_GREEN		2
+#define LOOX720_LED1_BLINK		4
+#define LOOX720_LED1_BLINK2		8
+
+#define LOOX720_LED2_GREEN		16
+#define LOOX720_LED2_RED		32
+#define LOOX720_LED2_ORANGE		48
+#define LOOX720_LED2_BLINK	 	64
+#define LOOX720_LED2_BLINK2	  	128
+
+/*
+Bitmasks of bits in reg #8:
+*/
+
+#define LOOX720_CPLD_LED1_BIT_A 256
+#define LOOX720_CPLD_LED1_BIT_B 512
+#define LOOX720_CPLD_LED1_BIT_C 1024
+#define LOOX720_CPLD_LED1_BIT_D 2048
+#define LOOX720_CPLD_LED1_BLINK 32768
+
+#define LOOX720_CPLD_LED2_BIT_A 16
+#define LOOX720_CPLD_LED2_BIT_B 32
+#define LOOX720_CPLD_LED2_BIT_C 64
+#define LOOX720_CPLD_LED2_BIT_D 128
+#define LOOX720_CPLD_LED2_BLINK 16384
+
+/*
+CPLD output bits numbers
+*/
+
+#define LOOX720_CPLD_LED_BIT_1			132
+#define LOOX720_CPLD_LED_BIT_2			133
+#define LOOX720_CPLD_LED_BIT_3			134
+#define LOOX720_CPLD_LED_BIT_4			135
+#define LOOX720_CPLD_LED_BIT_5			136
+#define LOOX720_CPLD_LED_BIT_6			137
+#define LOOX720_CPLD_LED_BIT_7			138
+#define LOOX720_CPLD_LED_BIT_8			139
+#define LOOX720_CPLD_CF_3V3_BIT			140
+#define LOOX720_CPLD_LED_BIT_9			142
+#define LOOX720_CPLD_LED_BIT_10			143
+#define LOOX720_CPLD_BATTERY_BIT		144
+#define LOOX720_CPLD_USB_PULLUP_BIT		145
+#define LOOX720_CPLD_LCD_CONSOLE_BIT		146 // Blanking: 4rd Unblanking: 2nd
+#define LOOX720_CPLD_LCD_BIT			147 // Blanking: 3rd Unblanking: 3rd
+/*
+
+These looks like a piece of garbage, because wince doesn't use them...
+
+#define LOOX720_CPLD_LED2_EN_1			148
+#define LOOX720_CPLD_LED2_EN_2			149
+#define LOOX720_CPLD_LED2_EN_3			150
+#define LOOX720_CPLD_LED1_EN_1			152
+#define LOOX720_CPLD_LED1_EN_2			153
+*/
+#define LOOX720_CPLD_LCD_COLOR_BIT		160 // Blanking: 2nd Unblanking: 4th
+#define LOOX720_CPLD_LCD_BIT2			161 // Blanking: 5th Unblanking: 1st
+#define LOOX720_CPLD_CF_RESET			162
+#define LOOX720_CPLD_SERIAL_BIT			163
+#define LOOX720_CPLD_VAUX_CTL1			176
+#define LOOX720_CPLD_VAUX_CTL2			177
+#define LOOX720_CPLD_VAUX_CTL3			178	
+#define LOOX720_CPLD_VAUX_CTL4			179
+#define LOOX720_CPLD_BLUETOOTH_POWER		192
+#define LOOX720_CPLD_CF_RESET_N			193 // False...
+#define LOOX720_CPLD_CAMERA_FLASH_BIT		195
+#define LOOX720_CPLD_SOUND_BIT			208
+#define LOOX720_CPLD_SND_AMPLIFIER_BIT		209
+#define LOOX720_CPLD_BLUETOOTH_RADIO    	210
+#define LOOX720_CPLD_WIFI_POWER			211
+#define LOOX720_CPLD_CAMERA_POWER		224
+#define LOOX720_CPLD_SD_BIT			225
+#define LOOX720_CPLD_CAMERA_RESET		226
+#define LOOX720_CPLD_CF_5V_BIT			241
+#define LOOX720_CPLD_BACKLIGHT_BIT		242 // Blanking: 1st Unblanking: 5th
+
+/*
+CPLD input bitmasks definitions
+
+These should be bit positions!!
+
+*/
+
+#define LOOX720_CPLD_CF_DETECT_N		0x04
+#define LOOX720_CPLD_CF_READY			0x10
+#define LOOX720_CPLD_WIFI_READY			0x20
+#define LOOX720_CPLD_WIFI_ENABLED		0x40
+
+extern int loox720_cpld_irq_base;
+
+/*
+CPLD interrupt multiplexer definitions
+*/
+
+#define LOOX720_IRQ_BASE IRQ_BOARD_START
+
+#define LOOX720_CPLD_IRQ(irq) \
+    (LOOX720_CPLD_IRQ_ ## irq) + LOOX720_IRQ_BASE
+
+#define LOOX720_CPLD_IRQ_COUNT 16
+
+#define LOOX720_CPLD_IRQ_WIFI 		5
+#define LOOX720_CPLD_IRQ_CF 		4
+#define LOOX720_CPLD_IRQ_CARD_DETECT 	2
+
+/*
+Function definitions
+*/
+
+extern void loox720_set_leds(int mode);
+extern void loox720_egpio_set_bit(int bit, int val);
+extern u32  loox720_cpld_reg_read(int regno);
+extern void loox720_cpld_reg_write(int regno, u32 value);
+extern void loox720_cpld_write_masked(int regno,u32 mask ,u32 value);
+extern u32 loox720_cpld_reg_test(int regno,u32 mask);
+extern void loox720_cpld_resume(void);
+
+#endif
diff --git a/arch/arm/mach-pxa/loox550/loox550.c b/arch/arm/mach-pxa/loox550/loox550.c
new file mode 100644
index 000000000000..2fcd91dbebc4
--- /dev/null
+++ b/arch/arm/mach-pxa/loox550/loox550.c
@@ -0,0 +1,443 @@
+/*
+ *  linux/arch/arm/mach-pxa/looxc550/looxc550.c
+ *
+ *  Hardware definitions for FSC LOOX C550
+ *
+ *  Copyright (c) 2007 Yurii Zolot'ko
+ *  Copyright (c) 2013 David Heidelberg
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/notifier.h>
+#include <linux/lcd.h>
+#include <linux/pwm_backlight.h>
+#include <linux/backlight.h>
+#include <linux/err.h>
+#include <linux/platform_device.h>
+#include <linux/input.h>
+#include <linux/spi/pxa2xx_spi.h>
+#include <linux/fb.h>
+#include <linux/gpio_keys.h>
+#include <linux/mfd/htc-egpio.h>
+#include <linux/pda_power.h>
+#include <linux/i2c.h>
+#include <linux/i2c/pxa-i2c.h>
+#include <linux/spi/ads7846.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/pxa2xx_spi.h>
+#include <linux/platform_data/mmc-pxamci.h>
+#include <linux/platform_data/video-pxafb.h>
+#include <linux/platform_data/keypad-pxa27x.h>
+#include <linux/platform_data/usb-ohci-pxa27x.h>
+
+#include <mach/pxa27x.h>
+#include <mach/udc.h>
+#include <mach/hardware.h>
+#include <mach/gpio.h>
+#include <mach/loox550-gpio.h>
+#include <mach/mfp-pxa27x.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/irq.h>
+#include <asm/irq.h>
+#include <asm/sizes.h>
+#include <asm/types.h>
+#include <asm/setup.h>
+#include <asm/serial.h>
+
+#include "../generic.h"
+
+static unsigned long looxc550_pin_config[] = {
+	/* Crystal and Clock Signals */
+	GPIO10_HZ_CLK,
+
+	/* PWM 0/1 */
+	GPIO16_PWM0_OUT,
+	GPIO17_PWM1_OUT,
+
+	/* Miscellaneous I/O and DMA Signals */
+	GPIO18_RDY,
+
+	/* BTUART */
+	GPIO44_BTUART_CTS,
+	GPIO42_BTUART_RXD,
+	GPIO45_BTUART_RTS,
+	GPIO43_BTUART_TXD,
+
+	/* SSP */
+	GPIO23_SSP1_SCLK,
+	GPIO24_SSP1_SFRM,
+	GPIO25_SSP1_TXD,
+	GPIO26_SSP1_RXD,
+	/* I2S */
+	GPIO28_I2S_BITCLK_OUT,
+	GPIO29_I2S_SDATA_IN,
+	GPIO30_I2S_SDATA_OUT,
+	GPIO31_I2S_SYNC,
+	GPIO113_I2S_SYSCLK,
+
+	/* MMC */
+	GPIO32_MMC_CLK,
+	GPIO92_MMC_DAT_0,
+	GPIO109_MMC_DAT_1,
+	GPIO110_MMC_DAT_2,
+	GPIO111_MMC_DAT_3,
+	GPIO112_MMC_CMD,
+
+	/* loox specific */
+	GPIO9_GPIO,
+	GPIO11_GPIO,
+	GPIO12_GPIO,
+	GPIO13_GPIO,
+	GPIO14_GPIO,
+	GPIO15_GPIO,
+	GPIO19_GPIO,
+	GPIO20_GPIO,
+	GPIO21_GPIO,
+	GPIO22_GPIO,
+	GPIO27_GPIO,
+
+};
+
+static struct pxafb_mode_info loox550_lcd_mode_info = {
+	.pixclock		= 57692,
+	.bpp			= 16,
+	.xres			= 480,
+	.yres			= 640,
+	.hsync_len		= 8,
+	.left_margin	= 8,
+	.right_margin	= 124,
+	.vsync_len		= 2,
+	.upper_margin	= 3,
+	.lower_margin	= 25,
+	.sync			= 1,
+};
+
+static struct pxafb_mach_info loox550_fb_info =
+{
+	.modes			= &loox550_lcd_mode_info,
+	.num_modes		= 1,
+	.lcd_conn		= LCD_COLOR_TFT_16BPP,
+};
+
+static struct platform_pwm_backlight_data loox_backlight_data = {
+	.pwm_id         = 0,
+	.max_brightness = 162,
+	.dft_brightness = 50,
+	.pwm_period_ns  = 24916,
+};
+
+static struct platform_device loox_backlight_device = {
+	.name   = "pwm-backlight",
+	.id     = 0,
+	.dev    = {
+		.platform_data  = &loox_backlight_data,
+	},
+};
+
+/********** KEYS ********************/
+
+static const unsigned int loox550_matrix_keys[] = {
+	KEY(0, 0, KEY_RECORD),
+	KEY(1, 0, KEY_CALENDAR),
+	KEY(2, 0, KEY_MAIL),
+	KEY(3, 0, KEY_ADDRESSBOOK),
+	KEY(4, 0, KEY_HOMEPAGE),
+	KEY(0, 1, KEY_UP),
+	KEY(1, 1, KEY_DOWN),
+	KEY(2, 1, KEY_RIGHT),
+	KEY(3, 1, KEY_LEFT),
+	KEY(4, 1, KEY_ENTER), 
+};
+
+static struct matrix_keymap_data loox550_matrix_keymap_data = {
+       .keymap                 = loox550_matrix_keys,
+       .keymap_size            = ARRAY_SIZE(loox550_matrix_keys),
+};
+
+
+struct pxa27x_keypad_platform_data loox550_keypad_info = {
+	.matrix_key_rows        = 5,
+	.matrix_key_cols        = 2,
+	.matrix_keymap_data	= &loox550_matrix_keymap_data,
+};
+
+static struct gpio_keys_button loox550_button_table[] = {
+	{KEY_POWER,      GPIO_NR_LOOXC550_KEYPWR,      0, "Power button"},
+};
+
+static struct gpio_keys_platform_data gpio_keys_data = {
+	.buttons  = loox550_button_table,
+	.nbuttons = ARRAY_SIZE(loox550_button_table),
+};
+
+static struct platform_device gpio_keys = {
+        .name = "gpio-keys",
+        .dev  = {
+                .platform_data = &gpio_keys_data,
+        },
+        .id   = -1,
+};
+
+/**************  MMC/SD ***********/
+
+static struct pxamci_platform_data magician_mci_info = {
+	.ocr_mask =			MMC_VDD_32_33|MMC_VDD_33_34,
+	.gpio_card_detect =	GPIO_NR_LOOXC550_SD_DETECT,
+	.gpio_card_ro =		GPIO_NR_LOOXC550_SD_RO,
+	.gpio_power =		GPIO_NR_LOOXC550_SD_POWER,
+};
+
+
+/************** BATTERY + PM **************/
+
+static struct platform_device loox720_battery = {
+	.name = "loox720-battery",
+	.id   = -1,
+};
+
+static struct platform_device loox550_pm = {
+	.name = "loox550-pm",
+	.id   = -1,
+};
+
+
+/*************     UDC     *******************/
+
+static struct pxa2xx_udc_mach_info looxc550_udc_info __initdata = {
+        .gpio_pullup    = GPIO_NR_LOOXC550_USB_PULLUP
+};
+
+/*************     OHCI     ******************/
+
+static struct pxaohci_platform_data n560_ohci_platform_data = {
+	.port_mode      = PMM_PERPORT_MODE,
+	.flags          = ENABLE_PORT_ALL | POWER_SENSE_LOW | NO_OC_PROTECTION,
+//        .power_budget   = 500,  // ???
+};
+
+/*
+ * Flash
+ */
+
+extern struct platform_device loox7xx_flash;
+
+/***************** EGPIOs ********************/
+
+static struct resource egpio_resources[] = {
+	[0] = {
+		.start = PXA_CS4_PHYS,
+		.end   = PXA_CS4_PHYS + 0x2*8,
+		.flags = IORESOURCE_MEM,
+	},
+};
+
+static struct htc_egpio_chip egpio_chips[] = {
+	[0] = {
+		.reg_start = 0,
+		.gpio_base = LOOX5XX_EGPIO_BASE + 16*0,
+		.num_gpios = 16,
+		.direction = HTC_EGPIO_OUTPUT,
+		.initial_values = 0x4,
+	},
+	[1] = {
+		.reg_start = 1,
+		.gpio_base = LOOX5XX_EGPIO_BASE + 16*1,
+		.num_gpios = 16,
+		.direction = HTC_EGPIO_OUTPUT,
+		.initial_values = 0x0,
+	},
+	[2] = {
+		.reg_start = 2,
+		.gpio_base = LOOX5XX_EGPIO_BASE + 16*2,
+		.num_gpios = 16,
+		.direction = HTC_EGPIO_OUTPUT,
+		.initial_values = 0x0,
+	},
+	[3] = {
+		.reg_start = 3,
+		.gpio_base = LOOX5XX_EGPIO_BASE + 16*3,
+		.num_gpios = 16,
+		.direction = HTC_EGPIO_OUTPUT,
+		.initial_values = 0x8,
+	},
+	[4] = {
+		.reg_start = 4,
+		.gpio_base = LOOX5XX_EGPIO_BASE + 16*4,
+		.num_gpios = 16,
+		.direction = HTC_EGPIO_OUTPUT,
+		.initial_values = 0x8,
+	},
+	[5] = {
+		.reg_start = 5,
+		.gpio_base = LOOX5XX_EGPIO_BASE + 16*5,
+		.num_gpios = 16,
+		.direction = HTC_EGPIO_OUTPUT,
+		.initial_values = 0x8,
+	},
+	[6] = {
+		.reg_start = 6,
+		.gpio_base = LOOX5XX_EGPIO_BASE + 16*6,
+		.num_gpios = 16,
+		.direction = HTC_EGPIO_OUTPUT,
+		.initial_values = 0x1,
+	},
+};
+
+static struct htc_egpio_platform_data egpio_info = {
+	.reg_width    = 16,
+	.bus_width    = 16,
+	.chip         = egpio_chips,
+	.num_chips    = ARRAY_SIZE(egpio_chips),
+};
+
+static struct platform_device loox5xx_egpio = {
+	.name = "htc-egpio",
+	.id   = -1,
+	.dev  = {
+		.platform_data = &egpio_info,
+	},
+	.resource      = egpio_resources,
+	.num_resources = ARRAY_SIZE(egpio_resources),
+};
+
+/*****************************************************************/
+/* LEDs */
+
+static struct gpio_led loox_led_pins[] = {
+	{
+		.name            = "loox:blue:keypad",
+		.gpio            = 240, // new DEFINE for EGPIO
+		.default_trigger = "heartbeat",
+	}
+};
+
+static struct gpio_led_platform_data loox_led_data = {
+	.num_leds = ARRAY_SIZE(loox_led_pins),
+	.leds     = loox_led_pins,
+};
+
+static struct platform_device loox_leds = {
+	.name = "leds-gpio",
+	.id   = -1,
+	.dev = {
+		.platform_data = &loox_led_data,
+	},
+};
+
+/* audio */
+static struct platform_device loox_audio_device = {
+       .name   = "loox-asoc",
+       .id     = -1,
+};
+
+/* i2c */
+static struct i2c_board_info loox5x0_i2c_devs[] = {
+	{
+		I2C_BOARD_INFO("wm8750", 0x1a),
+	},
+
+};
+
+/* SPI */
+static struct pxa2xx_spi_master pxa_ssp_master_info = {
+	.clock_enable = CKEN_SSP1,
+	.num_chipselect = 1,
+	.enable_dma = 0,
+};
+
+/* bt */
+static struct platform_device loox5x0_bt = {
+	.name = "loox550-rfk",
+};
+
+
+static struct platform_device pxa_ssp = {
+	.name           = "pxa2xx-spi",
+	.id             = 1,
+	.dev = {
+		.platform_data  = &pxa_ssp_master_info,
+	},
+};
+
+
+static struct ads7846_platform_data loox5x0_ads7846_info = {
+	.model				= 7845,
+	.pressure_max		= 4095,
+	.x_max				= 480,
+	.y_max				= 640,
+	.gpio_pendown		= GPIO_NR_LOOXC550_TOUCHPANEL_IRQ_N,
+};
+
+static struct pxa2xx_spi_chip loox5x0_ads7846_chip = {
+	.tx_threshold           = 8,
+	.rx_threshold           = 4,
+	.timeout                = 1000,
+	.enable_loopback        = 0,
+	.dma_burst_size         = 0,
+	.gpio_cs                = -1,
+};
+
+static struct spi_board_info loox_board_info[] __initdata = {
+	{
+		.modalias			= "ads7846",
+		.max_speed_hz		= 200000,
+		.bus_num			= 1,
+		.chip_select		= 0,
+		.platform_data		= &loox5x0_ads7846_info,
+		.controller_data	= &loox5x0_ads7846_chip,
+		.irq				= PXA_GPIO_TO_IRQ(GPIO_NR_LOOXC550_TOUCHPANEL_IRQ_N),
+		.mode				= SPI_MODE_0,
+	},
+};
+
+static struct platform_device *devices[] __initdata = {
+	&pxa_ssp,
+	&loox5xx_egpio,
+	&loox_leds,
+	&loox5x0_bt,
+	&loox720_battery,
+	&loox550_pm,
+	&loox7xx_flash,
+	&gpio_keys,
+	&loox_audio_device
+};
+
+
+static void __init looxc550_init(void)
+{
+	pxa2xx_mfp_config(looxc550_pin_config, ARRAY_SIZE(looxc550_pin_config));
+
+	pxa_set_fb_info(NULL, &loox550_fb_info);
+	platform_device_register(&loox_backlight_device);
+	pxa_set_mci_info(&magician_mci_info);
+	pxa_set_udc_info(&looxc550_udc_info);
+	pxa_set_ohci_info(&n560_ohci_platform_data);
+	pxa_set_keypad_info(&loox550_keypad_info);
+	
+	pxa_set_i2c_info(NULL);
+	pxa27x_set_i2c_power_info(NULL);
+	i2c_register_board_info(0, loox5x0_i2c_devs, ARRAY_SIZE(loox5x0_i2c_devs));
+
+	platform_add_devices(devices, ARRAY_SIZE(devices));
+
+	pxa_set_btuart_info(NULL);
+      
+	spi_register_board_info(loox_board_info, ARRAY_SIZE(loox_board_info));
+}
+
+MACHINE_START(LOOXN560, "FSC Loox 5xx")
+	.atag_offset	= 0x100,
+	.map_io			= pxa27x_map_io,
+	.init_irq		= pxa27x_init_irq,
+	.handle_irq		= pxa27x_handle_irq,
+	.nr_irqs		= PXA_NR_IRQS,
+	.init_time		= pxa_timer_init,
+	.init_machine		= looxc550_init,
+	.restart		= pxa_restart,
+MACHINE_END
diff --git a/arch/arm/mach-pxa/loox550/loox550_battery.c b/arch/arm/mach-pxa/loox550/loox550_battery.c
new file mode 100644
index 000000000000..bd76bf2998c7
--- /dev/null
+++ b/arch/arm/mach-pxa/loox550/loox550_battery.c
@@ -0,0 +1,190 @@
+/* Battery Charging support for FSC Loox 720
+ *
+ * Authors: Piotr Czechowicz, Tomasz Figa
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/version.h>
+#include <linux/interrupt.h>
+#include <linux/device.h>
+#include <linux/platform_device.h>
+#include <linux/pm.h>
+#include <linux/gpio.h>
+
+#include <asm/irq.h>
+#include <asm/io.h>
+
+#include <asm/mach/irq.h>
+
+#include <mach/loox550-gpio.h>
+#include <mach/loox5xx_leds.h>
+//include <mach/looxc550.h>
+//include <asm/arch/loox720-cpld.h>
+//include <asm/arch/loox720.h>
+//include <asm/arch/irqs.h>
+
+static unsigned int ac_irq = 0xffffffff;
+static unsigned int battery_irq = 0xffffffff;
+static unsigned int usb_irq = 0xffffffff;
+
+static void update_battery_charging(void)
+{
+	int usb_conn = (gpio_get_value(GPIO_NR_LOOXC550_USB_DETECT_N) == 0);  //yes
+	int ac_conn = (gpio_get_value(GPIO_NR_LOOXC550_AC_IN_N) == 0);  //yes
+
+	if (ac_conn || usb_conn) {
+		int battery_full = gpio_get_value(GPIO_NR_LOOXC550_BATTERY_FULL_N) == 0; //yes ???
+		printk(KERN_INFO "battery: ac: %d; usb: %d; battery_full: %d\n", ac_conn, usb_conn, battery_full);
+//		if (ac_conn)
+//			gpio_set_value(GPIO_NR_LOOX720_USB_CHARGE_N, 1);  //????????
+//		else
+//			gpio_set_value(GPIO_NR_LOOX720_USB_CHARGE_N, 0);  //????????
+		if (battery_full) {
+			gpio_set_value(GPIO_NR_LOOXC550_CHARGE_EN_N, 1);  //yes
+			loox5xx_enable_power_led ();
+		} else {
+			gpio_set_value(GPIO_NR_LOOXC550_CHARGE_EN_N, 0);  //yes
+			loox5xx_blink_power_led ();
+		}
+	} else {
+		printk(KERN_INFO "battery: external power is disconnected.\n");
+		loox5xx_disable_power_led ();
+		gpio_set_value(GPIO_NR_LOOXC550_CHARGE_EN_N, 1);
+	}
+}
+
+static void update_battery_chip(void)
+{
+	int connected = (gpio_get_value(GPIO_NR_LOOXC550_AC_IN_N) == 0) || (gpio_get_value(GPIO_NR_LOOXC550_USB_DETECT_N) == 0);  //yes
+	printk( KERN_INFO "battery: charging controller enabled=%d\n", connected );
+//	loox720_egpio_set_bit(LOOX720_CPLD_BATTERY_BIT, connected);		//?????
+}
+
+static irqreturn_t
+battery_isr(int irq, void *data)
+{
+	int full = gpio_get_value(GPIO_NR_LOOXC550_BATTERY_FULL_N) == 0;  //???
+	printk( KERN_INFO "battery_isr: battery_full=%d\n", full);
+
+	update_battery_charging();
+
+	return IRQ_HANDLED;
+}
+
+static irqreturn_t
+ac_isr(int irq, void *data)
+{
+	int connected;
+
+	if (irq != ac_irq)
+		return IRQ_NONE;
+
+	connected = gpio_get_value(GPIO_NR_LOOXC550_AC_IN_N) == 0;
+	printk( KERN_INFO "ac_isr: connected=%d\n", connected );
+
+	update_battery_charging();
+	update_battery_chip();
+
+	return IRQ_HANDLED;
+}
+
+static irqreturn_t
+usb_isr(int irq, void *data)
+{
+	int connected;
+
+	if (irq != usb_irq)
+		return IRQ_NONE;
+
+	connected = gpio_get_value(GPIO_NR_LOOXC550_USB_DETECT_N) == 0;
+	printk( KERN_INFO "usb_isr: connected=%d\n", connected );
+
+	update_battery_charging();
+	update_battery_chip();
+
+	return IRQ_HANDLED;
+}
+
+static int
+loox720_battery_probe( struct platform_device *pdev )
+{
+	int battery_full, usb_connected, ac_connected;
+
+	printk( KERN_NOTICE "Loox 720 Core Hardware Driver\n" );
+
+	ac_irq = PXA_GPIO_TO_IRQ(GPIO_NR_LOOXC550_AC_IN_N);
+	battery_irq = PXA_GPIO_TO_IRQ(GPIO_NR_LOOXC550_BATTERY_FULL_N);  //?????????
+	usb_irq = PXA_GPIO_TO_IRQ(GPIO_NR_LOOXC550_USB_DETECT_N);
+
+	ac_connected = gpio_get_value(GPIO_NR_LOOXC550_AC_IN_N) == 0;
+	usb_connected = gpio_get_value(GPIO_NR_LOOXC550_USB_DETECT_N) == 0;
+	battery_full = gpio_get_value(GPIO_NR_LOOXC550_BATTERY_FULL_N) == 0;
+
+	printk( KERN_INFO "AC: connected=%d\n", ac_connected );
+	if (request_irq( ac_irq, &ac_isr, IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+	                 "Loox 720 AC Detect", NULL ) != 0) {
+		printk( KERN_ERR "Unable to configure AC detect interrupt.\n" );
+		return -ENODEV;
+	}
+
+	printk( KERN_INFO "USB: connected=%d\n", usb_connected );
+	if (request_irq( usb_irq, &usb_isr, IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, "Loox 720 USB Detect", NULL) != 0) {
+		printk( KERN_ERR "Unable to configure USB detect interrupt.\n" );
+		free_irq( ac_irq, NULL );
+		return -ENODEV;
+	}
+
+	if (request_irq( battery_irq, &battery_isr, IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, "Loox 720 Battery Full", NULL) != 0) {
+		printk( KERN_ERR "Unable to configure battery-full detect interrupt.\n" );
+		free_irq( ac_irq, NULL );
+		free_irq( usb_irq, NULL );
+		return -ENODEV;
+	}
+
+	update_battery_chip();
+	update_battery_charging();
+
+	return 0;
+}
+
+static int
+loox720_battery_remove( struct platform_device *dev )
+{
+	if (ac_irq != 0xffffffff)
+		free_irq( ac_irq, NULL );
+	if (battery_irq != 0xffffffff)
+		free_irq( battery_irq, NULL );
+	if (usb_irq != 0xffffffff)
+		free_irq( usb_irq, NULL );
+	return 0;
+}
+
+struct platform_driver loox720_battery_driver = {
+	.driver = {
+		.name     = "loox720-battery",
+	},
+	.probe    = loox720_battery_probe,
+	.remove   = loox720_battery_remove,
+};
+
+static int __init
+loox720_battery_init( void )
+{
+	return platform_driver_register( &loox720_battery_driver );
+}
+
+
+static void __exit
+loox720_battery_exit( void )
+{
+	platform_driver_unregister( &loox720_battery_driver );
+}
+
+module_init( loox720_battery_init );
+module_exit( loox720_battery_exit );
+
+MODULE_AUTHOR("Piotr Czechowicz, Tomasz Figa");
+MODULE_DESCRIPTION("Loox 720 Battery Charging Support");
+MODULE_LICENSE("GPL");
+
diff --git a/arch/arm/mach-pxa/loox550/loox550_cpld.c b/arch/arm/mach-pxa/loox550/loox550_cpld.c
new file mode 100644
index 000000000000..b8caeed35611
--- /dev/null
+++ b/arch/arm/mach-pxa/loox550/loox550_cpld.c
@@ -0,0 +1,427 @@
+#include <linux/module.h>
+#include <linux/version.h>
+#include <linux/irq.h>
+#include <linux/delay.h>
+#include <linux/gpio.h>
+
+#include <asm/mach-types.h>
+#include <linux/irq.h>
+#include <asm/io.h>
+#include <mach/irqs.h>
+#include <mach/loox550-gpio.h>
+#include "loox550-cpld.h"
+
+static u32 reg_cache[16]={
+    0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static volatile u16 *cpld_mem = 0;
+int loox550_cpld_irq_base = -1;
+EXPORT_SYMBOL(loox550_cpld_irq_base);
+
+
+struct loox550_irq_data
+{
+	volatile u32 irq_mask;
+	int irq_base;
+};
+
+struct loox550_irq_data * loox550_cpld_irq_data;
+
+struct cpld_bit
+{
+    int	bit;
+    int value;
+};
+
+static struct cpld_bit loox550_cpld_bits[] = 
+{
+    {
+	.bit   = LOOX550_CPLD_SERIAL_BIT,
+	.value = 1
+    },
+    {
+	.bit   = LOOX550_CPLD_LCD_CONSOLE_BIT,
+	.value = 1
+    },
+    {
+	.bit   = LOOX550_CPLD_LCD_BIT,
+	.value = 1
+    },
+    {
+	.bit   = LOOX550_CPLD_LCD_COLOR_BIT,
+	.value = 1
+    },
+    {
+	.bit   = LOOX550_CPLD_LCD_BIT2,
+	.value = 1
+    },
+    {
+	.bit   = LOOX550_CPLD_BACKLIGHT_BIT,
+	.value = 1
+    },
+// NOTE: WinCE enables it only after plugging an USB cable or AC charger
+/*
+    {	
+	.bit   = LOOX550_CPLD_BATTERY_BIT,
+	.value = 1    
+    },
+*/
+// NOTE: WinCE doesn't use them... tom3q
+/*
+    {
+	.bit   = LOOX550_CPLD_LED1_EN_1,
+	.value = 1
+    },
+    {
+	.bit   = LOOX550_CPLD_LED1_EN_2,
+	.value = 1
+    },
+    {
+	.bit   = LOOX550_CPLD_LED2_EN_1,
+	.value = 1
+    },
+    {
+	.bit   = LOOX550_CPLD_LED2_EN_2,
+	.value = 1
+    },
+    {
+	.bit   = LOOX550_CPLD_LED2_EN_3,
+	.value = 1
+    },
+*/
+// NOTE: WinCE keeps this bit HIGH, and that's why i added it here... tom3q
+    {
+    	.bit	= LOOX550_CPLD_CF_RESET_N,
+    	.value = 1
+    }
+};
+
+u32 loox550_cpld_reg_read(int regno)
+{
+    u32 retval = 0;
+    if(cpld_mem) retval = cpld_mem[regno];
+    return retval;
+}
+EXPORT_SYMBOL(loox550_cpld_reg_read);
+
+/*
+    if we want to know if specific bits are set ..
+    this returns them either from the cache or from the real cpld
+*/
+
+u32 loox550_cpld_reg_test(int regno, u32 mask)
+{
+    u32 retval = 0;
+    if (regno < 4) // the lower 4 are inputs
+    {
+	if (cpld_mem)
+	    retval = cpld_mem[regno] & mask;
+    } else {
+	retval = reg_cache[regno] & mask;
+    }
+    return retval;
+}
+EXPORT_SYMBOL(loox550_cpld_reg_test);
+
+void loox550_cpld_reg_write(int regno, u32 value)
+{
+    if (cpld_mem)
+      cpld_mem[regno] = (u16) value;
+    /*
+       apparently we write from outside the cpld environment
+       this would cause that bits are not updated in the cache..
+       also the change from 32 to 16 bit makes that all code needs
+       to be checked for writes directly to the cpld 
+    */
+    reg_cache[regno] = value;	
+}
+EXPORT_SYMBOL(loox550_cpld_reg_write);
+
+void loox550_cpld_write_masked(int regno, u32 mask, u32 value)
+{
+    u32 new_value = (reg_cache[regno] & ~mask ) | (value & mask) ;
+    /*
+	only the corresponding bits in the mask will be updated
+	to the ones from the input value
+    */
+    if (cpld_mem)
+      cpld_mem[regno] =(u16) new_value;
+    /*
+       apparently we write from outside the cpld environment
+       this would cause that bits are not updated in the cache..
+       also the change from 32 to 16 bit makes that all code needs
+       to be checked for writes directly to the cpld 
+    */
+    reg_cache[regno] = new_value;	
+}
+EXPORT_SYMBOL(loox550_cpld_write_masked);
+
+/*
+    exporting access to the cached bits is an example of very bad progamming..
+    the code remains until Piotr decides that it must go.. 
+    20/09/2007 Jan Rinze Peterzon.
+
+u32 loox550_egpio_cache_get(int regno)
+{
+    if(regno>0)
+        return reg_cache[regno];
+    else
+    	return 0;
+}
+EXPORT_SYMBOL(loox550_egpio_cache_get);
+
+    
+void loox550_egpio_cache_set(int regno, u32 value)
+{
+    if(regno>0)
+	reg_cache[regno] = value;
+}
+EXPORT_SYMBOL(loox550_egpio_cache_set);
+*/
+
+/* 
+    this code is a bit archaic i.m.h.o.
+void loox720_egpio_cache_enable_bits(int pos, u32 bits)
+{
+    reg_cache[pos] |= bits;
+}
+
+void loox550_egpio_cache_clear_bits(int pos, u32 bits)
+{
+    reg_cache[pos] &=~bits;
+}
+
+void loox550_egpio_set_bit(int bit, int val)
+{
+    int pos = BIT_POS(bit);
+    if(bit > 31)
+	{
+	    if (val)
+		loox550_egpio_cache_enable_bits(pos, BIT_MSK(bit));
+	    else
+		loox550_egpio_cache_clear_bits(pos, BIT_MSK(bit));
+	    loox550_cpld_reg_write(pos, reg_cache[pos]);
+	}
+}
+*/
+
+void loox550_egpio_set_bit(int bit, int val)
+{
+    int pos = BIT_POS(bit);
+    /*
+	pos 0 has interrupt bits.
+	there is no harm in writing to them if intended
+	since that will clear those interrupts.
+	But we have chosen not to bother with this..
+	pos 1 has interrupt mask register which seems logical to keep
+	in the cache.
+	
+	we actually should be locking interrupts around this..
+	there may be race-conditions around setting bits..
+	
+    */
+    if(pos > 0)
+    {
+	u32 curr_value = reg_cache[pos];
+	if (val)
+		curr_value |= BIT_MSK(bit);
+	    else
+		curr_value &=~BIT_MSK(bit);
+	    loox550_cpld_reg_write(pos, curr_value);
+	}
+}
+EXPORT_SYMBOL(loox550_egpio_set_bit);
+
+void	loox550_cpld_ack_irq(unsigned int irq)
+{
+	/*
+	    we don't ack irqs.
+	    a possibility would be to clear the specific interrupt.
+	    we tried but it had no good effects.
+	*/
+}
+
+void 	loox550_cpld_mask_irq(unsigned int irq)
+{
+	struct loox550_irq_data * irq_data = get_irq_chip_data(irq);
+	/* masking like this is racy.. */
+	irq_data->irq_mask |= 1 << (irq - irq_data->irq_base);
+	/* 
+	    NOTE:
+	    since the isr only uses the copy we might try and
+	    really disable this irq in the cpld:
+	*/
+        cpld_mem[1] = irq_data->irq_mask;
+}
+
+void	loox550_cpld_unmask_irq(unsigned int irq)
+{
+	struct loox550_irq_data * irq_data = get_irq_chip_data(irq);
+	/* masking like this is racy.. */
+	irq_data->irq_mask &= ~(1 << (irq - irq_data->irq_base));
+	/*
+	    NOTE:
+	    should we bother to clear the irq first?
+	    for the people who like to know how:
+	    
+	    cpld_mem[0] = 1 << (irq - irq_data->irq_base;
+	*/
+	/* 
+	    NOTE:
+	    since the isr only uses the copy we might try and
+	    really disable this irq in the cpld:
+	*/
+	cpld_mem[1] = irq_data->irq_mask;
+}
+
+static struct irq_chip loox550_irq_chip = {
+    .name       = "CPLD",
+    .mask       = loox550_cpld_mask_irq,
+    .mask_ack	= loox550_cpld_mask_irq,
+    .unmask     = loox550_cpld_unmask_irq,
+    .ack	= loox550_cpld_ack_irq,
+};
+
+static /*unsigned int*/ void loox550_cpld_irq_demux(unsigned int irq, struct irq_desc *desc)
+{
+    unsigned int mask;
+    struct irq_desc * proc_desc;
+    unsigned int proc_irq;
+    struct loox550_irq_data * irq_data = desc->handler_data;
+
+    /* the following is racy.. we should add irq disabling around it */
+    desc->chip->mask(irq);
+    mask = (cpld_mem[0] & (~irq_data->irq_mask));
+    cpld_mem[0] = mask;// ack all to be handled irqs
+    if (mask) {
+        proc_irq = irq_data->irq_base;
+        proc_desc = irq_desc + proc_irq;
+        do {
+            if (mask & 1)
+                desc_handle_irq(proc_irq, proc_desc);
+            proc_irq++;
+            proc_desc++;
+            mask >>= 1;
+        } while (mask);
+    }
+    desc->chip->unmask(irq);
+    cpld_mem[1] = 0x3FF;
+    cpld_mem[1] = irq_data->irq_mask;
+}
+void loox550_cpld_resume(void)
+{
+        int i;
+        for(i=8; i<16; i++)
+                cpld_mem[i] = reg_cache[i];
+}
+
+static int __init loox550_cpld_init(void)
+{
+    int i;
+//    if (!machine_is_loox720())
+//	return -ENODEV;
+
+    loox550_cpld_irq_base = IRQ_BOARD_START;
+    printk(KERN_INFO "Loox 550 CPLD Driver\n");
+
+    cpld_mem = (u16*)ioremap_nocache(LOOX550_CPLD_PHYS, LOOX550_CPLD_SIZE);
+    if (!cpld_mem)
+    {
+		printk(KERN_ERR "ioremap failed.\n");
+		return -ENODEV;
+    }
+
+    printk(KERN_INFO "Physical address of CPLD: %08X\nVirtual address of CPLD: %08X\nUsing IRQs from %d to %d on IRQ %d\n",
+		LOOX550_CPLD_PHYS, (u32)cpld_mem, loox550_cpld_irq_base, loox550_cpld_irq_base + LOOX550_CPLD_IRQ_COUNT - 1, IRQ_GPIO(GPIO_NR_LOOX550_CPLD_INT));
+
+    for (i=0;i<ARRAY_SIZE(loox550_cpld_bits);i++)
+    	loox550_egpio_set_bit( loox550_cpld_bits[i].bit, loox550_cpld_bits[i].value);
+
+	
+	if(gpio_request(GPIO_NR_LOOX550_CPLD_INT, "CPLD interrupt") != 0) {
+		if (cpld_mem)
+			iounmap(cpld_mem);
+		printk(KERN_ERR "Failed to request CPLD interrupt GPIO\n");
+		return -ENODEV;
+	}
+
+    loox550_cpld_irq_data = kmalloc(sizeof(struct loox550_irq_data), GFP_KERNEL);
+    if(!loox550_cpld_irq_data)
+    {
+	printk(KERN_ERR "kmalloc failed.\n");
+	if (cpld_mem)
+	    iounmap(cpld_mem);
+	gpio_free(GPIO_NR_LOOX550_CPLD_INT);
+        return -ENOMEM;
+    }
+    
+    loox550_cpld_irq_data->irq_base = loox550_cpld_irq_base;
+    loox550_cpld_irq_data->irq_mask = 0x3FF;
+    
+    cpld_mem[1] = 0x3FF; // Mask all interrupts
+
+    for (i=0; i<LOOX550_CPLD_IRQ_COUNT; i++)
+    {
+    	int irq = i + loox550_cpld_irq_base;
+        set_irq_chip(irq, &loox550_irq_chip);
+	set_irq_chip_data(irq, loox550_cpld_irq_data);
+	set_irq_handler(irq, handle_level_irq);
+    	set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+    }
+    
+    set_irq_data(IRQ_GPIO(GPIO_NR_LOOX550_CPLD_INT), loox550_cpld_irq_data);
+    set_irq_type(IRQ_GPIO(GPIO_NR_LOOX550_CPLD_INT), IRQT_RISING);
+    set_irq_chained_handler(IRQ_GPIO(GPIO_NR_LOOX550_CPLD_INT), loox550_cpld_irq_demux);
+    
+    cpld_mem[0] = 0x3FF; // clear interrupts
+    cpld_mem[1] = 0x3FF; // enable all interrupts for CFcard and Wifi
+    return 0;
+}
+
+/*
+NOTE: Do we want the CPLD driver to be unloadable? tom3q
+
+static void __exit loox550_cpld_exit(void)
+{
+    if (cpld_mem)
+    {
+	cpld_mem[1] = 0x03FF; // Mask and all interrupts
+	cpld_mem[0] = 0x03FF; // Clear all interrupts
+    }
+	
+    if (loox550_cpld_irq_base!=-1)
+    {
+        int i;
+        for (i = 0 ; i < LOOX550_CPLD_IRQ_COUNT ; i++)
+    	{
+            int irq = i + loox550_cpld_irq_base;
+            set_irq_handler(irq, NULL);
+	    set_irq_chip_data(irq, NULL);
+            set_irq_chip(irq, NULL);
+	    set_irq_flags(irq, 0);
+	}
+	set_irq_chained_handler(IRQ_GPIO(GPIO_NR_LOOX550_CPLD_INT), NULL);
+	set_irq_data(IRQ_GPIO(GPIO_NR_LOOX550_CPLD_INT), NULL);
+    }
+    if (loox550_cpld_irq_data)
+	kfree(loox550_cpld_irq_data);
+    if (cpld_mem)
+        iounmap(cpld_mem);
+        
+	gpio_free(GPIO_NR_LOOX550_CPLD_INT);
+}
+
+module_init( loox550_cpld_init );
+module_exit( loox550_cpld_exit );
+
+MODULE_AUTHOR("Piotr Czechowicz & Tomasz Figa & Jan Rinze Peterzon");
+MODULE_DESCRIPTION("Loox 550 CPLD driver");
+MODULE_LICENSE("GPL");
+*/
+
+/*
+NOTE: see include/linux/init.h for order of initcalls.
+*/
+subsys_initcall( loox550_cpld_init );
diff --git a/arch/arm/mach-pxa/loox550/loox550_flash.c b/arch/arm/mach-pxa/loox550/loox550_flash.c
new file mode 100644
index 000000000000..f45103cedc72
--- /dev/null
+++ b/arch/arm/mach-pxa/loox550/loox550_flash.c
@@ -0,0 +1,54 @@
+/*
+ *
+ * Flash support for Loox 7xx PDAs
+ *
+ * Based on magician.c
+ * Initial version by Dmitriy Geels
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+
+#include <asm/gpio.h>
+#include <asm/mach-types.h>
+#include <mach/hardware.h>
+#include <mach/pxa2xx-regs.h>
+#include <mach/map.h>
+
+/*
+ * StrataFlash
+ */
+
+/*static void magician_set_vpp(struct map_info *map, int vpp)
+{
+        gpio_set_value(EGPIO_MAGICIAN_FLASH_VPP, vpp);
+}
+*/
+#define PXA_CS_SIZE             0x04000000
+
+static struct resource strataflash_resource = {
+        .start = PXA_CS0_PHYS,
+        .end   = PXA_CS0_PHYS + PXA_CS_SIZE - 1,
+        .flags = IORESOURCE_MEM,
+};
+
+static struct physmap_flash_data strataflash_data = {
+        .width = 4,
+//        .set_vpp = magician_set_vpp,
+};
+
+struct platform_device loox7xx_flash = {
+        .name          = "physmap-flash",
+        .id            = -1,
+        .resource      = &strataflash_resource,
+        .num_resources = 1,
+        .dev = {
+                .platform_data = &strataflash_data,
+        },
+};
+
diff --git a/arch/arm/mach-pxa/loox550/loox550_flash_old.c b/arch/arm/mach-pxa/loox550/loox550_flash_old.c
new file mode 100644
index 000000000000..75c9de920ded
--- /dev/null
+++ b/arch/arm/mach-pxa/loox550/loox550_flash_old.c
@@ -0,0 +1,87 @@
+/*
+ *
+ * Flash support for Loox 7xx PDAs
+ *
+ * Based on magician.c
+ * Initial version by Dmitriy Geels
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+
+#include <asm/gpio.h>
+#include <asm/mach-types.h>
+#include <mach/hardware.h>
+#include <mach/arch.h>
+#include <mach/map.h>
+#include <mach/flash.h>
+
+/* StrataFlash */
+/*
+static void loox7xx_set_vpp(struct map_info *map, int vpp)
+{
+	static int old_vpp = 0;
+	if (vpp == old_vpp)
+		return;
+	if (vpp)
+		gpio_set_value(EGPIO_MAGICIAN_FLASH_VPP, 1);
+	else
+		gpio_set_value(EGPIO_MAGICIAN_FLASH_VPP, 0);
+	old_vpp = vpp;
+}
+*/
+#ifdef CONFIG_MTD_PARTITIONS
+static struct mtd_partition wince_partitions[] = {
+	{
+		name:		"bootloader",
+		offset:		MTDPART_OFS_NXTBLK,
+		size:		SZ_256K,
+		mask_flags:	MTD_WRITEABLE,  /* force read-only */
+	},
+	{
+		name:		"winmobile",
+		offset:		MTDPART_OFS_NXTBLK,
+		size:		135 * SZ_256K,
+		mask_flags:	MTD_WRITEABLE,  /* force read-only */
+	},
+	{
+		name:		"looxstore",
+		offset:		MTDPART_OFS_NXTBLK,
+		size:		MTDPART_SIZ_FULL,
+		mask_flags:	MTD_WRITEABLE,  /* force read-only */
+	},
+};
+#endif
+
+static struct resource loox7xx_flash_resource = {
+	.start = PXA_CS0_PHYS,
+	.end   = PXA_CS0_PHYS + SZ_64M - 1,
+	.flags = IORESOURCE_MEM,
+};
+
+static struct flash_platform_data loox7xx_flash_data = {
+	.name		= "loox720-flash",
+	.map_name	= "cfi_probe",
+	.width		= 4,
+	.nr_parts	= ARRAY_SIZE(wince_partitions),
+	.parts		= wince_partitions,
+};
+
+struct platform_device loox7xx_flash = {
+	.name          = "pxa2xx-flash",
+	.id            = -1,
+	.num_resources = 1,
+	.resource      = &loox7xx_flash_resource,
+	.dev = {
+		.platform_data = &loox7xx_flash_data,
+	},
+};
+
+MODULE_AUTHOR("Dmitriy Geels <dmitriy.geels@gmail.com>");
+MODULE_DESCRIPTION("Internal flash driver for HTC Bali");
+MODULE_LICENSE("GPL");
diff --git a/arch/arm/mach-pxa/loox550/loox550_pm.c b/arch/arm/mach-pxa/loox550/loox550_pm.c
new file mode 100644
index 000000000000..4aacbf71be9c
--- /dev/null
+++ b/arch/arm/mach-pxa/loox550/loox550_pm.c
@@ -0,0 +1,322 @@
+/* Power Management support for FSC Loox 720
+ *
+ * Authors: Tomasz Figa
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/version.h>
+#include <linux/interrupt.h>
+#include <linux/device.h>
+#include <linux/platform_device.h>
+#include <linux/pm.h>
+#include <linux/gpio.h>
+
+#include <asm/irq.h>
+#include <asm/io.h>
+
+#include <asm/mach/irq.h>
+
+#include <mach/pxa-regs.h>
+#include <mach/pxa2xx-regs.h>
+#include <mach/loox550-gpio.h>
+//include <asm/arch/loox720-cpld.h>
+#include <mach/loox550.h>
+#include <mach/irqs.h>
+#include <mach/pm.h>
+
+//#include <linux/dpm.h>
+//#include <asm/arch/pxa-pm_ll.h>
+
+static u32 save[6];
+
+static int loox720_suspend(struct platform_device *pdev, pm_message_t state)
+{
+printk("loox720_suspend\n");
+	/*
+	 * Note that WEP1 wake up event is used by bootldr to set the
+	 * LEDS when power is applied/removed for charging.
+	 */
+//	PWER = PWER_RTC | PWER_GPIO0 | PWER_GPIO1 | PWER_GPIO9 | PWER_GPIO11 | PWER_GPIO12 | PWER_GPIO13;
+//	PFER = PWER_GPIO0 | PWER_GPIO1 | PWER_GPIO9 | PWER_GPIO11 | PWER_GPIO13;                                // Falling Edge Detect
+//	PRER = PWER_GPIO0 | PWER_GPIO1 | PWER_GPIO9 | PWER_GPIO12 | PWER_GPIO13;                // Rising Edge Detect
+//	PKWR = PWER_GPIO0;
+
+//	PGSR0 = 0x00000004; //0x01308018; // hx4700: 0x080DC01C
+//	PGSR1 = 0x00020002; //0x008F0112; // hx4700: 0x34CF0002
+//	PGSR2 = 0x00030000; //0x0C03C000; // hx4700: 0x0123C18C
+//	PGSR3 = 0x00000480; //0x00000C80; // hx4700: 0x00100202
+
+	/* These next checks are specifically for charging.  We want to enable
+	* it if it is already enabled */
+	/* Check for charge enable, GPIO 72 */
+//      if(GPLR2 & (1 << 8)) {
+	/* Set it */
+//              PGSR2 |= (1U << 8);
+//      } else {
+	/* Clear it */
+//              PGSR2 &= ~(1U << 8);
+//      }
+	/* Check for USB_CHARGE_RATE, GPIO 96 */
+//      if(GPLR3 & (1 << 0)) {
+	/* Set it */
+//              PGSR3 |= (1U << 0);
+//      } else {
+	/* Clear it */
+//              PGSR3 &= ~(1U << 0);
+//      }
+
+//	PCFR = PCFR_GPROD|PCFR_GPR_EN|PCFR_OPDE|PCFR_PI2CEN; /* was 0x1091; */
+//	PCFR = 0x00001031;
+	/* The 2<<2 below turns on the Power Island state preservation
+	 * and counters.  This allows us to wake up bootldr after a
+	 * period of time, and it can set the LEDs correctly based on
+	 * the power state.  The bootldr turns it off when it's
+	 * charged.
+	z        */
+//	PSLR=0xcc400000 | (2 << 2);
+//	PSLR=0xcc400004 | (2 << 2);
+	return 0;
+}
+
+static int loox720_resume(struct platform_device *pdev)
+{
+//	loox720_cpld_resume();
+//	__asm__ volatile ("mrc p14, 0, r3, c6, c0, 0\n"
+//	                  "orr r3, r3, #0x0008\n"
+//	                  "mcr p14, 0, r3, c6, c0, 0\n"
+//                  :::"r3");
+//
+	return 0;
+}
+
+static void test_resume(void) __attribute__((naked));
+static void test_resume(void)
+{
+	// our private resume handler restores the data at 0xA8024000
+	// and then turns over control to the pxa_resume handler
+	asm volatile("mov r0,#0xa8000000 \n");      // base memory
+//	asm volatile("mov r0,#0xa0200000 \n"); //550
+
+	asm volatile("orr r1,r0,#0x24000 \n");              // memory offset
+	asm volatile("ldr r2,[r1,#20] \n");         // r2 is store
+	asm volatile("ldr r3,[r1,#16] \n");         // r3 is our resume
+
+	asm volatile("ldr r0,[r2],#4 \n");          // restore word at 0
+	asm volatile("str r0,[r1],#4 \n");          // ..
+	asm volatile("ldr r0,[r2],#4 \n");          // restore a word at 4
+	asm volatile("str r0,[r1],#4 \n");          // ..
+	asm volatile("ldr r0,[r2],#4 \n");          // restore a word at 8
+	asm volatile("str r0,[r1],#4 \n");          // ..
+	asm volatile("ldr r0,[r2],#4 \n");          // restore a word at 12
+	asm volatile("str r0,[r1],#4 \n");          // ..
+	asm volatile("ldr r0,[r2],#4 \n");          // restore a word at 16
+	asm volatile("str r0,[r1],#4 \n");          // ..
+	asm volatile("ldr r0,[r2],#4 \n");          // restore a word at 20
+	asm volatile("str r0,[r1],#4 \n");          // ..
+	asm volatile("mov r0,#0x10000000 \n");      // CPLD address
+	asm volatile("mov r1,#0xa800 \n");          // blue led
+	asm volatile("orr r1,r1,#0x0C \n");         // ..
+	asm volatile("strh r1,[r0,#16] \n");        // set LEDs
+
+	asm volatile("mov r15,r3 \n");
+	asm volatile("mov r0,r0 \n");
+	asm volatile("mov r0,r0 ");
+}
+
+static void
+loox720_pxa_ll_pm_suspend(unsigned long resume_addr)
+{
+//    register unsigned int R10 asm("r10");
+	int i;
+	u32 csum, tmp;
+	u32 * p;
+
+	tmp =  virt_to_phys(save);
+	if ((tmp>=0xa8024000)&&(tmp<=0xa824036))
+		panic("Resume storage should not be overwritten");
+
+	tmp = virt_to_phys(test_resume);
+
+	if ((tmp>=0xa8024000)&&(tmp<=0xa824036))
+		panic("Resume handler should not be overwritten");
+	/* Make sure that bootloader will not found reset pattern
+	 * by setting special memory places to 0x00 */
+
+	p = phys_to_virt(0xA8025304);
+	if (!p)
+		panic("Tried to put sleep informations into unmapped memory!");
+	if (*p == 0x1A2B3C4D)
+		*p = 0;
+
+	p = phys_to_virt(0xA8025314);
+	if (!p)
+		panic("Tried to put sleep informations into unmapped memory!");
+	if (*p == 0x1A2B3C4D)
+		*p = 0;
+
+	/* Save the first 4 words from 0xa8024000. */
+	p = phys_to_virt(0xA8024000);
+	if (!p)
+		panic("Tried to put sleep informations into unmapped memory!");
+	for (i = 0; i < 6; i++)
+		save[i] = p[i];
+
+	/* Set the first four words at 0xa8024000 to:
+	 * resume address; MMU control; TLB base addr; domain id */
+	p[0] = tmp;//(unsigned int) test_resume;//resume_addr;
+
+asm( "mrc\tp15, 0, %0, c1, c0, 0" : "=r" (tmp) );
+	p[1] = tmp & (~0xFFFF3987);         /* mmu off */
+
+asm( "mrc\tp15, 0, %0, c2, c0, 0" : "=r" (tmp) );
+	p[2] = tmp & 0xFFFFC000;        /* Shouldn't matter, since MMU will be off. */
+
+asm( "mrc\tp15, 0, %0, c3, c0, 0" : "=r" (tmp) );
+	p[3] = tmp;     /* Shouldn't matter, since MMU will be off. */
+	p[4] = resume_addr;
+	p[5] = virt_to_phys(save);
+
+	/* Set PSPR to the checksum the HTC bootloader wants to see. */
+	//pr_debug("loox720_pxa_ll_pm_resume: Saving system state...\n");
+	for (csum = 0, i = 0; i < 54; i++) {
+		tmp = p[i] & 0x1;
+		tmp = tmp << 31;
+		tmp |= tmp >> 1;
+		csum += tmp;
+		//      pr_debug("offset: %2x - value: %8x - checksum: %8x", i*4, p[i], csum);
+	}
+
+	PSPR = csum;
+/* clear the Fastbus bit as for some reason letting it set leads to crash on resume */
+__asm__ volatile ("mrc p14, 0, r3, c6, c0, 0\n"
+                  "bic	r3, r3, #8\n"
+                  "mcr p14, 0, r3, c6, c0, 0\n"
+                 :::"r3");
+}
+
+extern void pxa27x_cpu_pm_restore(unsigned long *sleep_save);
+void loox720_cpu_pm_restore(unsigned long *sleep_save)
+{
+	int i;
+	u32 *p;
+
+	/* Restore the data at 0xa8024000. */
+	for (p = phys_to_virt(0xa8024000), i = 0; i < 5; i++)
+	      p[i] = save[i];
+	
+	pxa27x_cpu_pm_restore(sleep_save);
+
+	/* XXX Do we need to flush the cache? */
+	/*
+	__asm__ volatile ("mrc p14, 0, r3, c6, c0, 0\n"
+	        "orr r3, r3, #0x0008\n"
+	        "mcr p14, 0, r3, c6, c0, 0\n"
+	        :::"r3");
+	        */
+
+}
+
+void loox720_cpu_pm_enter(suspend_state_t state)
+{
+	extern void pxa_cpu_standby(void);
+
+	/* ensure voltage-change sequencer not initiated, which hangs -что то про зарядку..убедимся....блаблабла */
+//	PCFR &= ~PCFR_FVC;
+
+	/* Clear edge-detect status register. */
+//	PEDR = 0xDF12FE1B;
+
+	/* Clear reset status */
+//	RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
+
+//	switch (state) {
+//	case PM_SUSPEND_STANDBY:
+//		printk("enter PM_SUSPEND_STANDBY\n");
+//		pxa_cpu_standby();
+//		break;
+//	case PM_SUSPEND_MEM:
+//		/* set resume return address */
+//		printk("enter PM_SUSPEND_MEM\n");
+//		loox720_pxa_ll_pm_suspend(virt_to_phys(pxa_cpu_resume));
+//		pxa27x_cpu_suspend(PWRMODE_SLEEP);
+//		break;
+//	}
+}
+
+static int loox720_cpu_pm_valid(suspend_state_t state)
+{
+	return state == PM_SUSPEND_MEM || state == PM_SUSPEND_STANDBY;
+}
+
+extern void pxa27x_cpu_pm_save(unsigned long *sleep_save);
+
+enum {	SLEEP_SAVE_PGSR0, SLEEP_SAVE_PGSR1, SLEEP_SAVE_PGSR2, SLEEP_SAVE_PGSR3,
+
+	SLEEP_SAVE_GAFR0_L, SLEEP_SAVE_GAFR0_U,
+	SLEEP_SAVE_GAFR1_L, SLEEP_SAVE_GAFR1_U,
+	SLEEP_SAVE_GAFR2_L, SLEEP_SAVE_GAFR2_U,
+	SLEEP_SAVE_GAFR3_L, SLEEP_SAVE_GAFR3_U,
+
+	SLEEP_SAVE_PSTR,
+
+	SLEEP_SAVE_CKEN,
+
+	SLEEP_SAVE_MDREFR,
+	SLEEP_SAVE_PWER, SLEEP_SAVE_PCFR, SLEEP_SAVE_PRER,
+	SLEEP_SAVE_PFER, SLEEP_SAVE_PKWR,
+
+	SLEEP_SAVE_COUNT
+};
+
+static struct pxa_cpu_pm_fns loox720_cpu_pm_fns = {
+	.save_count	= SLEEP_SAVE_COUNT,
+	.save		= pxa27x_cpu_pm_save,
+	.restore	= loox720_cpu_pm_restore,
+	.valid		= loox720_cpu_pm_valid,
+	.enter		= loox720_cpu_pm_enter,
+};
+
+static int
+loox720_pm_probe( struct platform_device *pdev )
+{
+	pxa_cpu_pm_fns = &loox720_cpu_pm_fns;
+	return 0;
+}
+
+static int
+loox720_pm_remove( struct platform_device *dev )
+{
+	return 0;
+}
+
+struct platform_driver loox720_pm_driver = {
+	.driver = {
+		.name     = "loox550-pm",
+	},
+	.probe    = loox720_pm_probe,
+	.remove   = loox720_pm_remove,
+	.suspend  = loox720_suspend,
+	.resume   = loox720_resume,
+};
+
+static int __init
+loox720_pm_init( void )
+{
+	return platform_driver_register( &loox720_pm_driver );
+}
+
+
+static void __exit
+loox720_pm_exit( void )
+{
+	platform_driver_unregister( &loox720_pm_driver );
+}
+
+module_init( loox720_pm_init );
+module_exit( loox720_pm_exit );
+
+MODULE_AUTHOR("Tomasz Figa");
+MODULE_DESCRIPTION("Loox 720 Power Management Support");
+MODULE_LICENSE("GPL");
+
diff --git a/arch/arm/mach-pxa/loox550/loox550_rfkill.c b/arch/arm/mach-pxa/loox550/loox550_rfkill.c
new file mode 100644
index 000000000000..a8cbfeeb6cbb
--- /dev/null
+++ b/arch/arm/mach-pxa/loox550/loox550_rfkill.c
@@ -0,0 +1,153 @@
+/*
+ * Bluetooth Power control for Loox 550
+ *
+ * Copyright (c) 2010 Alexander Tarasikov
+ * Copyright (c) 2013 Jakub Cejl
+ * based on the rfkill driver for Loox 720 by Alexander Tarasikov
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+#include <linux/delay.h>
+#include <linux/rfkill.h>
+
+#include <mach/loox550.h>
+#include <mach/loox550-gpio.h>
+
+static struct rfkill *bt_rfk;
+
+static void bt_poweroff(void)
+{
+	pr_info("loox550 rfk: power off");
+	gpio_direction_output(LOOX5XX_EGPIO_BT_POWER1, 0);
+	gpio_direction_output(LOOX5XX_EGPIO_BT_POWER2, 0);
+}
+
+static void bt_poweron(void)
+{
+	pr_info("loox550 rfk: power on ");
+	gpio_direction_output(LOOX5XX_EGPIO_BT_POWER1, 1);
+	gpio_direction_output(LOOX5XX_EGPIO_BT_POWER2, 1);
+
+	gpio_set_value(GPIO_NR_LOOXC550_CPU_BT_RESET_N, 0);
+	mdelay(1);
+	gpio_set_value(GPIO_NR_LOOXC550_CPU_BT_RESET_N, 1);
+
+	gpio_direction_output(LOOX5XX_EGPIO_BT_RESET2, 0);
+	mdelay(9);
+	gpio_direction_output(LOOX5XX_EGPIO_BT_RESET2, 1);
+}
+
+static int loox550_bt_set_block(void *data, bool blocked)
+{
+	if (!blocked) {
+		bt_poweron();
+	} else {
+		bt_poweroff();
+	}
+
+	return 0;
+}
+
+static const struct rfkill_ops loox550_bt_rfkill_ops = {
+	.set_block = loox550_bt_set_block,
+};
+
+static void free_gpios(void){
+	gpio_free(GPIO_NR_LOOXC550_CPU_BT_RESET_N);
+	gpio_free(LOOX5XX_EGPIO_BT_RESET2);
+	gpio_free(LOOX5XX_EGPIO_BT_POWER1);
+	gpio_free(LOOX5XX_EGPIO_BT_POWER2);
+}
+
+static int request_gpios_bt(void){
+	int rc = 0;
+	rc |= gpio_request(GPIO_NR_LOOXC550_CPU_BT_RESET_N, "Bluetooth Reset");
+	rc |= gpio_request(LOOX5XX_EGPIO_BT_RESET2, "Bluetooth Reset 2");
+	rc |= gpio_request(LOOX5XX_EGPIO_BT_POWER1, "Bluetooth Power 1");
+	rc |= gpio_request(LOOX5XX_EGPIO_BT_POWER2, "Bluetooth Power 2");
+	return rc;
+}
+
+static int loox550_rfk_probe(struct platform_device *dev)
+{
+	int rc;
+
+	rc = request_gpios_bt();
+	if (rc)
+		goto err_gpios;
+
+	bt_rfk = rfkill_alloc("loox550-bt", &dev->dev, RFKILL_TYPE_BLUETOOTH,
+			   &loox550_bt_rfkill_ops, NULL);
+
+
+	if (!bt_rfk)
+		goto err_rfkill;
+
+	rfkill_set_led_trigger_name(bt_rfk, "loox550-bt");
+
+	rc = rfkill_register(bt_rfk);
+	if (rc)
+		goto err_rfkill;
+
+	platform_set_drvdata(dev, NULL);
+
+	return 0;
+
+err_rfkill:
+	rfkill_destroy(bt_rfk);
+err_gpios:
+	free_gpios();
+	return rc;
+}
+
+static int loox550_rfk_remove(struct platform_device *dev)
+{
+	platform_set_drvdata(dev, NULL);
+
+	if (bt_rfk) {
+		rfkill_unregister(bt_rfk);
+		rfkill_destroy(bt_rfk);
+	}
+
+	bt_rfk = NULL;
+
+	free_gpios();
+
+	return 0;
+}
+
+static struct platform_driver loox550_rfk_driver = {
+	.probe = loox550_rfk_probe,
+	.remove = loox550_rfk_remove,
+
+	.driver = {
+		.name = "loox550-rfk",
+		.owner = THIS_MODULE,
+	},
+};
+
+static int __init loox550_rfk_init(void)
+{
+	pr_info("loox550 rfk: init");
+	return platform_driver_register(&loox550_rfk_driver);
+}
+
+static void __exit loox550_rfk_exit(void)
+{
+	platform_driver_unregister(&loox550_rfk_driver);
+}
+
+module_init(loox550_rfk_init);
+module_exit(loox550_rfk_exit);
+
+MODULE_AUTHOR("Jakub Cejl <jakubcejl@gmail.com>");
+MODULE_DESCRIPTION("Loox 5xx bluetooth power control");
+MODULE_LICENSE("GPL");
diff --git a/arch/arm/mach-pxa/loox550/loox5xx_leds.c b/arch/arm/mach-pxa/loox550/loox5xx_leds.c
new file mode 100644
index 000000000000..97cca36b5e7a
--- /dev/null
+++ b/arch/arm/mach-pxa/loox550/loox5xx_leds.c
@@ -0,0 +1,379 @@
+/*
+ *
+ * Leds support for Fujitsu-Siemens Loox 5xx PDAs
+ *
+ * Evgeny Chukreev <akshaal@akshaal.info>   http://www.akshaal.info
+ * (C) 2009
+ *
+ * GNU GPL
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/device.h>
+#include <linux/spinlock.h>
+
+#include <asm/gpio.h>
+#include <mach/gpio.h>
+#include <mach/loox550-gpio.h>
+#include <mach/loox5xx_leds.h>
+
+// Leds mode stuff
+DEFINE_SPINLOCK(loox5xx_leds_mode_lock);
+static u32 leds_mode = 0; // If a bit is enabled, then special mode is forced for the bit
+static u32 leds_forced_value = 0; // Only valid for bits enabled in leds_mode
+
+#define MODE_PWR_LED_ANY 0
+#define MODE_PWR_LED_OFF 1
+#define MODE_PWR_LED_ON 2
+#define MODE_PWR_LED_BLINK 3
+
+static u8 leds_pwr_mode = MODE_PWR_LED_ANY;
+
+// Current state
+DEFINE_SPINLOCK(loox5xx_leds_state_lock);
+static u32 leds_state = 0;
+static u8 leds_pwr_state = MODE_PWR_LED_OFF;
+
+// //////////////////////////////////////////////////////////////////////////
+// Leds state modification
+
+// Update keyboard led register
+static inline void update_keyboard_led (void) {
+    gpio_set_value (LOOX5XX_EGPIO_LED_7, leds_state & LOOX5XX_LED_KEYBOARD);
+}
+
+// Update left leds register
+static inline void update_left_leds (void) {
+    // Convert from bit-per-led form to stupid register form
+    // We could have done it with a table but it would mean no less code
+    
+    u32 left_state = leds_state & (  LOOX5XX_LED_LEFT_ORANGE
+		                   | LOOX5XX_LED_LEFT_BLUE
+                	           | LOOX5XX_LED_LEFT_GREEN);
+    
+    u32 regv =
+	(left_state == (  LOOX5XX_LED_LEFT_ORANGE
+	 	        | LOOX5XX_LED_LEFT_BLUE
+  		        | LOOX5XX_LED_LEFT_GREEN)) ? 7 :
+
+	(left_state == (  LOOX5XX_LED_LEFT_ORANGE
+	 	        | LOOX5XX_LED_LEFT_BLUE))  ? 6 :
+
+	(left_state == (  LOOX5XX_LED_LEFT_ORANGE
+  		        | LOOX5XX_LED_LEFT_GREEN)) ? 5 :
+
+	(left_state == (  LOOX5XX_LED_LEFT_BLUE
+  		        | LOOX5XX_LED_LEFT_GREEN)) ? 4 :
+
+	(left_state == LOOX5XX_LED_LEFT_ORANGE)    ? 3 :
+	(left_state == LOOX5XX_LED_LEFT_BLUE)      ? 2 :
+	(left_state == LOOX5XX_LED_LEFT_GREEN)     ? 1 :
+						     0;
+
+    gpio_set_value (LOOX5XX_EGPIO_LED_4, regv & 1);
+    gpio_set_value (LOOX5XX_EGPIO_LED_5, regv & 2);
+    gpio_set_value (LOOX5XX_EGPIO_LED_6, regv & 4);
+}
+
+// Update right leds register
+static inline void update_right_leds (void) {
+    // Convert from bit-per-led form to stupid register form.
+    // Blinking green led has higher precedence than orange led
+    u32 green = leds_state & LOOX5XX_LED_RIGHT_GREEN;
+    
+    u32 regv =
+	(leds_pwr_state == MODE_PWR_LED_BLINK && green) ? 4 :
+	(leds_pwr_state == MODE_PWR_LED_BLINK)          ? 3 :
+	green                                           ? 2 :
+	(leds_pwr_state == MODE_PWR_LED_ON)             ? 1 :
+							  0;
+
+    gpio_set_value (LOOX5XX_EGPIO_LED_1, regv & 1);
+    gpio_set_value (LOOX5XX_EGPIO_LED_2, regv & 2);
+    gpio_set_value (LOOX5XX_EGPIO_LED_3, regv & 4);
+}
+
+// Takes forces state into account and calls update functions for
+// changed registers
+static inline void commit_new_leds_state (u32 new_leds_state) {
+    u32 old_leds_state;
+
+    // Set forced bits on
+    new_leds_state |= leds_mode & leds_forced_value;
+
+    // Clear foced bits off
+    new_leds_state &= (~leds_mode) | leds_forced_value;
+
+    // Return if nothing really changed
+    if (new_leds_state == leds_state) {
+	return;
+    }
+
+    // Change shadow state
+    old_leds_state = leds_state;
+    leds_state = new_leds_state;
+
+    // Update keyboard register if changed
+    if ((old_leds_state & LOOX5XX_LED_KEYBOARD)
+	    != (new_leds_state & LOOX5XX_LED_KEYBOARD))
+    {
+	update_keyboard_led ();
+    }
+
+    // Update reft leds register if changed
+    if ((old_leds_state & (LOOX5XX_LED_LEFT_GREEN
+		           | LOOX5XX_LED_LEFT_BLUE
+			   | LOOX5XX_LED_LEFT_ORANGE))
+	    != (new_leds_state & (LOOX5XX_LED_LEFT_GREEN
+	 	                  | LOOX5XX_LED_LEFT_BLUE
+    		      	          | LOOX5XX_LED_LEFT_ORANGE)))
+    {
+	update_left_leds ();
+    }
+
+    // Update right register if changed
+    if ((old_leds_state & LOOX5XX_LED_RIGHT_GREEN)
+	    != (new_leds_state & LOOX5XX_LED_RIGHT_GREEN))
+    {
+	update_right_leds ();
+    }
+}
+
+// Takes forces state into account and calls update functions for
+// changed registers
+static inline void commit_new_leds_pwr_state (u8 new_pwr_state) {
+    // Applying 'force' mode
+    if (leds_pwr_mode != MODE_PWR_LED_ANY) {
+	new_pwr_state = leds_pwr_mode;
+    }
+
+    if (new_pwr_state == leds_pwr_state) {
+	return;
+    }
+
+    leds_pwr_state = new_pwr_state;
+    update_right_leds ();
+}
+
+// //////////////////////////////////////////////////////////////////////////
+// These functions are for leds having two states
+
+void loox5xx_enable_leds (u32 leds) {
+    spin_lock(&loox5xx_leds_state_lock);
+
+    commit_new_leds_state (leds_state | leds);
+
+    spin_unlock(&loox5xx_leds_state_lock);
+}
+
+void loox5xx_disable_leds (u32 leds) {
+    spin_lock(&loox5xx_leds_state_lock);
+
+    commit_new_leds_state (leds_state & (~leds));
+
+    spin_unlock(&loox5xx_leds_state_lock);
+}
+
+// //////////////////////////////////////////////////////////////////////////
+// Power led has three states
+
+void loox5xx_enable_power_led (void) {
+    spin_lock(&loox5xx_leds_state_lock);
+
+    commit_new_leds_pwr_state (MODE_PWR_LED_ON);
+
+    spin_unlock(&loox5xx_leds_state_lock);
+}
+
+void loox5xx_disable_power_led (void) {
+    spin_lock(&loox5xx_leds_state_lock);
+
+    commit_new_leds_pwr_state (MODE_PWR_LED_OFF);
+
+    spin_unlock(&loox5xx_leds_state_lock);
+}
+
+void loox5xx_blink_power_led (void) {
+    spin_lock(&loox5xx_leds_state_lock);
+
+    commit_new_leds_pwr_state (MODE_PWR_LED_BLINK);
+
+    spin_unlock(&loox5xx_leds_state_lock);
+}
+
+// //////////////////////////////////////////////////////////////////////////
+// Device attributes
+
+struct device_led_attribute {
+    struct device_attribute        device_attr;
+    u32 led;
+};
+
+#define DEVICE_2STATE_LED_ATTR(_name, _led) \
+    struct device_led_attribute dev_led_attr_##_name = \
+       { .device_attr = __ATTR(_name, 0644, show_2state_led_attr, store_2state_led_attr), \
+	 .led = _led, }
+
+// Writes current state of led into the given buffer
+static ssize_t show_2state_led_attr (struct device *dev,
+	   		             struct device_attribute *attr,
+			             char *buf)
+{
+    struct device_led_attribute *led_attr = (struct device_led_attribute *) attr;
+    char *mode;
+
+    spin_lock(&loox5xx_leds_mode_lock);
+    if (leds_mode & led_attr->led) {
+	if (leds_forced_value & led_attr->led) {
+	    mode = "on";
+	} else {
+	    mode = "off";
+	}
+    } else {
+	mode = "any";
+    }
+    spin_unlock(&loox5xx_leds_mode_lock);
+
+    return sprintf(buf, "%s\n", mode);
+}
+
+// Reads new state for led from the given buffer
+static ssize_t store_2state_led_attr (struct device *dev,
+				      struct device_attribute *attr,
+		                      const char *buf,
+				      size_t n)
+{
+    struct device_led_attribute *led_attr = (struct device_led_attribute *) attr;
+
+    spin_lock(&loox5xx_leds_mode_lock);
+    if (!strncmp (buf, "on", 2)) {
+	leds_mode |= led_attr->led;
+	leds_forced_value |= led_attr->led;
+        loox5xx_enable_leds (led_attr->led);
+    } else if (!strncmp (buf, "off", 3)) {
+	leds_mode |= led_attr->led;
+	leds_forced_value &= ~(led_attr->led);
+        loox5xx_disable_leds (led_attr->led);
+    } else if (!strncmp (buf, "any", 3)) {
+	leds_mode &= ~(led_attr->led);
+    }
+    spin_unlock(&loox5xx_leds_mode_lock);
+
+    return n;	    
+}
+
+// Writes current state of power led into the given buffer
+static ssize_t show_right_orange_attr (struct device *dev,
+	   		               struct device_attribute *attr,
+			               char *buf)
+{
+    char *smode;
+    u8 copied_mode;
+
+    spin_lock(&loox5xx_leds_mode_lock);
+    copied_mode = leds_pwr_mode;
+    spin_unlock(&loox5xx_leds_mode_lock);
+
+    smode = copied_mode == MODE_PWR_LED_ANY   ? "any"   :
+	    copied_mode == MODE_PWR_LED_ON    ? "on"    :
+	    copied_mode == MODE_PWR_LED_OFF   ? "off"   :
+	    copied_mode == MODE_PWR_LED_BLINK ? "blink" :
+	    "unknown";
+
+    return sprintf(buf, "%s\n", smode);
+}
+
+// Reads new state for power led from the given buffer
+static ssize_t store_right_orange_attr (struct device *dev,
+				        struct device_attribute *attr,
+		                        const char *buf,
+				        size_t n)
+{
+    spin_lock(&loox5xx_leds_mode_lock);
+    if (!strncmp (buf, "on", 2)) {
+	leds_pwr_mode = MODE_PWR_LED_ON;
+	loox5xx_enable_power_led ();
+    } else if (!strncmp (buf, "off", 3)) {
+	leds_pwr_mode = MODE_PWR_LED_OFF;
+	loox5xx_disable_power_led ();
+    } else if (!strncmp (buf, "blink", 5)) {
+	leds_pwr_mode = MODE_PWR_LED_BLINK;
+	loox5xx_blink_power_led ();
+    } else if (!strncmp (buf, "any", 3)) {
+	leds_pwr_mode = MODE_PWR_LED_ANY;
+    }
+    spin_unlock(&loox5xx_leds_mode_lock);
+
+    return n;	    
+}
+
+// Attributes
+static DEVICE_2STATE_LED_ATTR(keyboard, LOOX5XX_LED_KEYBOARD);
+static DEVICE_2STATE_LED_ATTR(left_green, LOOX5XX_LED_LEFT_GREEN);
+static DEVICE_2STATE_LED_ATTR(left_blue, LOOX5XX_LED_LEFT_BLUE);
+static DEVICE_2STATE_LED_ATTR(left_orange, LOOX5XX_LED_LEFT_ORANGE);
+static DEVICE_2STATE_LED_ATTR(right_green, LOOX5XX_LED_RIGHT_GREEN);
+
+static DEVICE_ATTR(right_orange, 0644, show_right_orange_attr, store_right_orange_attr);
+
+// //////////////////////////////////////////////////////////////////////////
+// Methods required for device drivers
+
+// Called upon driver instance intitialization
+static int loox5xx_leds_probe (struct platform_device *pdev) {
+    int err;
+
+    printk (KERN_NOTICE "Loox 5XX leds driver\n");
+
+    // Register device attributes visible through sysfs
+    err = device_create_file (&pdev->dev, &dev_led_attr_keyboard.device_attr);
+    err |= device_create_file (&pdev->dev, &dev_led_attr_left_green.device_attr);
+    err |= device_create_file (&pdev->dev, &dev_led_attr_left_blue.device_attr);
+    err |= device_create_file (&pdev->dev, &dev_led_attr_left_orange.device_attr);
+    err |= device_create_file (&pdev->dev, &dev_led_attr_right_green.device_attr);
+    err |= device_create_file (&pdev->dev, &dev_attr_right_orange);
+
+    if (err != 0) {
+	printk(KERN_WARNING "loox5xx-leds: failed to register attributes\n");
+    }
+
+    return 0;
+}
+
+// Called upon driver instance removing process
+static int loox5xx_leds_remove (struct platform_device *dev)
+{
+    return 0;
+}
+
+// //////////////////////////////////////////////////////////////////////////
+// Device driver description
+
+// Platform driver structure for loox5xx-leds driver
+static struct platform_driver loox5xx_leds_driver = {
+    .driver = {
+	.name     = "loox5xx-leds",
+    },
+    .probe    = loox5xx_leds_probe,
+    .remove   = loox5xx_leds_remove,
+};
+
+// Init function.. called upon module initialization
+static int __init loox5xx_leds_init (void) {
+    return platform_driver_register (&loox5xx_leds_driver);
+}
+
+// Exit function.. called upon module unload (if ever happens...)
+static void __exit loox5xx_leds_exit (void) {
+    platform_driver_unregister (&loox5xx_leds_driver);
+}
+
+module_init (loox5xx_leds_init);
+module_exit (loox5xx_leds_exit);
+
+MODULE_AUTHOR("Evgeny Chukreev <akshaal@akshaal.info>");
+MODULE_DESCRIPTION("Leds support for Fujitsu-Siemens Loox 5xx PDAs");
+MODULE_LICENSE("GPL");
diff --git a/arch/arm/mach-pxa/loox550/looxn560_pm.c b/arch/arm/mach-pxa/loox550/looxn560_pm.c
new file mode 100644
index 000000000000..cc852d1829ab
--- /dev/null
+++ b/arch/arm/mach-pxa/loox550/looxn560_pm.c
@@ -0,0 +1,106 @@
+/*
+ * LooxN560 power management support for the original HTC IPL in DoC G4
+ *
+ * Use consistent with the GNU GPL is permitted, provided that this
+ * copyright notice is preserved in its entirety in all copies and
+ * derived works.
+ *
+ * Copyright (C) 2005 Pawel Kolodziejski
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/device.h>
+#include <linux/pm.h>
+
+#include <asm/mach-types.h>
+#include <mach/hardware.h>
+#include <mach/pxa-regs.h>
+#include <mach/pxa-pm_ll.h>
+
+#ifdef CONFIG_PM
+
+static u32 *addr_a0000000;
+static u32 *addr_a0025304;
+static u32 *addr_a0200000;
+static u32 *addr_a0200040;
+
+static u32 *addr_a0201000;
+static u32 *addr_a0201004;
+static u32 *addr_a0201008;
+static u32 *addr_a020100c;
+
+static u32 save_a0000000;
+static u32 save_a0025304;
+static u32 save_a0200000;
+static u32 save_a0200040;
+
+static u32 save_a0201000;
+static u32 save_a0201004;
+static u32 save_a0201008;
+static u32 save_a020100c;
+
+#if 0
+a0025304 warm
+a0025314 cold
+#endif
+
+static void pxa_ll_pm_suspend(unsigned long resume_addr)
+{
+	save_a0201000 = *addr_a0201000;
+	save_a0201004 = *addr_a0201004;
+	save_a0201008 = *addr_a0201008;
+	save_a020100c = *addr_a020100c;
+
+         save_a0025304 = *addr_a0025304;
+//        *addr_a0025304 = 0x0 ; /* != 0x1a2b3c4d */
+
+         save_a0200000 = *addr_a0200000;
+        *addr_a0200000 = 0xea0003fe ; /* b 0x1000 */
+
+         save_a0200040 = *addr_a0200040;
+        *addr_a0200040 = 0x43454345 ; /* "ECEC" */
+
+         save_a0000000 = *addr_a0000000;
+
+	/* jump to PSPR */
+	*addr_a0201000 = 0xe3a00101; // mov r0, #0x40000000
+	*addr_a0201004 = 0xe380060f; // orr r0, r0, #0x0f000000
+	*addr_a0201008 = 0xe3800008; // orr r0, r0, #8
+	*addr_a020100c = 0xe590f000; // ldr pc, [r0]
+}
+
+static void pxa_ll_pm_resume(void)
+{
+	*addr_a0201000 = save_a0201000;
+	*addr_a0201004 = save_a0201004;
+	*addr_a0201008 = save_a0201008;
+	*addr_a020100c = save_a020100c;
+
+	*addr_a0200000 = save_a0200000;
+	*addr_a0200040 = save_a0200040;
+	*addr_a0025304 = save_a0025304;
+	*addr_a0000000 = save_a0000000;
+
+}
+
+static struct pxa_ll_pm_ops n560_ll_pm_ops = {
+	.suspend = pxa_ll_pm_suspend,
+	.resume  = pxa_ll_pm_resume,
+};
+
+void n560_ll_pm_init(void) {
+	addr_a0201000 = phys_to_virt(0xa0201000);
+	addr_a0201004 = phys_to_virt(0xa0201004);
+	addr_a0201008 = phys_to_virt(0xa0201008);
+	addr_a020100c = phys_to_virt(0xa020100c);
+
+	addr_a0000000 = phys_to_virt(0xa0000000);
+	addr_a0025304 = phys_to_virt(0xa0025304);
+	addr_a0200000 = phys_to_virt(0xa0200000);
+	addr_a0200040 = phys_to_virt(0xa0200040);
+
+	pxa_pm_set_ll_ops(&n560_ll_pm_ops);
+}
+#endif /* CONFIG_PM */
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index a10297da122b..e90dc971cdc7 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -259,6 +259,7 @@ realview_pb11mp		MACH_REALVIEW_PB11MP	REALVIEW_PB11MP		1407
 mx27_3ds		MACH_MX27_3DS		MX27_3DS		1430
 halibut			MACH_HALIBUT		HALIBUT			1439
 trout			MACH_TROUT		TROUT			1440
+looxn560                MACH_LOOXN560           LOOXN560                1454
 tct_hammer		MACH_TCT_HAMMER		TCT_HAMMER		1460
 herald			MACH_HERALD		HERALD			1461
 sim_one			MACH_SIM_ONE		SIM_ONE			1476
diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig
index 4db74a083db1..aecc5301c67a 100644
--- a/sound/soc/pxa/Kconfig
+++ b/sound/soc/pxa/Kconfig
@@ -47,6 +47,18 @@ config SND_PXA2XX_SOC_CORGI
 	  Say Y if you want to add support for SoC audio on Sharp
 	  Zaurus SL-C7x0 models (Corgi, Shepherd, Husky).
 
+config SND_PXA2XX_SOC_LOOX
+	tristate "SoC Audio support for Loox series"
+	depends on SND_PXA2XX_SOC && MACH_LOOX550
+	select SND_PXA2XX_SOC_I2S
+	select SND_SOC_WM8750
+	select I2C
+	select I2C_PXA
+	select I2C_ALGOBIT
+	help
+	  Say Y if you want to add support for SoC audio on the
+	  Loox 5xx and 7xx machines.
+
 config SND_PXA2XX_SOC_SPITZ
 	tristate "SoC Audio support for Sharp Zaurus SL-Cxx00"
 	depends on SND_PXA2XX_SOC && PXA_SHARP_Cxx00
diff --git a/sound/soc/pxa/Makefile b/sound/soc/pxa/Makefile
index 2cff67b61dc3..1b3b34561334 100644
--- a/sound/soc/pxa/Makefile
+++ b/sound/soc/pxa/Makefile
@@ -16,6 +16,7 @@ obj-$(CONFIG_SND_MMP_SOC_SSPA) += snd-soc-mmp-sspa.o
 # PXA Machine Support
 snd-soc-corgi-objs := corgi.o
 snd-soc-poodle-objs := poodle.o
+snd-soc-loox-objs := loox7xx.o
 snd-soc-tosa-objs := tosa.o
 snd-soc-e740-objs := e740_wm9705.o
 snd-soc-e750-objs := e750_wm9705.o
@@ -40,6 +41,7 @@ obj-$(CONFIG_SND_PXA2XX_SOC_E740) += snd-soc-e740.o
 obj-$(CONFIG_SND_PXA2XX_SOC_E750) += snd-soc-e750.o
 obj-$(CONFIG_SND_PXA2XX_SOC_E800) += snd-soc-e800.o
 obj-$(CONFIG_SND_PXA2XX_SOC_SPITZ) += snd-soc-spitz.o
+obj-$(CONFIG_SND_PXA2XX_SOC_LOOX) += snd-soc-loox.o
 obj-$(CONFIG_SND_PXA2XX_SOC_EM_X270) += snd-soc-em-x270.o
 obj-$(CONFIG_SND_PXA2XX_SOC_PALM27X) += snd-soc-palm27x.o
 obj-$(CONFIG_SND_PXA2XX_SOC_HX4700) += snd-soc-hx4700.o
diff --git a/sound/soc/pxa/loox7xx.c b/sound/soc/pxa/loox7xx.c
new file mode 100644
index 000000000000..ffad3e174b6c
--- /dev/null
+++ b/sound/soc/pxa/loox7xx.c
@@ -0,0 +1,300 @@
+/*
+ * linux/sound/soc/pxa/loox.c
+ *
+ * SoC Audio driver for FSC Loox 500 series
+ *
+ * Copyright (C) 2009 Ken McGuire <kenm@desertweyr.com>
+ * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
+ * Copyright (C) 2013 David Heidelberger <david.heidelberger@ixit.cz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/timer.h>
+#include <linux/interrupt.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+
+#include <sound/core.h>
+#include <sound/pcm.h>
+#include <sound/soc.h>
+#include <sound/jack.h>
+
+#include <asm/mach-types.h>
+#include <mach/hardware.h>
+#include <mach/audio.h>
+#include <mach/loox550-gpio.h>
+
+#include "../codecs/wm8750.h"
+#include "pxa2xx-i2s.h"
+
+static int loox_spk_switch = 0;
+
+static struct snd_soc_card snd_soc_z2;
+
+static int z2_hw_params(struct snd_pcm_substream *substream,
+	struct snd_pcm_hw_params *params)
+{
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+	struct snd_soc_dai *codec_dai = rtd->codec_dai;
+	struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+	unsigned int clk = 0;
+	int ret = 0;
+
+	switch (params_rate(params)) {
+	case 8000:
+	case 16000:
+	case 48000:
+	case 96000:
+		clk = 12288000;
+		break;
+	case 11025:
+	case 22050:
+	case 44100:
+		clk = 11289600;
+		break;
+	}
+
+	/* set the codec system clock for DAC and ADC */
+	ret = snd_soc_dai_set_sysclk(codec_dai, WM8750_SYSCLK, clk,
+		SND_SOC_CLOCK_IN);
+	if (ret < 0)
+		return ret;
+
+	/* set the I2S system clock as input (unused) */
+	ret = snd_soc_dai_set_sysclk(cpu_dai, PXA2XX_I2S_SYSCLK, 0,
+		SND_SOC_CLOCK_IN);
+	if (ret < 0)
+		return ret;
+
+	return 0;
+}
+
+static struct snd_soc_jack hs_jack;
+
+/* Headset jack detection DAPM pins */
+static struct snd_soc_jack_pin hs_jack_pins[] = {
+	{
+		.pin	= "Headphone Jack",
+		.mask	= SND_JACK_HEADPHONE,
+	},
+	{
+		.pin	= "Cradle Jack",
+		.mask	= SND_JACK_LINEOUT,
+	},
+	{
+		.pin    = "Speaker",
+		.mask   = SND_JACK_HEADPHONE | SND_JACK_LINEOUT,
+		.invert = 1
+	},
+};
+
+/* Headset jack detection gpios */
+static struct snd_soc_jack_gpio hs_jack_gpios[] = {
+	{
+		.gpio		= GPIO_NR_LOOXC550_HP_JACK,
+		.name		= "hsdet-gpio",
+		.report		= SND_JACK_HEADPHONE,
+		.debounce_time	= 200,
+		.invert		= 1,
+	},
+	{
+		.gpio		= GPIO_NR_LOOXC550_CRADLE_JACK,
+		.name		= "cradledet-gpio",
+		.report		= SND_JACK_LINEOUT,
+		.debounce_time	= 200,
+		.invert		= 1,
+	},
+};
+
+static int loox_spk_event(struct snd_soc_dapm_widget *w,
+	struct snd_kcontrol *k, int event)
+{
+	gpio_set_value(LOOX5XX_EGPIO_SPK_POWER, SND_SOC_DAPM_EVENT_ON(event));
+	return 0;
+}
+static int loox_cradle_event(struct snd_soc_dapm_widget *w,
+	struct snd_kcontrol *k, int event)
+{
+	gpio_set_value(GPIO_NR_LOOXC550_CRADLE_POWER, SND_SOC_DAPM_EVENT_ON(event));
+	return 0;
+}
+
+/* Loox dapm widgets */
+static const struct snd_soc_dapm_widget wm8750_dapm_widgets[] = {
+	SND_SOC_DAPM_HP("Headphone Jack", NULL),
+	SND_SOC_DAPM_HP("Cradle Jack", loox_cradle_event),
+	SND_SOC_DAPM_MIC("Mic Jack", NULL),
+	SND_SOC_DAPM_SPK("Speaker", loox_spk_event),
+};
+
+/* Z2 machine audio_map */
+static const struct snd_soc_dapm_route z2_audio_map[] = {
+
+	/* headphone connected to LOUT1, ROUT1 */
+	{"Headphone Jack", NULL, "LOUT1"},
+	{"Headphone Jack", NULL, "ROUT1"},
+
+	/* cradle jack connected to LOUT1, ROUT1 */
+	{"Cradle Jack", NULL, "LOUT1"},
+	{"Cradle Jack", NULL, "ROUT1"},
+
+	/* ext speaker connected to LOUT2, ROUT2  */
+	{"Speaker", NULL , "ROUT2"},
+	{"Speaker", NULL , "LOUT2"},
+
+	/* mic is connected to R input 2 - with bias */
+	{"RINPUT2", NULL, "Mic Bias"},
+	{"Mic Bias", NULL, "Mic Jack"},
+};
+
+static const char *spk_function[] = {"Auto", "On", "Off"};
+static const struct soc_enum loox_enum[] = {
+	SOC_ENUM_SINGLE_EXT(3, spk_function),
+};
+
+static int loox_get_spk(struct snd_kcontrol *kcontrol,
+	struct snd_ctl_elem_value *ucontrol)
+{
+	ucontrol->value.integer.value[0] = loox_spk_switch;
+	return 0;
+}
+
+static int loox_set_spk(struct snd_kcontrol *kcontrol,
+	struct snd_ctl_elem_value *ucontrol)
+{
+	struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
+	struct snd_soc_dapm_context *dapm = &card->dapm;
+
+	if (loox_spk_switch == ucontrol->value.integer.value[0])
+		return 0;
+
+	loox_spk_switch = ucontrol->value.integer.value[0];
+	switch (loox_spk_switch)
+	{
+	case 1:
+		snd_soc_dapm_enable_pin(dapm, "Speaker");
+		break;
+	case 2:
+		snd_soc_dapm_disable_pin(dapm, "Speaker");
+		break;
+	}
+	snd_soc_dapm_sync(dapm);
+	return 1;
+}
+
+static const struct snd_kcontrol_new wm8750_loox_controls[] = {
+	SOC_ENUM_EXT("Speaker Mode", loox_enum[0], loox_get_spk,
+		loox_set_spk),
+};
+
+/*
+ * Logic for a wm8750 as connected on a Z2 Device
+ */
+static int z2_wm8750_init(struct snd_soc_pcm_runtime *rtd)
+{
+	struct snd_soc_codec *codec = rtd->codec;
+	struct snd_soc_dapm_context *dapm = &codec->dapm;
+	int ret;
+
+	/* NC codec pins */
+	snd_soc_dapm_disable_pin(dapm, "LINPUT3");
+	snd_soc_dapm_disable_pin(dapm, "RINPUT3");
+	snd_soc_dapm_disable_pin(dapm, "OUT3");
+	snd_soc_dapm_disable_pin(dapm, "MONO1");
+
+	/* Jack detection API stuff */
+	ret = snd_soc_jack_new(codec, "Headset Jack", SND_JACK_HEADSET,
+				&hs_jack);
+	if (ret)
+		goto err;
+
+	ret = snd_soc_jack_add_pins(&hs_jack, ARRAY_SIZE(hs_jack_pins),
+				hs_jack_pins);
+	if (ret)
+		goto err;
+
+	ret = snd_soc_jack_add_gpios(&hs_jack, ARRAY_SIZE(hs_jack_gpios),
+				hs_jack_gpios);
+	if (ret)
+		goto err;
+
+	return 0;
+
+err:
+	return ret;
+}
+
+static struct snd_soc_ops z2_ops = {
+	.hw_params = z2_hw_params,
+};
+
+/* z2 digital audio interface glue - connects codec <--> CPU */
+static struct snd_soc_dai_link z2_dai = {
+	.name		= "wm8750",
+	.stream_name	= "WM8750",
+	.cpu_dai_name	= "pxa2xx-i2s",
+	.codec_dai_name	= "wm8750-hifi",
+	.platform_name = "pxa-pcm-audio",
+	.codec_name	= "wm8750.0-001a",
+	.init		= z2_wm8750_init,
+	.dai_fmt	= SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
+			  SND_SOC_DAIFMT_CBS_CFS,
+	.ops		= &z2_ops,
+};
+
+/* z2 audio machine driver */
+static struct snd_soc_card snd_soc_z2 = {
+	.name		= "FSC-Loox",
+	.owner		= THIS_MODULE,
+	.dai_link	= &z2_dai,
+	.num_links	= 1,
+
+	.controls = wm8750_loox_controls,
+	.num_controls = ARRAY_SIZE(wm8750_loox_controls),
+	.dapm_widgets = wm8750_dapm_widgets,
+	.num_dapm_widgets = ARRAY_SIZE(wm8750_dapm_widgets),
+	.dapm_routes = z2_audio_map,
+	.num_dapm_routes = ARRAY_SIZE(z2_audio_map),
+};
+
+static int loox_asoc_probe(struct platform_device *pdev)
+{
+	int ret;
+
+	gpio_request(LOOX5XX_EGPIO_SPK_POWER, "SPK_POWER");
+	gpio_request(GPIO_NR_LOOXC550_CRADLE_POWER, "Cradle Jack Power");
+
+	snd_soc_z2.dev = &pdev->dev;
+	ret = snd_soc_register_card(&snd_soc_z2);
+        if (unlikely(ret))
+                dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
+                        ret);
+	return ret;
+}
+
+static int __exit loox_asoc_remove(struct platform_device *pdev)
+{
+	snd_soc_unregister_card(&snd_soc_z2);
+	gpio_free(LOOX5XX_EGPIO_SPK_POWER);
+	return 0;
+}
+
+static struct platform_driver loox_wm8750_driver = {
+        .probe          = loox_asoc_probe,
+        .remove         = loox_asoc_remove,
+        .driver         = {
+                .name           = "loox-asoc",
+                .owner          = THIS_MODULE,
+        },
+};
+
+module_platform_driver(loox_wm8750_driver);
+
+MODULE_AUTHOR("David Heidelberger <david.heidelberger@ixit.cz>");
+MODULE_DESCRIPTION("ALSA SoC FSC Loox 500 series");
+MODULE_LICENSE("GPL");
diff --git a/sound/soc/pxa/loox7xx.h b/sound/soc/pxa/loox7xx.h
new file mode 100644
index 000000000000..6086859ac92a
--- /dev/null
+++ b/sound/soc/pxa/loox7xx.h
@@ -0,0 +1,52 @@
+#define LOOX_DAPM_NONE	0
+#define LOOX_DAPM_ENUM	1
+#define LOOX_DAPM_VOLSW	2
+
+struct loox_ctl_ {
+char *name;
+unsigned int type;
+unsigned int val;
+};
+
+/* kcontrols that are deactivated and thus not visible to higher software levels,
+   especially mixer programs. Kcontrols with type other than LOOX_DAPM_NONE are explicitly set
+   to value following, otherwise it is left as default (which should be 0)
+*/
+static const struct loox_ctl_ loox7xx_hidden_controls[] = {
+{"3D Switch",LOOX_DAPM_NONE,0}, 
+{ "3D Volume",LOOX_DAPM_NONE,0},
+{"3D Lower Cut-off",LOOX_DAPM_NONE,0},
+{"3D Upper Cut-off",LOOX_DAPM_NONE,0},
+{"3D Mode",LOOX_DAPM_NONE,0},
+{"Mono Mixer Left Playback Switch",LOOX_DAPM_NONE,0},
+{"Mono Mixer Left Bypass Switch",LOOX_DAPM_NONE,0},
+{"Mono Mixer Right Playback Switc",LOOX_DAPM_NONE,0},
+{"Mono Mixer Right Bypass Switch",LOOX_DAPM_NONE,0},
+{"Mono Playback Volume",LOOX_DAPM_NONE,0},
+{"Mono Playback ZC Switch",LOOX_DAPM_NONE,0},
+{"Bypass Right Playback Volume",LOOX_DAPM_NONE,0},
+{"Bypass Left Playback Volume",LOOX_DAPM_NONE,0},
+{"Bypass Mono Playback Volume",LOOX_DAPM_NONE,0},
+{"ZC Timeout Switch",LOOX_DAPM_NONE,0},
+{"Playback Invert Switch",LOOX_DAPM_NONE,0},
+{"Right Speaker Playback Invert Switch",LOOX_DAPM_NONE,0},
+{"Headphone Playback ZC Switch",LOOX_DAPM_NONE,0},
+{"Speaker Playback ZC Switch",LOOX_DAPM_NONE,0},
+{"Left Mixer Left Bypass Switch",LOOX_DAPM_NONE,0},
+{"Left Mixer Right Playback Switc",LOOX_DAPM_NONE,0},
+{"Left Mixer Right Bypass Switch",LOOX_DAPM_NONE,0},
+{"Right Mixer Left Playback Switc",LOOX_DAPM_NONE,0},
+{"Right Mixer Left Bypass Switch",LOOX_DAPM_NONE,0},
+{"Right Mixer Right Bypass Switch",LOOX_DAPM_NONE,0},
+{"Left Line Mux",LOOX_DAPM_NONE,0},
+{"Right Line Mux",LOOX_DAPM_NONE,0},
+{"Right PGA Mux",LOOX_DAPM_NONE,0},
+{"Speaker Playback Volume",LOOX_DAPM_NONE,0},
+{"Right Mixer Playback Switch",LOOX_DAPM_VOLSW,1},
+{"Left Mixer Playback Switch",LOOX_DAPM_VOLSW,1},
+{"Left PGA Mux", LOOX_DAPM_ENUM,0},
+{"Left ADC Mux", LOOX_DAPM_ENUM,1},
+{"Right ADC Mux", LOOX_DAPM_ENUM,1},
+{"Differential Mux", LOOX_DAPM_ENUM,0},
+{"Out3 Mux",LOOX_DAPM_ENUM,1},
+};
-- 
2.24.1