From: Timo Kokkonen Date: Fri, 10 Aug 2012 09:16:37 +0000 (-0300) Subject: [media] ARM: mach-omap2: board-rx51-peripherals: Add lirc-rx51 data X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=322c183cdc5f041d0f6a25fe519c7836649a6c8b;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [media] ARM: mach-omap2: board-rx51-peripherals: Add lirc-rx51 data The IR diode on the RX51 is connected to the GPT9. This data is needed for the IR driver to function. Signed-off-by: Timo Kokkonen Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab --- diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index df2534de3361..ca07264bd3ae 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -46,6 +47,10 @@ #include <../drivers/staging/iio/light/tsl2563.h> #include +#if defined(CONFIG_IR_RX51) || defined(CONFIG_IR_RX51_MODULE) +#include +#endif + #include "mux.h" #include "hsmmc.h" #include "common-board-devices.h" @@ -1220,6 +1225,30 @@ static void __init rx51_init_tsc2005(void) gpio_to_irq(RX51_TSC2005_IRQ_GPIO); } +#if defined(CONFIG_IR_RX51) || defined(CONFIG_IR_RX51_MODULE) +static struct lirc_rx51_platform_data rx51_lirc_data = { + .set_max_mpu_wakeup_lat = omap_pm_set_max_mpu_wakeup_lat, + .pwm_timer = 9, /* Use GPT 9 for CIR */ +}; + +static struct platform_device rx51_lirc_device = { + .name = "lirc_rx51", + .id = -1, + .dev = { + .platform_data = &rx51_lirc_data, + }, +}; + +static void __init rx51_init_lirc(void) +{ + platform_device_register(&rx51_lirc_device); +} +#else +static void __init rx51_init_lirc(void) +{ +} +#endif + void __init rx51_peripherals_init(void) { rx51_i2c_init(); @@ -1230,6 +1259,7 @@ void __init rx51_peripherals_init(void) rx51_init_wl1251(); rx51_init_tsc2005(); rx51_init_si4713(); + rx51_init_lirc(); spi_register_board_info(rx51_peripherals_spi_board_info, ARRAY_SIZE(rx51_peripherals_spi_board_info));