diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2011-03-11 01:48:28 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-03-11 01:48:28 -0500 |
commit | a9518cde232960875a1f03ba00c112f56872cf60 (patch) | |
tree | aad88e27bcc88ce30044db41ffb3d0ba423f06c6 | |
parent | 4dbe8460e4c0ec7a242b6ac657be271ed86972c6 (diff) | |
parent | d73af18330ca5c17e03d36d436b5642ae764467f (diff) |
Merge branch 'next-s3c2440-gta02' into for-next
-rw-r--r-- | arch/arm/mach-s3c2440/mach-gta02.c | 71 |
1 files changed, 54 insertions, 17 deletions
diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index 9f2c14ec7181..d217ef3cd86a 100644 --- a/arch/arm/mach-s3c2440/mach-gta02.c +++ b/arch/arm/mach-s3c2440/mach-gta02.c | |||
@@ -58,6 +58,9 @@ | |||
58 | #include <linux/mfd/pcf50633/pmic.h> | 58 | #include <linux/mfd/pcf50633/pmic.h> |
59 | #include <linux/mfd/pcf50633/backlight.h> | 59 | #include <linux/mfd/pcf50633/backlight.h> |
60 | 60 | ||
61 | #include <linux/input.h> | ||
62 | #include <linux/gpio_keys.h> | ||
63 | |||
61 | #include <asm/mach/arch.h> | 64 | #include <asm/mach/arch.h> |
62 | #include <asm/mach/map.h> | 65 | #include <asm/mach/map.h> |
63 | #include <asm/mach/irq.h> | 66 | #include <asm/mach/irq.h> |
@@ -86,6 +89,8 @@ | |||
86 | #include <plat/udc.h> | 89 | #include <plat/udc.h> |
87 | #include <plat/gpio-cfg.h> | 90 | #include <plat/gpio-cfg.h> |
88 | #include <plat/iic.h> | 91 | #include <plat/iic.h> |
92 | #include <plat/ts.h> | ||
93 | |||
89 | 94 | ||
90 | static struct pcf50633 *gta02_pcf; | 95 | static struct pcf50633 *gta02_pcf; |
91 | 96 | ||
@@ -280,9 +285,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = { | |||
280 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 285 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
281 | .always_on = 1, | 286 | .always_on = 1, |
282 | .apply_uV = 1, | 287 | .apply_uV = 1, |
283 | .state_mem = { | ||
284 | .enabled = 1, | ||
285 | }, | ||
286 | }, | 288 | }, |
287 | }, | 289 | }, |
288 | [PCF50633_REGULATOR_DOWN1] = { | 290 | [PCF50633_REGULATOR_DOWN1] = { |
@@ -301,9 +303,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = { | |||
301 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 303 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
302 | .apply_uV = 1, | 304 | .apply_uV = 1, |
303 | .always_on = 1, | 305 | .always_on = 1, |
304 | .state_mem = { | ||
305 | .enabled = 1, | ||
306 | }, | ||
307 | }, | 306 | }, |
308 | }, | 307 | }, |
309 | [PCF50633_REGULATOR_HCLDO] = { | 308 | [PCF50633_REGULATOR_HCLDO] = { |
@@ -311,8 +310,8 @@ struct pcf50633_platform_data gta02_pcf_pdata = { | |||
311 | .min_uV = 2000000, | 310 | .min_uV = 2000000, |
312 | .max_uV = 3300000, | 311 | .max_uV = 3300000, |
313 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 312 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
314 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | 313 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | |
315 | .always_on = 1, | 314 | REGULATOR_CHANGE_STATUS, |
316 | }, | 315 | }, |
317 | }, | 316 | }, |
318 | [PCF50633_REGULATOR_LDO1] = { | 317 | [PCF50633_REGULATOR_LDO1] = { |
@@ -320,10 +319,8 @@ struct pcf50633_platform_data gta02_pcf_pdata = { | |||
320 | .min_uV = 3300000, | 319 | .min_uV = 3300000, |
321 | .max_uV = 3300000, | 320 | .max_uV = 3300000, |
322 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 321 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
322 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
323 | .apply_uV = 1, | 323 | .apply_uV = 1, |
324 | .state_mem = { | ||
325 | .enabled = 0, | ||
326 | }, | ||
327 | }, | 324 | }, |
328 | }, | 325 | }, |
329 | [PCF50633_REGULATOR_LDO2] = { | 326 | [PCF50633_REGULATOR_LDO2] = { |
@@ -347,6 +344,7 @@ struct pcf50633_platform_data gta02_pcf_pdata = { | |||
347 | .min_uV = 3200000, | 344 | .min_uV = 3200000, |
348 | .max_uV = 3200000, | 345 | .max_uV = 3200000, |
349 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 346 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
347 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
350 | .apply_uV = 1, | 348 | .apply_uV = 1, |
351 | }, | 349 | }, |
352 | }, | 350 | }, |
@@ -355,10 +353,8 @@ struct pcf50633_platform_data gta02_pcf_pdata = { | |||
355 | .min_uV = 3000000, | 353 | .min_uV = 3000000, |
356 | .max_uV = 3000000, | 354 | .max_uV = 3000000, |
357 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 355 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
356 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
358 | .apply_uV = 1, | 357 | .apply_uV = 1, |
359 | .state_mem = { | ||
360 | .enabled = 1, | ||
361 | }, | ||
362 | }, | 358 | }, |
363 | }, | 359 | }, |
364 | [PCF50633_REGULATOR_LDO6] = { | 360 | [PCF50633_REGULATOR_LDO6] = { |
@@ -373,9 +369,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = { | |||
373 | .min_uV = 1800000, | 369 | .min_uV = 1800000, |
374 | .max_uV = 1800000, | 370 | .max_uV = 1800000, |
375 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 371 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
376 | .state_mem = { | ||
377 | .enabled = 1, | ||
378 | }, | ||
379 | }, | 372 | }, |
380 | }, | 373 | }, |
381 | 374 | ||
@@ -489,6 +482,43 @@ static struct s3c2410_hcd_info gta02_usb_info __initdata = { | |||
489 | }, | 482 | }, |
490 | }; | 483 | }; |
491 | 484 | ||
485 | /* Touchscreen */ | ||
486 | static struct s3c2410_ts_mach_info gta02_ts_info = { | ||
487 | .delay = 10000, | ||
488 | .presc = 0xff, /* slow as we can go */ | ||
489 | .oversampling_shift = 2, | ||
490 | }; | ||
491 | |||
492 | /* Buttons */ | ||
493 | static struct gpio_keys_button gta02_buttons[] = { | ||
494 | { | ||
495 | .gpio = GTA02_GPIO_AUX_KEY, | ||
496 | .code = KEY_PHONE, | ||
497 | .desc = "Aux", | ||
498 | .type = EV_KEY, | ||
499 | .debounce_interval = 100, | ||
500 | }, | ||
501 | { | ||
502 | .gpio = GTA02_GPIO_HOLD_KEY, | ||
503 | .code = KEY_PAUSE, | ||
504 | .desc = "Hold", | ||
505 | .type = EV_KEY, | ||
506 | .debounce_interval = 100, | ||
507 | }, | ||
508 | }; | ||
509 | |||
510 | static struct gpio_keys_platform_data gta02_buttons_pdata = { | ||
511 | .buttons = gta02_buttons, | ||
512 | .nbuttons = ARRAY_SIZE(gta02_buttons), | ||
513 | }; | ||
514 | |||
515 | static struct platform_device gta02_buttons_device = { | ||
516 | .name = "gpio-keys", | ||
517 | .id = -1, | ||
518 | .dev = { | ||
519 | .platform_data = >a02_buttons_pdata, | ||
520 | }, | ||
521 | }; | ||
492 | 522 | ||
493 | static void __init gta02_map_io(void) | 523 | static void __init gta02_map_io(void) |
494 | { | 524 | { |
@@ -509,7 +539,11 @@ static struct platform_device *gta02_devices[] __initdata = { | |||
509 | >a02_nor_flash, | 539 | >a02_nor_flash, |
510 | &s3c24xx_pwm_device, | 540 | &s3c24xx_pwm_device, |
511 | &s3c_device_iis, | 541 | &s3c_device_iis, |
542 | &samsung_asoc_dma, | ||
512 | &s3c_device_i2c0, | 543 | &s3c_device_i2c0, |
544 | >a02_buttons_device, | ||
545 | &s3c_device_adc, | ||
546 | &s3c_device_ts, | ||
513 | }; | 547 | }; |
514 | 548 | ||
515 | /* These guys DO need to be children of PMU. */ | 549 | /* These guys DO need to be children of PMU. */ |
@@ -559,6 +593,7 @@ static void __init gta02_machine_init(void) | |||
559 | #endif | 593 | #endif |
560 | 594 | ||
561 | s3c24xx_udc_set_platdata(>a02_udc_cfg); | 595 | s3c24xx_udc_set_platdata(>a02_udc_cfg); |
596 | s3c24xx_ts_set_platdata(>a02_ts_info); | ||
562 | s3c_ohci_set_platdata(>a02_usb_info); | 597 | s3c_ohci_set_platdata(>a02_usb_info); |
563 | s3c_nand_set_platdata(>a02_nand_info); | 598 | s3c_nand_set_platdata(>a02_nand_info); |
564 | s3c_i2c0_set_platdata(NULL); | 599 | s3c_i2c0_set_platdata(NULL); |
@@ -567,6 +602,8 @@ static void __init gta02_machine_init(void) | |||
567 | 602 | ||
568 | platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices)); | 603 | platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices)); |
569 | pm_power_off = gta02_poweroff; | 604 | pm_power_off = gta02_poweroff; |
605 | |||
606 | regulator_has_full_constraints(); | ||
570 | } | 607 | } |
571 | 608 | ||
572 | 609 | ||