From patchwork Mon Nov 9 13:14:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 58763 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA9DFhWY026854 for ; Mon, 9 Nov 2009 13:15:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755879AbZKINPH (ORCPT ); Mon, 9 Nov 2009 08:15:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755060AbZKINPH (ORCPT ); Mon, 9 Nov 2009 08:15:07 -0500 Received: from smtp.nokia.com ([192.100.122.233]:22570 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755230AbZKINPG (ORCPT ); Mon, 9 Nov 2009 08:15:06 -0500 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id nA9DF1hm011139; Mon, 9 Nov 2009 15:15:03 +0200 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 9 Nov 2009 15:14:57 +0200 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Mon, 9 Nov 2009 15:14:56 +0200 Received: from localhost.localdomain (esdhcp03947.research.nokia.com [172.21.39.47]) by mgw-sa01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id nA9DEtSl003939; Mon, 9 Nov 2009 15:14:55 +0200 From: Amit Kucheria To: List Linux Kernel Cc: tony@atomide.com, Jonathan Cameron , Greg Kroah-Hartman , linux-omap@vger.kernel.org Subject: [PATCH 2/2] omap: rx51: Enable RX-51 ambient light sensor Date: Mon, 9 Nov 2009 15:14:55 +0200 Message-Id: <1257772495-4221-1-git-send-email-amit.kucheria@verdurent.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1257772468-4004-1-git-send-email-amit.kucheria@verdurent.com> References: <1257772468-4004-1-git-send-email-amit.kucheria@verdurent.com> X-OriginalArrivalTime: 09 Nov 2009 13:14:56.0853 (UTC) FILETIME=[A2137050:01CA613E] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index cf4583a..1923699 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -31,6 +31,7 @@ #include #include +#include "../../../drivers/staging/iio/light/tsl2563.h" #include "mmc-twl4030.h" #define SYSTEM_REV_B_USES_VAUX3 0x1699 @@ -290,6 +291,10 @@ static struct twl4030_usb_data rx51_usb_data = { .usb_mode = T2_USB_MODE_ULPI, }; +static struct tsl2563_platform_data rx51_tsl2563_platform_data = { + .cover_comp_gain = 16, +}; + static struct twl4030_ins sleep_on_seq[] __initdata = { /* * Turn off VDD1 and VDD2. @@ -435,6 +440,14 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = { }, }; +static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = { + { + I2C_BOARD_INFO("tsl2563", 0x29), + .platform_data = &rx51_tsl2563_platform_data, + }, +}; + + static int __init rx51_i2c_init(void) { if ((system_rev >= SYSTEM_REV_S_USES_VAUX3 && system_rev < 0x100) || @@ -446,7 +459,8 @@ static int __init rx51_i2c_init(void) } omap_register_i2c_bus(1, 2200, rx51_peripherals_i2c_board_info_1, ARRAY_SIZE(rx51_peripherals_i2c_board_info_1)); - omap_register_i2c_bus(2, 100, NULL, 0); + omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, + ARRAY_SIZE(rx51_peripherals_i2c_board_info_2)); omap_register_i2c_bus(3, 400, NULL, 0); return 0; }