Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From a3f4e1314cfbc5e88a7cc163cf32448fa92eb102 Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Filip=20Matijevi=C4=87?= <filip.matijevic.pz@gmail.com>
- Date: Mon, 12 Jan 2015 11:50:25 +0100
- Subject: [PATCH] n950: fix accelerometer configuration
- MIME-Version: 1.0
- Content-Type: text/plain; charset=UTF-8
- Content-Transfer-Encoding: 8bit
- Signed-off-by: Filip Matijević <filip.matijevic.pz@gmail.com>
- ---
- arch/arm/mach-omap2/board-rm680.c | 50 +++++++++++++++++++++++----------------
- 1 file changed, 29 insertions(+), 21 deletions(-)
- diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
- index dc7d8c8..d042e15 100644
- --- a/arch/arm/mach-omap2/board-rm680.c
- +++ b/arch/arm/mach-omap2/board-rm680.c
- @@ -988,14 +988,6 @@ static struct i2c_board_info rm696_peripherals_i2c_board_info_2[] /*__initdata *
- },
- #endif
- -#if defined(CONFIG_SND_SOC_TPA6130A2) || \
- - defined(CONFIG_SND_SOC_TPA6130A2_MODULE)
- - {
- - I2C_BOARD_INFO("tpa6140a2", 0x60),
- - .platform_data = &rm696_tpa6130a2_platform_data,
- - },
- -#endif
- -
- #if defined(CONFIG_SND_SOC_TLV320DAC33) || \
- defined(CONFIG_SND_SOC_TLV320DAC33_MODULE)
- {
- @@ -1004,7 +996,15 @@ static struct i2c_board_info rm696_peripherals_i2c_board_info_2[] /*__initdata *
- .platform_data = &rm696_dac33_platform_data,
- },
- #endif
- -
- +
- +#if defined(CONFIG_SND_SOC_TPA6130A2) || \
- + defined(CONFIG_SND_SOC_TPA6130A2_MODULE)
- + {
- + I2C_BOARD_INFO("tpa6140a2", 0x60),
- + .platform_data = &rm696_tpa6130a2_platform_data,
- + },
- +#endif
- +
- #if defined(CONFIG_LEDS_LP5521) || defined(CONFIG_LEDS_LP5521_MODULE)
- {
- I2C_BOARD_INFO("lp5521", 0x32),
- @@ -1029,14 +1029,6 @@ static struct i2c_board_info rm680_peripherals_i2c_board_info_2[] /*__initdata *
- },
- #endif
- -#if defined(CONFIG_SND_SOC_TPA6130A2) || \
- - defined(CONFIG_SND_SOC_TPA6130A2_MODULE)
- - {
- - I2C_BOARD_INFO("tpa6140a2", 0x60),
- - .platform_data = &rm696_tpa6130a2_platform_data,
- - },
- -#endif
- -
- #if defined(CONFIG_SND_SOC_TLV320DAC33) || \
- defined(CONFIG_SND_SOC_TLV320DAC33_MODULE)
- {
- @@ -1045,7 +1037,15 @@ static struct i2c_board_info rm680_peripherals_i2c_board_info_2[] /*__initdata *
- .platform_data = &rm696_dac33_platform_data,
- },
- #endif
- -
- +
- +#if defined(CONFIG_SND_SOC_TPA6130A2) || \
- + defined(CONFIG_SND_SOC_TPA6130A2_MODULE)
- + {
- + I2C_BOARD_INFO("tpa6140a2", 0x60),
- + .platform_data = &rm696_tpa6130a2_platform_data,
- + },
- +#endif
- +
- #if defined(CONFIG_LEDS_LP5521) || defined(CONFIG_LEDS_LP5521_MODULE)
- {
- I2C_BOARD_INFO("lp5521", 0x32),
- @@ -1997,7 +1997,11 @@ static int __init rm696_atmel_mxt_init(void)
- if (err)
- goto err2;
- - rm696_peripherals_i2c_board_info_2[0].irq = gpio_to_irq(ATMEL_MXT_IRQ_GPIO);
- + if (!board_is_rm680()) {
- + rm696_peripherals_i2c_board_info_2[0].irq = gpio_to_irq(ATMEL_MXT_IRQ_GPIO);
- + } else {
- + rm680_peripherals_i2c_board_info_2[0].irq = gpio_to_irq(ATMEL_MXT_IRQ_GPIO);
- + }
- return 0;
- err2:
- @@ -2054,10 +2058,14 @@ static int __init rm696_tlv320dac33_init(void)
- "for tlv320dac33 chip\n");
- }
- - rm696_peripherals_i2c_board_info_2[2].irq = gpio_to_irq(RM696_DAC33_IRQ_GPIO);
- + if (!board_is_rm680()) {
- + rm696_peripherals_i2c_board_info_2[2].irq = gpio_to_irq(RM696_DAC33_IRQ_GPIO);
- + } else {
- + rm680_peripherals_i2c_board_info_2[2].irq = gpio_to_irq(RM696_DAC33_IRQ_GPIO);
- + }
- gpio_direction_input(RM696_DAC33_IRQ_GPIO);
- -
- +
- platform_device_register(&rm696_tlv320dac33_device);
- return 0;
- --
- 2.1.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement