Advertisement
Guest User

Untitled

a guest
Jan 11th, 2015
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.19 KB | None | 0 0
  1. From 063eea0ad93d104e3de650154e15f264b1491e53 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Filip=20Matijevi=C4=87?= <filip.matijevic.pz@gmail.com>
  3. Date: Sun, 11 Jan 2015 22:01:05 +0100
  4. Subject: [PATCH] n950: fix touchscreen configuration
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8.  
  9. Signed-off-by: Filip Matijević <filip.matijevic.pz@gmail.com>
  10. ---
  11. arch/arm/mach-omap2/board-rm680.c | 69 ++++++++++++++++++++++++++++++++++++---
  12. 1 file changed, 64 insertions(+), 5 deletions(-)
  13.  
  14. diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
  15. index f9c0bcb..1dbaa15 100644
  16. --- a/arch/arm/mach-omap2/board-rm680.c
  17. +++ b/arch/arm/mach-omap2/board-rm680.c
  18. @@ -847,7 +847,7 @@ static void __init rm696_wl1273_init(void)
  19. }
  20. #endif
  21.  
  22. -static struct mxt_platform_data atmel_mxt_platform_data = {
  23. +static struct mxt_platform_data atmel_mxt_platform_data_rm696 = {
  24. .reset_gpio = ATMEL_MXT_RESET_GPIO,
  25. .int_gpio = ATMEL_MXT_IRQ_GPIO,
  26. .rlimit_min_interval_us = 7000,
  27. @@ -856,6 +856,15 @@ static struct mxt_platform_data atmel_mxt_platform_data = {
  28. .config = &atmel_mxt_pyrenees_config,
  29. };
  30.  
  31. +static struct mxt_platform_data atmel_mxt_platform_data_rm680 = {
  32. + .reset_gpio = ATMEL_MXT_RESET_GPIO,
  33. + .int_gpio = ATMEL_MXT_IRQ_GPIO,
  34. + .rlimit_min_interval_us = 7000,
  35. + .rlimit_bypass_time_us = 25000,
  36. + .wakeup_interval_ms = 50,
  37. + .config = &atmel_mxt_himalaya_config,
  38. +};
  39. +
  40. #if defined(CONFIG_SND_SOC_TLV320DAC33) || \
  41. defined(CONFIG_SND_SOC_TLV320DAC33_MODULE)
  42. static struct tlv320dac33_platform_data rm696_dac33_platform_data = {
  43. @@ -968,7 +977,48 @@ static struct i2c_board_info rm696_peripherals_i2c_board_info_2[] /*__initdata *
  44. {
  45. /* keep this first */
  46. I2C_BOARD_INFO("atmel_mxt", 0x4b),
  47. - .platform_data = &atmel_mxt_platform_data,
  48. + .platform_data = &atmel_mxt_platform_data_rm696,
  49. + },
  50. +
  51. +#if defined(CONFIG_SENSORS_APDS990X) || defined(CONFIG_SENSORS_APDS990X_MODULE)
  52. + {
  53. + /* keep this second */
  54. + I2C_BOARD_INFO("apds990x", 0x39),
  55. + .platform_data = &rm696_apds990x_data,
  56. + },
  57. +#endif
  58. +
  59. +#if defined(CONFIG_SND_SOC_TPA6130A2) || \
  60. + defined(CONFIG_SND_SOC_TPA6130A2_MODULE)
  61. + {
  62. + I2C_BOARD_INFO("tpa6140a2", 0x60),
  63. + .platform_data = &rm696_tpa6130a2_platform_data,
  64. + },
  65. +#endif
  66. +
  67. +#if defined(CONFIG_SND_SOC_TLV320DAC33) || \
  68. + defined(CONFIG_SND_SOC_TLV320DAC33_MODULE)
  69. + {
  70. + /*keep this third*/
  71. + I2C_BOARD_INFO("tlv320dac33", 0x19),
  72. + .platform_data = &rm696_dac33_platform_data,
  73. + },
  74. +#endif
  75. +
  76. +#if defined(CONFIG_LEDS_LP5521) || defined(CONFIG_LEDS_LP5521_MODULE)
  77. + {
  78. + I2C_BOARD_INFO("lp5521", 0x32),
  79. + .platform_data = &rm696_lp5521_platform_data,
  80. + },
  81. +#endif
  82. +
  83. +};
  84. +
  85. +static struct i2c_board_info rm680_peripherals_i2c_board_info_2[] /*__initdata */= {
  86. + {
  87. + /* keep this first */
  88. + I2C_BOARD_INFO("atmel_mxt", 0x4b),
  89. + .platform_data = &atmel_mxt_platform_data_rm680,
  90. },
  91.  
  92. #if defined(CONFIG_SENSORS_APDS990X) || defined(CONFIG_SENSORS_APDS990X_MODULE)
  93. @@ -1022,7 +1072,11 @@ static void __init rm696_apds990x_init(void)
  94. rm696_apds990x_data.pdrive = APDS_IRLED_CURR_50mA;
  95. }
  96.  
  97. - rm696_peripherals_i2c_board_info_2[1].irq = gpio_to_irq(APDS990X_GPIO);
  98. + if (!board_is_rm680()) {
  99. + rm696_peripherals_i2c_board_info_2[1].irq = gpio_to_irq(APDS990X_GPIO);
  100. + } else {
  101. + rm680_peripherals_i2c_board_info_2[1].irq = gpio_to_irq(APDS990X_GPIO);
  102. + }
  103. }
  104. #else
  105. static inline void rm696_apds990x_init(void) {}
  106. @@ -1438,8 +1492,13 @@ static void __init rm680_i2c_init(void)
  107. #endif
  108.  
  109. omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data);
  110. - omap_register_i2c_bus(2, 400, rm696_peripherals_i2c_board_info_2,
  111. - ARRAY_SIZE(rm696_peripherals_i2c_board_info_2));
  112. + if (!board_is_rm680()) {
  113. + omap_register_i2c_bus(2, 400, rm696_peripherals_i2c_board_info_2,
  114. + ARRAY_SIZE(rm696_peripherals_i2c_board_info_2));
  115. + } else {
  116. + omap_register_i2c_bus(2, 400, rm680_peripherals_i2c_board_info_2,
  117. + ARRAY_SIZE(rm680_peripherals_i2c_board_info_2));
  118. + }
  119. omap_register_i2c_bus(3, 400, rm696_peripherals_i2c_board_info_3,
  120. ARRAY_SIZE(rm696_peripherals_i2c_board_info_3));
  121. }
  122. --
  123. 2.1.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement