5c1fa3f962c848192104704dc230ff8db69e082c
[openembedded.git] /
1 From d0e8e774fdc82320822246fae3167302730bd7e8 Mon Sep 17 00:00:00 2001
2 From: Gregoire Gentil <gregoire@gentil.com>
3 Date: Fri, 12 Mar 2010 11:49:16 +0100
4 Subject: [PATCH 16/16] ARM: OMAP: omap3-touchbook: update boardfile
5
6 ---
7  arch/arm/mach-omap2/board-omap3touchbook.c |  408 +++++++++++++++++++++-------
8  1 files changed, 313 insertions(+), 95 deletions(-)
9
10 diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
11 index fc3e03c..ec7830e 100644
12 --- a/arch/arm/mach-omap2/board-omap3touchbook.c
13 +++ b/arch/arm/mach-omap2/board-omap3touchbook.c
14 @@ -1,7 +1,7 @@
15  /*
16   * linux/arch/arm/mach-omap2/board-omap3touchbook.c
17   *
18 - * Copyright (C) 2009 Always Innovating
19 + * Copyright (C) 2009-2010 Always Innovating
20   *
21   * Modified from mach-omap2/board-omap3beagleboard.c
22   *
23 @@ -33,6 +33,7 @@
24  #include <linux/spi/spi.h>
25  
26  #include <linux/spi/ads7846.h>
27 +#include <linux/mma7455l.h>
28  
29  #include <linux/regulator/machine.h>
30  #include <linux/i2c/twl.h>
31 @@ -45,6 +46,7 @@
32  
33  #include <plat/board.h>
34  #include <plat/common.h>
35 +#include <plat/display.h>
36  #include <plat/gpmc.h>
37  #include <plat/nand.h>
38  #include <plat/usb.h>
39 @@ -60,18 +62,22 @@
40  
41  #include <asm/setup.h>
42  
43 +#include <plat/dmtimer.h>
44 +#include <linux/backlight.h>
45  
46  #define GPMC_CS0_BASE  0x60
47  #define GPMC_CS_SIZE   0x30
48  
49  #define NAND_BLOCK_SIZE                SZ_128K
50  
51 +#define OMAP3_HJ_GPIO          56
52  #define OMAP3_AC_GPIO          136
53 +#define OMAP3_TS2_GPIO         154
54  #define OMAP3_TS_GPIO          162
55  #define TB_BL_PWM_TIMER                9
56  #define TB_KILL_POWER_GPIO     168
57  
58 -unsigned long touchbook_revision;
59 +unsigned long ai_revision = 2;
60  
61  static struct mtd_partition omap3touchbook_nand_partitions[] = {
62         /* All the partition sizes are listed in terms of NAND block size */
63 @@ -126,6 +132,103 @@ static struct platform_device omap3touchbook_nand_device = {
64         .resource       = &omap3touchbook_nand_resource,
65  };
66  
67 +static int touchbook_enable_dvi(struct omap_dss_device *dssdev)
68 +{
69 +       if (dssdev->reset_gpio != -1)
70 +               gpio_set_value(dssdev->reset_gpio, 1);
71 +
72 +       return 0;
73 +}
74 +
75 +static void touchbook_disable_dvi(struct omap_dss_device *dssdev)
76 +{
77 +       if (dssdev->reset_gpio != -1)
78 +               gpio_set_value(dssdev->reset_gpio, 0);
79 +}
80 +
81 +static struct omap_dss_device touchbook_dvi_device = {
82 +       .type = OMAP_DISPLAY_TYPE_DPI,
83 +       .name = "dvi",
84 +       .driver_name = "generic_panel",
85 +       .phy.dpi.data_lines = 24,
86 +       .reset_gpio = 176,
87 +       .platform_enable = touchbook_enable_dvi,
88 +       .platform_disable = touchbook_disable_dvi,
89 +};
90 +
91 +static int touchbook_panel_enable_tv(struct omap_dss_device *dssdev)
92 +{
93 +#define ENABLE_VDAC_DEDICATED           0x03
94 +#define ENABLE_VDAC_DEV_GRP             0x20
95 +
96 +       twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
97 +                       ENABLE_VDAC_DEDICATED,
98 +                       TWL4030_VDAC_DEDICATED);
99 +       twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
100 +                       ENABLE_VDAC_DEV_GRP, TWL4030_VDAC_DEV_GRP);
101 +
102 +       return 0;
103 +}
104 +
105 +static void touchbook_panel_disable_tv(struct omap_dss_device *dssdev)
106 +{
107 +       twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00,
108 +                       TWL4030_VDAC_DEDICATED);
109 +       twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00,
110 +                       TWL4030_VDAC_DEV_GRP);
111 +}
112 +
113 +static struct omap_dss_device touchbook_tv_device = {
114 +       .name = "tv",
115 +       .driver_name = "venc",
116 +       .type = OMAP_DISPLAY_TYPE_VENC,
117 +       .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
118 +       .platform_enable = touchbook_panel_enable_tv,
119 +       .platform_disable = touchbook_panel_disable_tv,
120 +};
121 +
122 +static struct omap_dss_device *touchbook_dss_devices[] = {
123 +       &touchbook_dvi_device,
124 +       &touchbook_tv_device,
125 +};
126 +
127 +static struct omap_dss_board_info touchbook_dss_data = {
128 +       .num_devices = ARRAY_SIZE(touchbook_dss_devices),
129 +       .devices = touchbook_dss_devices,
130 +       .default_device = &touchbook_dvi_device,
131 +};
132 +
133 +static struct platform_device touchbook_dss_device = {
134 +       .name           = "omapdss",
135 +       .id             = -1,
136 +       .dev            = {
137 +               .platform_data = &touchbook_dss_data,
138 +       },
139 +};
140 +
141 +static struct regulator_consumer_supply touchbook_vdac_supply = {
142 +       .supply         = "vdda_dac",
143 +       .dev            = &touchbook_dss_device.dev,
144 +};
145 +
146 +static struct regulator_consumer_supply touchbook_vdvi_supply = {
147 +       .supply         = "vdds_dsi",
148 +       .dev            = &touchbook_dss_device.dev,
149 +};
150 +
151 +static void __init touchbook_display_init(void)
152 +{
153 +       int r;
154 +
155 +       r = gpio_request(touchbook_dvi_device.reset_gpio, "DVI reset");
156 +       if (r < 0) {
157 +               printk(KERN_ERR "Unable to get DVI reset GPIO\n");
158 +               return;
159 +       }
160 +
161 +       gpio_direction_output(touchbook_dvi_device.reset_gpio, 0);
162 +}
163 +
164  #include "sdram-micron-mt46h32m32lf-6.h"
165  
166  static struct twl4030_hsmmc_info mmc[] = {
167 @@ -137,15 +240,6 @@ static struct twl4030_hsmmc_info mmc[] = {
168         {}      /* Terminator */
169  };
170  
171 -static struct platform_device omap3_touchbook_lcd_device = {
172 -       .name           = "omap3touchbook_lcd",
173 -       .id             = -1,
174 -};
175 -
176 -static struct omap_lcd_config omap3_touchbook_lcd_config __initdata = {
177 -       .ctrl_name      = "internal",
178 -};
179 -
180  static struct regulator_consumer_supply touchbook_vmmc1_supply = {
181         .supply                 = "vmmc",
182  };
183 @@ -177,6 +271,7 @@ static int touchbook_twl_gpio_setup(struct device *dev,
184          * power switch and overcurrent detect
185          */
186  
187 +#if 0
188         gpio_request(gpio + 1, "EHCI_nOC");
189         gpio_direction_input(gpio + 1);
190  
191 @@ -187,6 +282,7 @@ static int touchbook_twl_gpio_setup(struct device *dev,
192         /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
193         gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
194  
195 +#endif
196         return 0;
197  }
198  
199 @@ -201,16 +297,6 @@ static struct twl4030_gpio_platform_data touchbook_gpio_data = {
200         .setup          = touchbook_twl_gpio_setup,
201  };
202  
203 -static struct regulator_consumer_supply touchbook_vdac_supply = {
204 -       .supply         = "vdac",
205 -       .dev            = &omap3_touchbook_lcd_device.dev,
206 -};
207 -
208 -static struct regulator_consumer_supply touchbook_vdvi_supply = {
209 -       .supply         = "vdvi",
210 -       .dev            = &omap3_touchbook_lcd_device.dev,
211 -};
212 -
213  /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
214  static struct regulator_init_data touchbook_vmmc1 = {
215         .constraints = {
216 @@ -283,6 +369,10 @@ static struct twl4030_codec_data touchbook_codec_data = {
217         .audio = &touchbook_audio_data,
218  };
219  
220 +static struct twl4030_madc_platform_data touchbook_madc_data = {
221 +       .irq_line       = 1,
222 +};
223 +
224  static struct twl4030_platform_data touchbook_twldata = {
225         .irq_base       = TWL4030_IRQ_BASE,
226         .irq_end        = TWL4030_IRQ_END,
227 @@ -291,6 +381,7 @@ static struct twl4030_platform_data touchbook_twldata = {
228         .usb            = &touchbook_usb_data,
229         .gpio           = &touchbook_gpio_data,
230         .codec          = &touchbook_codec_data,
231 +       .madc           = &touchbook_madc_data,
232         .vmmc1          = &touchbook_vmmc1,
233         .vsim           = &touchbook_vsim,
234         .vdac           = &touchbook_vdac,
235 @@ -310,10 +401,18 @@ static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = {
236         {
237                 I2C_BOARD_INFO("bq27200", 0x55),
238         },
239 +       {
240 +               I2C_BOARD_INFO("chacha", 0x40),
241 +               .irq = OMAP_GPIO_IRQ(OMAP3_TS2_GPIO),
242 +       },
243 +       {
244 +               I2C_BOARD_INFO("ds1307", 0x68),
245 +       },
246  };
247  
248  static int __init omap3_touchbook_i2c_init(void)
249  {
250 +       int ret;
251         /* Standard TouchBook bus */
252         omap_register_i2c_bus(1, 2600, touchbook_i2c_boardinfo,
253                         ARRAY_SIZE(touchbook_i2c_boardinfo));
254 @@ -322,53 +421,16 @@ static int __init omap3_touchbook_i2c_init(void)
255         omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo,
256                         ARRAY_SIZE(touchBook_i2c_boardinfo));
257  
258 -       return 0;
259 -}
260 -
261 -static void __init omap3_ads7846_init(void)
262 -{
263 -       if (gpio_request(OMAP3_TS_GPIO, "ads7846_pen_down")) {
264 -               printk(KERN_ERR "Failed to request GPIO %d for "
265 -                               "ads7846 pen down IRQ\n", OMAP3_TS_GPIO);
266 -               return;
267 +       ret = gpio_request(OMAP3_TS2_GPIO, "chacha");
268 +       if (ret < 0) {
269 +               printk(KERN_ERR "Failed to request GPIO %d for chacha IRQ\n", OMAP3_TS2_GPIO);
270 +               return 0;
271         }
272 +       gpio_direction_input(OMAP3_TS2_GPIO);
273  
274 -       gpio_direction_input(OMAP3_TS_GPIO);
275 -       omap_set_gpio_debounce(OMAP3_TS_GPIO, 1);
276 -       omap_set_gpio_debounce_time(OMAP3_TS_GPIO, 0xa);
277 +       return 0;
278  }
279  
280 -static struct ads7846_platform_data ads7846_config = {
281 -       .x_min                  = 100,
282 -       .y_min                  = 265,
283 -       .x_max                  = 3950,
284 -       .y_max                  = 3750,
285 -       .x_plate_ohms           = 40,
286 -       .pressure_max           = 255,
287 -       .debounce_max           = 10,
288 -       .debounce_tol           = 5,
289 -       .debounce_rep           = 1,
290 -       .gpio_pendown           = OMAP3_TS_GPIO,
291 -       .keep_vref_on           = 1,
292 -};
293 -
294 -static struct omap2_mcspi_device_config ads7846_mcspi_config = {
295 -       .turbo_mode     = 0,
296 -       .single_channel = 1,    /* 0: slave, 1: master */
297 -};
298 -
299 -static struct spi_board_info omap3_ads7846_spi_board_info[] __initdata = {
300 -       {
301 -               .modalias               = "ads7846",
302 -               .bus_num                = 4,
303 -               .chip_select            = 0,
304 -               .max_speed_hz           = 1500000,
305 -               .controller_data        = &ads7846_mcspi_config,
306 -               .irq                    = OMAP_GPIO_IRQ(OMAP3_TS_GPIO),
307 -               .platform_data          = &ads7846_config,
308 -       }
309 -};
310 -
311  static struct gpio_led gpio_leds[] = {
312         {
313                 .name                   = "touchbook::usr0",
314 @@ -412,6 +474,7 @@ static struct gpio_keys_button gpio_buttons[] = {
315                 .gpio                   = 183,
316                 .desc                   = "power",
317                 .wakeup                 = 1,
318 +               .active_low             = 1,
319         },
320  };
321  
322 @@ -428,23 +491,8 @@ static struct platform_device keys_gpio = {
323         },
324  };
325  
326 -static struct omap_board_config_kernel omap3_touchbook_config[] __initdata = {
327 -       { OMAP_TAG_LCD,         &omap3_touchbook_lcd_config },
328 -};
329 -
330 -#ifdef CONFIG_OMAP_MUX
331 -static struct omap_board_mux board_mux[] __initdata = {
332 -       { .reg_offset = OMAP_MUX_TERMINATOR },
333 -};
334 -#else
335 -#define board_mux      NULL
336 -#endif
337 -
338  static void __init omap3_touchbook_init_irq(void)
339  {
340 -       omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
341 -       omap_board_config = omap3_touchbook_config;
342 -       omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config);
343         omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
344                              mt46h32m32lf6_sdrc_params, omap35x_mpu_rate_table,
345                              omap35x_dsp_rate_table, omap35x_l3_rate_table);
346 @@ -456,9 +504,9 @@ static void __init omap3_touchbook_init_irq(void)
347  }
348  
349  static struct platform_device *omap3_touchbook_devices[] __initdata = {
350 -       &omap3_touchbook_lcd_device,
351         &leds_gpio,
352         &keys_gpio,
353 +       &touchbook_dss_device,
354  };
355  
356  static void __init omap3touchbook_flash_init(void)
357 @@ -500,7 +548,7 @@ static void __init omap3touchbook_flash_init(void)
358         }
359  }
360  
361 -static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
362 +static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
363  
364         .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
365         .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
366 @@ -512,6 +560,170 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
367         .reset_gpio_port[2]  = -EINVAL
368  };
369  
370 +#ifdef CONFIG_OMAP_MUX
371 +static struct omap_board_mux board_mux[] __initdata = {
372 +       { .reg_offset = OMAP_MUX_TERMINATOR },
373 +};
374 +#else
375 +#define board_mux      NULL
376 +#endif
377 +
378 +static struct ads7846_platform_data ads7846_config = {
379 +       .x_min                  = 100,
380 +       .y_min                  = 265,
381 +       .x_max                  = 3950,
382 +       .y_max                  = 3750,
383 +       .x_plate_ohms           = 40,
384 +       .pressure_max           = 255,
385 +       .debounce_max           = 10,
386 +       .debounce_tol           = 5,
387 +       .debounce_rep           = 1,
388 +       .gpio_pendown           = OMAP3_TS_GPIO,
389 +       .keep_vref_on           = 1,
390 +};
391 +
392 +static struct omap2_mcspi_device_config ads7846_mcspi_config = {
393 +       .turbo_mode     = 0,
394 +       .single_channel = 1,    /* 0: slave, 1: master */
395 +};
396 +
397 +static struct spi_board_info omap3_ads7846_spi_board_info[] __initdata = {
398 +       {
399 +               .modalias               = "ads7846",
400 +               .bus_num                = 4,
401 +               .chip_select            = 0,
402 +               .max_speed_hz           = 1500000,
403 +               .controller_data        = &ads7846_mcspi_config,
404 +               .irq                    = OMAP_GPIO_IRQ(OMAP3_TS_GPIO),
405 +               .platform_data          = &ads7846_config,
406 +       }
407 +};
408 +
409 +static void __init omap3_ads7846_init(void)
410 +{
411 +       if (gpio_request(OMAP3_TS_GPIO, "ads7846_pen_down")) {
412 +               printk(KERN_ERR "Failed to request GPIO %d for "
413 +                               "ads7846 pen down IRQ\n", OMAP3_TS_GPIO);
414 +               return;
415 +       }
416 +
417 +       gpio_direction_input(OMAP3_TS_GPIO);
418 +       omap_set_gpio_debounce(OMAP3_TS_GPIO, 1);
419 +       omap_set_gpio_debounce_time(OMAP3_TS_GPIO, 0xa);
420 +}
421 +
422 +static struct mma7455l_platform_data mma7455l_config = {
423 +       .calibration_x = -4,
424 +       .calibration_y = 28,
425 +       .calibration_z = -28,
426 +};
427 +
428 +static struct omap2_mcspi_device_config mma7455l_mcspi_config = {
429 +       .turbo_mode     = 0,
430 +       .single_channel = 1,    /* 0: slave, 1: master */
431 +};
432 +
433 +static struct spi_board_info omap3_mma7455l_spi_board_info[] __initdata = {
434 +       {
435 +               .modalias               = "mma7455l",
436 +               .bus_num                = 3,
437 +               .chip_select            = 0,
438 +               .max_speed_hz           = 200000,
439 +               .irq                    = OMAP_GPIO_IRQ(OMAP3_AC_GPIO),
440 +               .controller_data        = &mma7455l_mcspi_config, //(void *) 135,
441 +               .platform_data          = &mma7455l_config,
442 +       }
443 +};
444 +
445 +static void __init omap3_mma7455l_init(void)
446 +{
447 +       int ret;
448 +
449 +       ret = gpio_request(OMAP3_AC_GPIO, "mma7455l");
450 +       if (ret < 0) {
451 +               printk(KERN_ERR "Failed to request GPIO %d for mma7455l IRQ\n", OMAP3_AC_GPIO);
452 +               return;
453 +       }
454 +
455 +       gpio_direction_input(OMAP3_AC_GPIO);
456 +}
457 +
458 +static int touchbook_backlight_brightness = 50;
459 +static struct omap_dm_timer *touchbook_backlight_pwm;
460 +
461 +static int touchbook_backlight_read(struct backlight_device *bd)
462 +{
463 +       return touchbook_backlight_brightness;
464 +}
465 +
466 +static int touchbook_backlight_update(struct backlight_device *bd)
467 +{
468 +       int value = bd->props.brightness;
469 +       touchbook_backlight_brightness = value;
470 +
471 +       /* Frequency calculation:
472 +          - For 200Hz PWM, you want to load -164 (=> -32768Hz / 200Hz).
473 +          - Minimum duty cycle for the backlight is 15%.
474 +          - You have (164*0.85) => ~140 levels of brightness.
475 +       */
476 +
477 +       /* Halve input brightness */
478 +       if (!bd->props.boost)
479 +               value /= 2;
480 +
481 +       /* For maximum brightness, just stop the timer... */
482 +       if(value != bd->props.max_brightness)
483 +       {
484 +               /* Load the appropriate value for 200Hz PWM */
485 +               u32 period = clk_get_rate(omap_dm_timer_get_fclk(touchbook_backlight_pwm)) / bd->props.pwm_fq;
486 +
487 +               /* Minimum duty cycle is 15% */
488 +               u32 minimum = (period * bd->props.min_duty) / 100;
489 +               u32 maximum = (period * 17) / 20;
490 +
491 +               /* Work out match value */
492 +               u32 match = (maximum * value) / 100;
493 +
494 +               /* Start... */
495 +               omap_dm_timer_set_load(touchbook_backlight_pwm, 1, 0xFFFFFFFF - period - 1);
496 +               omap_dm_timer_set_match(touchbook_backlight_pwm, 1, 0xFFFFFFFF - minimum - match);
497 +               omap_dm_timer_write_counter(touchbook_backlight_pwm, -1);
498 +               omap_dm_timer_start(touchbook_backlight_pwm);
499 +       }
500 +       else
501 +               omap_dm_timer_stop(touchbook_backlight_pwm);
502 +
503 +
504 +       return 0;
505 +}
506 +
507 +static struct backlight_ops touchbook_backlight_properties = {
508 +       .get_brightness = touchbook_backlight_read,
509 +       .update_status = touchbook_backlight_update,
510 +};
511 +
512 +static void __init omap3_touchbook_backlight_init(void)
513 +{
514 +       static struct backlight_device *bd;
515 +       bd = backlight_device_register("touchbook", NULL, NULL, &touchbook_backlight_properties);
516 +
517 +       if(bd)
518 +       {
519 +               touchbook_backlight_pwm = omap_dm_timer_request_specific(TB_BL_PWM_TIMER);
520 +               omap_dm_timer_enable(touchbook_backlight_pwm);
521 +               omap_dm_timer_set_source(touchbook_backlight_pwm, OMAP_TIMER_SRC_SYS_CLK);
522 +               omap_dm_timer_set_pwm(touchbook_backlight_pwm, 1, 1, OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE);
523 +
524 +               bd->props.max_brightness = 100;
525 +               bd->props.brightness = touchbook_backlight_brightness;
526 +               bd->props.boost = 0;
527 +               bd->props.min_duty = 15;
528 +               bd->props.pwm_fq = 200;
529 +       }
530 +
531 +       touchbook_backlight_update(bd);
532 +}
533 +
534  static void omap3_touchbook_poweroff(void)
535  {
536         int r;
537 @@ -525,33 +737,26 @@ static void omap3_touchbook_poweroff(void)
538         gpio_direction_output(TB_KILL_POWER_GPIO, 0);
539  }
540  
541 -static void __init early_touchbook_revision(char **p)
542 +static int __init ai_revision_instance(char *str)
543  {
544 -       if (!*p)
545 -               return;
546 +       if (!str)
547 +               return -EINVAL;
548 +
549 +       ai_revision = simple_strtoul(str, NULL, 10);
550  
551 -       strict_strtoul(*p, 10, &touchbook_revision);
552 +       return 0;
553  }
554 -__early_param("tbr=", early_touchbook_revision);
555  
556  static void __init omap3_touchbook_init(void)
557  {
558         pm_power_off = omap3_touchbook_poweroff;
559  
560 +       omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
561         omap3_touchbook_i2c_init();
562         platform_add_devices(omap3_touchbook_devices,
563                         ARRAY_SIZE(omap3_touchbook_devices));
564         omap_serial_init();
565  
566 -       omap_mux_init_gpio(170, OMAP_PIN_INPUT);
567 -       gpio_request(176, "DVI_nPD");
568 -       /* REVISIT leave DVI powered down until it's needed ... */
569 -       gpio_direction_output(176, true);
570 -
571 -       /* Touchscreen and accelerometer */
572 -       spi_register_board_info(omap3_ads7846_spi_board_info,
573 -                               ARRAY_SIZE(omap3_ads7846_spi_board_info));
574 -       omap3_ads7846_init();
575         usb_musb_init();
576         usb_ehci_init(&ehci_pdata);
577         omap3touchbook_flash_init();
578 @@ -559,6 +764,17 @@ static void __init omap3_touchbook_init(void)
579         /* Ensure SDRC pins are mux'd for self-refresh */
580         omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
581         omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
582 +
583 +       touchbook_display_init();
584 +       omap3_touchbook_backlight_init();
585 +
586 +       /* Touchscreen and accelerometer */
587 +       spi_register_board_info(omap3_ads7846_spi_board_info,
588 +                               ARRAY_SIZE(omap3_ads7846_spi_board_info));
589 +       spi_register_board_info(omap3_mma7455l_spi_board_info,
590 +                               ARRAY_SIZE(omap3_mma7455l_spi_board_info));
591 +       omap3_ads7846_init();
592 +       omap3_mma7455l_init();
593  }
594  
595  static void __init omap3_touchbook_map_io(void)
596 @@ -567,6 +783,8 @@ static void __init omap3_touchbook_map_io(void)
597         omap2_map_common_io();
598  }
599  
600 +early_param("air", ai_revision_instance);
601 +
602  MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
603         /* Maintainer: Gregoire Gentil - http://www.alwaysinnovating.com */
604         .phys_io        = 0x48000000,
605 -- 
606 1.6.6.1
607