Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 063eea0ad93d104e3de650154e15f264b1491e53 Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Filip=20Matijevi=C4=87?= <filip.matijevic.pz@gmail.com>
- Date: Sun, 11 Jan 2015 22:01:05 +0100
- Subject: [PATCH] n950: fix touchscreen 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 | 69 ++++++++++++++++++++++++++++++++++++---
- 1 file changed, 64 insertions(+), 5 deletions(-)
- diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
- index f9c0bcb..1dbaa15 100644
- --- a/arch/arm/mach-omap2/board-rm680.c
- +++ b/arch/arm/mach-omap2/board-rm680.c
- @@ -847,7 +847,7 @@ static void __init rm696_wl1273_init(void)
- }
- #endif
- -static struct mxt_platform_data atmel_mxt_platform_data = {
- +static struct mxt_platform_data atmel_mxt_platform_data_rm696 = {
- .reset_gpio = ATMEL_MXT_RESET_GPIO,
- .int_gpio = ATMEL_MXT_IRQ_GPIO,
- .rlimit_min_interval_us = 7000,
- @@ -856,6 +856,15 @@ static struct mxt_platform_data atmel_mxt_platform_data = {
- .config = &atmel_mxt_pyrenees_config,
- };
- +static struct mxt_platform_data atmel_mxt_platform_data_rm680 = {
- + .reset_gpio = ATMEL_MXT_RESET_GPIO,
- + .int_gpio = ATMEL_MXT_IRQ_GPIO,
- + .rlimit_min_interval_us = 7000,
- + .rlimit_bypass_time_us = 25000,
- + .wakeup_interval_ms = 50,
- + .config = &atmel_mxt_himalaya_config,
- +};
- +
- #if defined(CONFIG_SND_SOC_TLV320DAC33) || \
- defined(CONFIG_SND_SOC_TLV320DAC33_MODULE)
- static struct tlv320dac33_platform_data rm696_dac33_platform_data = {
- @@ -968,7 +977,48 @@ static struct i2c_board_info rm696_peripherals_i2c_board_info_2[] /*__initdata *
- {
- /* keep this first */
- I2C_BOARD_INFO("atmel_mxt", 0x4b),
- - .platform_data = &atmel_mxt_platform_data,
- + .platform_data = &atmel_mxt_platform_data_rm696,
- + },
- +
- +#if defined(CONFIG_SENSORS_APDS990X) || defined(CONFIG_SENSORS_APDS990X_MODULE)
- + {
- + /* keep this second */
- + I2C_BOARD_INFO("apds990x", 0x39),
- + .platform_data = &rm696_apds990x_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_SND_SOC_TLV320DAC33) || \
- + defined(CONFIG_SND_SOC_TLV320DAC33_MODULE)
- + {
- + /*keep this third*/
- + I2C_BOARD_INFO("tlv320dac33", 0x19),
- + .platform_data = &rm696_dac33_platform_data,
- + },
- +#endif
- +
- +#if defined(CONFIG_LEDS_LP5521) || defined(CONFIG_LEDS_LP5521_MODULE)
- + {
- + I2C_BOARD_INFO("lp5521", 0x32),
- + .platform_data = &rm696_lp5521_platform_data,
- + },
- +#endif
- +
- +};
- +
- +static struct i2c_board_info rm680_peripherals_i2c_board_info_2[] /*__initdata */= {
- + {
- + /* keep this first */
- + I2C_BOARD_INFO("atmel_mxt", 0x4b),
- + .platform_data = &atmel_mxt_platform_data_rm680,
- },
- #if defined(CONFIG_SENSORS_APDS990X) || defined(CONFIG_SENSORS_APDS990X_MODULE)
- @@ -1022,7 +1072,11 @@ static void __init rm696_apds990x_init(void)
- rm696_apds990x_data.pdrive = APDS_IRLED_CURR_50mA;
- }
- - rm696_peripherals_i2c_board_info_2[1].irq = gpio_to_irq(APDS990X_GPIO);
- + if (!board_is_rm680()) {
- + rm696_peripherals_i2c_board_info_2[1].irq = gpio_to_irq(APDS990X_GPIO);
- + } else {
- + rm680_peripherals_i2c_board_info_2[1].irq = gpio_to_irq(APDS990X_GPIO);
- + }
- }
- #else
- static inline void rm696_apds990x_init(void) {}
- @@ -1438,8 +1492,13 @@ static void __init rm680_i2c_init(void)
- #endif
- omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data);
- - omap_register_i2c_bus(2, 400, rm696_peripherals_i2c_board_info_2,
- - ARRAY_SIZE(rm696_peripherals_i2c_board_info_2));
- + if (!board_is_rm680()) {
- + omap_register_i2c_bus(2, 400, rm696_peripherals_i2c_board_info_2,
- + ARRAY_SIZE(rm696_peripherals_i2c_board_info_2));
- + } else {
- + omap_register_i2c_bus(2, 400, rm680_peripherals_i2c_board_info_2,
- + ARRAY_SIZE(rm680_peripherals_i2c_board_info_2));
- + }
- omap_register_i2c_bus(3, 400, rm696_peripherals_i2c_board_info_3,
- ARRAY_SIZE(rm696_peripherals_i2c_board_info_3));
- }
- --
- 2.1.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement