aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-rx51-peripherals.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-rx51-peripherals.c')
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c45
1 files changed, 36 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index df2534de3361..ed85fb898c7f 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -25,17 +25,18 @@
25#include <linux/gpio_keys.h> 25#include <linux/gpio_keys.h>
26#include <linux/mmc/host.h> 26#include <linux/mmc/host.h>
27#include <linux/power/isp1704_charger.h> 27#include <linux/power/isp1704_charger.h>
28#include <linux/platform_data/spi-omap2-mcspi.h>
29#include <linux/platform_data/mtd-onenand-omap2.h>
30
28#include <asm/system_info.h> 31#include <asm/system_info.h>
29 32
30#include <plat/mcspi.h>
31#include <plat/board.h>
32#include "common.h" 33#include "common.h"
33#include <plat/dma.h> 34#include <plat/dma.h>
34#include <plat/gpmc.h> 35#include <plat/gpmc.h>
35#include <plat/onenand.h> 36#include <plat/omap-pm.h>
36#include <plat/gpmc-smc91x.h> 37#include "gpmc-smc91x.h"
37 38
38#include <mach/board-rx51.h> 39#include "board-rx51.h"
39 40
40#include <sound/tlv320aic3x.h> 41#include <sound/tlv320aic3x.h>
41#include <sound/tpa6130a2-plat.h> 42#include <sound/tpa6130a2-plat.h>
@@ -46,6 +47,10 @@
46#include <../drivers/staging/iio/light/tsl2563.h> 47#include <../drivers/staging/iio/light/tsl2563.h>
47#include <linux/lis3lv02d.h> 48#include <linux/lis3lv02d.h>
48 49
50#if defined(CONFIG_IR_RX51) || defined(CONFIG_IR_RX51_MODULE)
51#include <media/ir-rx51.h>
52#endif
53
49#include "mux.h" 54#include "mux.h"
50#include "hsmmc.h" 55#include "hsmmc.h"
51#include "common-board-devices.h" 56#include "common-board-devices.h"
@@ -774,9 +779,6 @@ static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n)
774} 779}
775 780
776static struct twl4030_gpio_platform_data rx51_gpio_data = { 781static struct twl4030_gpio_platform_data rx51_gpio_data = {
777 .gpio_base = OMAP_MAX_GPIO_LINES,
778 .irq_base = TWL4030_GPIO_IRQ_BASE,
779 .irq_end = TWL4030_GPIO_IRQ_END,
780 .pulldowns = BIT(0) | BIT(1) | BIT(2) | BIT(3) 782 .pulldowns = BIT(0) | BIT(1) | BIT(2) | BIT(3)
781 | BIT(4) | BIT(5) 783 | BIT(4) | BIT(5)
782 | BIT(8) | BIT(9) | BIT(10) | BIT(11) 784 | BIT(8) | BIT(9) | BIT(10) | BIT(11)
@@ -1051,7 +1053,7 @@ static int __init rx51_i2c_init(void)
1051 rx51_twldata.vdac->constraints.apply_uV = true; 1053 rx51_twldata.vdac->constraints.apply_uV = true;
1052 rx51_twldata.vdac->constraints.name = "VDAC"; 1054 rx51_twldata.vdac->constraints.name = "VDAC";
1053 1055
1054 omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata); 1056 omap_pmic_init(1, 2200, "twl5030", 7 + OMAP_INTC_START, &rx51_twldata);
1055 omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, 1057 omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2,
1056 ARRAY_SIZE(rx51_peripherals_i2c_board_info_2)); 1058 ARRAY_SIZE(rx51_peripherals_i2c_board_info_2));
1057#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE) 1059#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE)
@@ -1220,6 +1222,30 @@ static void __init rx51_init_tsc2005(void)
1220 gpio_to_irq(RX51_TSC2005_IRQ_GPIO); 1222 gpio_to_irq(RX51_TSC2005_IRQ_GPIO);
1221} 1223}
1222 1224
1225#if defined(CONFIG_IR_RX51) || defined(CONFIG_IR_RX51_MODULE)
1226static struct lirc_rx51_platform_data rx51_lirc_data = {
1227 .set_max_mpu_wakeup_lat = omap_pm_set_max_mpu_wakeup_lat,
1228 .pwm_timer = 9, /* Use GPT 9 for CIR */
1229};
1230
1231static struct platform_device rx51_lirc_device = {
1232 .name = "lirc_rx51",
1233 .id = -1,
1234 .dev = {
1235 .platform_data = &rx51_lirc_data,
1236 },
1237};
1238
1239static void __init rx51_init_lirc(void)
1240{
1241 platform_device_register(&rx51_lirc_device);
1242}
1243#else
1244static void __init rx51_init_lirc(void)
1245{
1246}
1247#endif
1248
1223void __init rx51_peripherals_init(void) 1249void __init rx51_peripherals_init(void)
1224{ 1250{
1225 rx51_i2c_init(); 1251 rx51_i2c_init();
@@ -1230,6 +1256,7 @@ void __init rx51_peripherals_init(void)
1230 rx51_init_wl1251(); 1256 rx51_init_wl1251();
1231 rx51_init_tsc2005(); 1257 rx51_init_tsc2005();
1232 rx51_init_si4713(); 1258 rx51_init_si4713();
1259 rx51_init_lirc();
1233 spi_register_board_info(rx51_peripherals_spi_board_info, 1260 spi_register_board_info(rx51_peripherals_spi_board_info,
1234 ARRAY_SIZE(rx51_peripherals_spi_board_info)); 1261 ARRAY_SIZE(rx51_peripherals_spi_board_info));
1235 1262