aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>2012-08-10 05:16:37 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-13 15:54:26 -0400
commit322c183cdc5f041d0f6a25fe519c7836649a6c8b (patch)
treeb3d5a361e79470be9d310ce4acbc7dcd50c7dbec
parentc332e8472d7db67766bcad33390c607fdd9ac5bc (diff)
[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 <timo.t.kokkonen@iki.fi> Cc: Tony Lindgren <tony@atomide.com> Cc: linux-omap@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c30
1 files changed, 30 insertions, 0 deletions
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 @@
34#include <plat/gpmc.h> 34#include <plat/gpmc.h>
35#include <plat/onenand.h> 35#include <plat/onenand.h>
36#include <plat/gpmc-smc91x.h> 36#include <plat/gpmc-smc91x.h>
37#include <plat/omap-pm.h>
37 38
38#include <mach/board-rx51.h> 39#include <mach/board-rx51.h>
39 40
@@ -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"
@@ -1220,6 +1225,30 @@ static void __init rx51_init_tsc2005(void)
1220 gpio_to_irq(RX51_TSC2005_IRQ_GPIO); 1225 gpio_to_irq(RX51_TSC2005_IRQ_GPIO);
1221} 1226}
1222 1227
1228#if defined(CONFIG_IR_RX51) || defined(CONFIG_IR_RX51_MODULE)
1229static struct lirc_rx51_platform_data rx51_lirc_data = {
1230 .set_max_mpu_wakeup_lat = omap_pm_set_max_mpu_wakeup_lat,
1231 .pwm_timer = 9, /* Use GPT 9 for CIR */
1232};
1233
1234static struct platform_device rx51_lirc_device = {
1235 .name = "lirc_rx51",
1236 .id = -1,
1237 .dev = {
1238 .platform_data = &rx51_lirc_data,
1239 },
1240};
1241
1242static void __init rx51_init_lirc(void)
1243{
1244 platform_device_register(&rx51_lirc_device);
1245}
1246#else
1247static void __init rx51_init_lirc(void)
1248{
1249}
1250#endif
1251
1223void __init rx51_peripherals_init(void) 1252void __init rx51_peripherals_init(void)
1224{ 1253{
1225 rx51_i2c_init(); 1254 rx51_i2c_init();
@@ -1230,6 +1259,7 @@ void __init rx51_peripherals_init(void)
1230 rx51_init_wl1251(); 1259 rx51_init_wl1251();
1231 rx51_init_tsc2005(); 1260 rx51_init_tsc2005();
1232 rx51_init_si4713(); 1261 rx51_init_si4713();
1262 rx51_init_lirc();
1233 spi_register_board_info(rx51_peripherals_spi_board_info, 1263 spi_register_board_info(rx51_peripherals_spi_board_info,
1234 ARRAY_SIZE(rx51_peripherals_spi_board_info)); 1264 ARRAY_SIZE(rx51_peripherals_spi_board_info));
1235 1265