From patchwork Mon Feb 21 06:42:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 576971 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 p1L6mFlr009470 for ; Mon, 21 Feb 2011 06:48:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752718Ab1BUGsO (ORCPT ); Mon, 21 Feb 2011 01:48:14 -0500 Received: from mail-ey0-f174.google.com ([209.85.215.174]:51734 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752407Ab1BUGsO (ORCPT ); Mon, 21 Feb 2011 01:48:14 -0500 Received: by eyx24 with SMTP id 24so123890eyx.19 for ; Sun, 20 Feb 2011 22:48:12 -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=q6A6zFuP3JpMDAu8UMS1pBxVvbSscKrZYhTj/7AIUk8=; b=D5Krh5gm9FeVw+/N0O0QqJZBzmdJSTUI7dXDAyKn6df3MAIFJ3uPTVNaEHdRP3vAUj LtOiIW6lqSZ5kIym3HrkjBqkcmQP/5ofZ56l+BAnLxnibK0OF0cPNRvD4sZubOoQw4p6 CgF8hXY7FoNOJR7NOFR3aCnTlpmu+UjDDWrQA= 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=TF0jE3rHb/dMBZU4rZmuVjZHoz0odLCBreJIkmeJwg+FkM2VNynEVSkrZIuZokDDQS g6uZnlnAAxkkpypF/UZYxPRiodwP9n6RArZrIO++PyArvy69odP7lhoE/gEPp2wSta8r fu5LH4GpoInA3+jSml38C6RRO1XQ7vHCaAlLU= Received: by 10.213.31.196 with SMTP id z4mr1134671ebc.1.1298270514834; Sun, 20 Feb 2011 22:41:54 -0800 (PST) Received: from localhost ([194.136.136.46]) by mx.google.com with ESMTPS id u1sm4609943eeh.4.2011.02.20.22.41.53 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 20 Feb 2011 22:41:54 -0800 (PST) From: Jarkko Nikula To: linux-omap@vger.kernel.org Cc: Tony Lindgren , linux-arm-kernel@lists.infradead.org, Jarkko Nikula Subject: [PATCH resend] omap: rx51: Add SI4713 FM transmitter Date: Mon, 21 Feb 2011 08:42:36 +0200 Message-Id: <1298270556-11571-1-git-send-email-jhnikula@gmail.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1298040354-1726-1-git-send-email-jhnikula@gmail.com> References: <1298040354-1726-1-git-send-email-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 06:48:15 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index e75e240..d0998f8 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) { + printk(KERN_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));