From patchwork Thu Aug 9 12:41:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timo Kokkonen X-Patchwork-Id: 1300271 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id A619FDFF7B for ; Thu, 9 Aug 2012 12:41:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932267Ab2HIMlw (ORCPT ); Thu, 9 Aug 2012 08:41:52 -0400 Received: from mta-out.inet.fi ([195.156.147.13]:41040 "EHLO jenni2.inet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757430Ab2HIMlt (ORCPT ); Thu, 9 Aug 2012 08:41:49 -0400 Received: from itanic.dhcp.inet.fi (80.223.243.31) by jenni2.inet.fi (8.5.140.03) id 4FD08235031F96F4; Thu, 9 Aug 2012 15:41:47 +0300 From: Timo Kokkonen To: linux-omap@vger.kernel.org, linux-media@vger.kernel.org Cc: Timo Kokkonen Subject: [PATCH 2/2] ARM: mach-omap2: board-rx51-peripherals: Add lirc-rx51 data Date: Thu, 9 Aug 2012 15:41:26 +0300 Message-Id: <1344516086-24615-3-git-send-email-timo.t.kokkonen@iki.fi> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1344516086-24615-1-git-send-email-timo.t.kokkonen@iki.fi> References: <1344516086-24615-1-git-send-email-timo.t.kokkonen@iki.fi> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 --- arch/arm/mach-omap2/board-rx51-peripherals.c | 30 ++++++++++++++++++++++++++ 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 df2534d..4a5a71b 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 "../../../drivers/media/rc/ir-rx51.h" +#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));