From patchwork Mon Feb 21 08:09:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 577021 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1L88kW2025947 for ; Mon, 21 Feb 2011 08:08:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753720Ab1BUIIp (ORCPT ); Mon, 21 Feb 2011 03:08:45 -0500 Received: from mail-ey0-f180.google.com ([209.85.215.180]:45861 "EHLO mail-ey0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752189Ab1BUIIo (ORCPT ); Mon, 21 Feb 2011 03:08:44 -0500 Received: by eyg24 with SMTP id 24so92125eyg.11 for ; Mon, 21 Feb 2011 00:08:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=g8X80t9YLT2v4DM36aodWA0U89necSEEgYOm8OpO6aE=; b=OnrFKQwD5WW1Jg1eiDpgGo9OJvCBxDDu2tuAh/WNNgakqx+vaRIH1h/IQmqXlG2iDk ElRA7cptvj0j2mxGQlHWztub++C0Sv4RRQqTlcD4LAEfqAY2z+V35BC3V2cs/r8x3Cq3 A45A8r+vZfsvNUZ8+SsV1uzqVgMz86Eo3ZQFk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=h+VVVTaA7VqMj1ZakXU9BmmCCCMidCw7zkEPn5pKSeppiuyVwu7lVp5l4K+IA6vz1e sZved1CNZt/KnC4MLHAEieGryHixjXQwCrz4SKRUeO+XOv0cBJmxBPBpsFvEZRMCH5tz iMnzxsQgaL7XQwrDzptVv0NZs76HgtU7czI78= Received: by 10.213.7.67 with SMTP id c3mr1201224ebc.68.1298275723683; Mon, 21 Feb 2011 00:08:43 -0800 (PST) Received: from localhost ([194.136.136.46]) by mx.google.com with ESMTPS id u1sm4674168eeh.4.2011.02.21.00.08.42 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 21 Feb 2011 00:08:42 -0800 (PST) From: Jarkko Nikula To: linux-omap@vger.kernel.org Cc: Tony Lindgren , linux-arm-kernel@lists.infradead.org, Varadarajan Charulatha , Jarkko Nikula Subject: [PATCHv2] omap: rx51: Add SI4713 FM transmitter Date: Mon, 21 Feb 2011 10:09:21 +0200 Message-Id: <1298275761-21486-1-git-send-email-jhnikula@gmail.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <20110221095421.6576a98d.jhnikula@gmail.com> References: <20110221095421.6576a98d.jhnikula@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 21 Feb 2011 08:08:47 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index e75e240..17ef1af 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -36,6 +36,8 @@ #include #include +#include +#include #include <../drivers/staging/iio/light/tsl2563.h> @@ -47,6 +49,8 @@ #define RX51_WL1251_POWER_GPIO 87 #define RX51_WL1251_IRQ_GPIO 42 +#define RX51_FMTX_RESET_GPIO 163 +#define RX51_FMTX_IRQ 53 /* list all spi devices here */ enum { @@ -357,10 +361,14 @@ static struct regulator_consumer_supply rx51_vio_supplies[] = { REGULATOR_SUPPLY("DVDD", "2-0018"), REGULATOR_SUPPLY("IOVDD", "2-0019"), REGULATOR_SUPPLY("DVDD", "2-0019"), + /* Si4713 IO supply */ + REGULATOR_SUPPLY("vio", "2-0063"), }; static struct regulator_consumer_supply rx51_vaux1_consumers[] = { REGULATOR_SUPPLY("vdds_sdi", "omapdss"), + /* Si4713 supply */ + REGULATOR_SUPPLY("vdd", "2-0063"), }; static struct regulator_consumer_supply rx51_vdac_supply[] = { @@ -511,6 +519,41 @@ static struct regulator_init_data rx51_vio = { .consumer_supplies = rx51_vio_supplies, }; +static struct si4713_platform_data rx51_si4713_i2c_data __initdata_or_module = { + .gpio_reset = RX51_FMTX_RESET_GPIO, +}; + +static struct i2c_board_info rx51_si4713_board_info __initdata_or_module = { + I2C_BOARD_INFO("si4713", SI4713_I2C_ADDR_BUSEN_HIGH), + .platform_data = &rx51_si4713_i2c_data, +}; + +static struct radio_si4713_platform_data rx51_si4713_data __initdata_or_module = { + .i2c_bus = 2, + .subdev_board_info = &rx51_si4713_board_info, +}; + +static struct platform_device rx51_si4713_dev __initdata_or_module = { + .name = "radio-si4713", + .id = -1, + .dev = { + .platform_data = &rx51_si4713_data, + }, +}; + +static __init void rx51_init_si4713(void) +{ + int err; + + err = gpio_request_one(RX51_FMTX_IRQ, GPIOF_DIR_IN, "si4713 irq"); + if (err) { + pr_err("Cannot request si4713 irq gpio. %d\n", err); + return; + } + rx51_si4713_board_info.irq = gpio_to_irq(RX51_FMTX_IRQ); + platform_device_register(&rx51_si4713_dev); +} + static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) { /* FIXME this gpio setup is just a placeholder for now */ @@ -921,6 +964,7 @@ void __init rx51_peripherals_init(void) board_smc91x_init(); rx51_add_gpio_keys(); rx51_init_wl1251(); + rx51_init_si4713(); spi_register_board_info(rx51_peripherals_spi_board_info, ARRAY_SIZE(rx51_peripherals_spi_board_info));