Advertisement
Guest User

Untitled

a guest
Jan 12th, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.48 KB | None | 0 0
  1. From a3f4e1314cfbc5e88a7cc163cf32448fa92eb102 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Filip=20Matijevi=C4=87?= <filip.matijevic.pz@gmail.com>
  3. Date: Mon, 12 Jan 2015 11:50:25 +0100
  4. Subject: [PATCH] n950: fix accelerometer 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 | 50 +++++++++++++++++++++++----------------
  12. 1 file changed, 29 insertions(+), 21 deletions(-)
  13.  
  14. diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
  15. index dc7d8c8..d042e15 100644
  16. --- a/arch/arm/mach-omap2/board-rm680.c
  17. +++ b/arch/arm/mach-omap2/board-rm680.c
  18. @@ -988,14 +988,6 @@ static struct i2c_board_info rm696_peripherals_i2c_board_info_2[] /*__initdata *
  19. },
  20. #endif
  21.  
  22. -#if defined(CONFIG_SND_SOC_TPA6130A2) || \
  23. - defined(CONFIG_SND_SOC_TPA6130A2_MODULE)
  24. - {
  25. - I2C_BOARD_INFO("tpa6140a2", 0x60),
  26. - .platform_data = &rm696_tpa6130a2_platform_data,
  27. - },
  28. -#endif
  29. -
  30. #if defined(CONFIG_SND_SOC_TLV320DAC33) || \
  31. defined(CONFIG_SND_SOC_TLV320DAC33_MODULE)
  32. {
  33. @@ -1004,7 +996,15 @@ static struct i2c_board_info rm696_peripherals_i2c_board_info_2[] /*__initdata *
  34. .platform_data = &rm696_dac33_platform_data,
  35. },
  36. #endif
  37. -
  38. +
  39. +#if defined(CONFIG_SND_SOC_TPA6130A2) || \
  40. + defined(CONFIG_SND_SOC_TPA6130A2_MODULE)
  41. + {
  42. + I2C_BOARD_INFO("tpa6140a2", 0x60),
  43. + .platform_data = &rm696_tpa6130a2_platform_data,
  44. + },
  45. +#endif
  46. +
  47. #if defined(CONFIG_LEDS_LP5521) || defined(CONFIG_LEDS_LP5521_MODULE)
  48. {
  49. I2C_BOARD_INFO("lp5521", 0x32),
  50. @@ -1029,14 +1029,6 @@ static struct i2c_board_info rm680_peripherals_i2c_board_info_2[] /*__initdata *
  51. },
  52. #endif
  53.  
  54. -#if defined(CONFIG_SND_SOC_TPA6130A2) || \
  55. - defined(CONFIG_SND_SOC_TPA6130A2_MODULE)
  56. - {
  57. - I2C_BOARD_INFO("tpa6140a2", 0x60),
  58. - .platform_data = &rm696_tpa6130a2_platform_data,
  59. - },
  60. -#endif
  61. -
  62. #if defined(CONFIG_SND_SOC_TLV320DAC33) || \
  63. defined(CONFIG_SND_SOC_TLV320DAC33_MODULE)
  64. {
  65. @@ -1045,7 +1037,15 @@ static struct i2c_board_info rm680_peripherals_i2c_board_info_2[] /*__initdata *
  66. .platform_data = &rm696_dac33_platform_data,
  67. },
  68. #endif
  69. -
  70. +
  71. +#if defined(CONFIG_SND_SOC_TPA6130A2) || \
  72. + defined(CONFIG_SND_SOC_TPA6130A2_MODULE)
  73. + {
  74. + I2C_BOARD_INFO("tpa6140a2", 0x60),
  75. + .platform_data = &rm696_tpa6130a2_platform_data,
  76. + },
  77. +#endif
  78. +
  79. #if defined(CONFIG_LEDS_LP5521) || defined(CONFIG_LEDS_LP5521_MODULE)
  80. {
  81. I2C_BOARD_INFO("lp5521", 0x32),
  82. @@ -1997,7 +1997,11 @@ static int __init rm696_atmel_mxt_init(void)
  83. if (err)
  84. goto err2;
  85.  
  86. - rm696_peripherals_i2c_board_info_2[0].irq = gpio_to_irq(ATMEL_MXT_IRQ_GPIO);
  87. + if (!board_is_rm680()) {
  88. + rm696_peripherals_i2c_board_info_2[0].irq = gpio_to_irq(ATMEL_MXT_IRQ_GPIO);
  89. + } else {
  90. + rm680_peripherals_i2c_board_info_2[0].irq = gpio_to_irq(ATMEL_MXT_IRQ_GPIO);
  91. + }
  92.  
  93. return 0;
  94. err2:
  95. @@ -2054,10 +2058,14 @@ static int __init rm696_tlv320dac33_init(void)
  96. "for tlv320dac33 chip\n");
  97. }
  98.  
  99. - rm696_peripherals_i2c_board_info_2[2].irq = gpio_to_irq(RM696_DAC33_IRQ_GPIO);
  100. + if (!board_is_rm680()) {
  101. + rm696_peripherals_i2c_board_info_2[2].irq = gpio_to_irq(RM696_DAC33_IRQ_GPIO);
  102. + } else {
  103. + rm680_peripherals_i2c_board_info_2[2].irq = gpio_to_irq(RM696_DAC33_IRQ_GPIO);
  104. + }
  105.  
  106. gpio_direction_input(RM696_DAC33_IRQ_GPIO);
  107. -
  108. +
  109. platform_device_register(&rm696_tlv320dac33_device);
  110.  
  111. return 0;
  112. --
  113. 2.1.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement