aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorJarkko Nikula <jhnikula@gmail.com>2011-02-21 01:42:36 -0500
committerTony Lindgren <tony@atomide.com>2011-02-25 13:19:21 -0500
commit589541c0bfb1426ad39c7b59c0372346bcf84229 (patch)
tree1111dda7db49dfddb2a194a52c00422957816bce /arch/arm/mach-omap2
parentbd061715392ccd72a398577615e856175d2b7b2b (diff)
omap: rx51: Add SI4713 FM transmitter
Add SI4713 FM transmitter supplies, platform data and setup to RX-51/N900. It is connected to line output signals of TLV320AIC34 codec A part. Driver can be either built-in or a module. It can be tuned with v4l2-ctl from ivtv-utils. Following examples illustrate the use of it: v4l2-ctl -d /dev/radio0 --set-ctrl=mute=0 (power up) v4l2-ctl -d /dev/radio0 -f 107900 (tune 107.9 MHz) v4l2-ctl -d /dev/radio0 --set-ctrl=mute=1 (power down) Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index e75e240cad67..d0998f812693 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -36,6 +36,8 @@
36 36
37#include <sound/tlv320aic3x.h> 37#include <sound/tlv320aic3x.h>
38#include <sound/tpa6130a2-plat.h> 38#include <sound/tpa6130a2-plat.h>
39#include <media/radio-si4713.h>
40#include <media/si4713.h>
39 41
40#include <../drivers/staging/iio/light/tsl2563.h> 42#include <../drivers/staging/iio/light/tsl2563.h>
41 43
@@ -47,6 +49,8 @@
47 49
48#define RX51_WL1251_POWER_GPIO 87 50#define RX51_WL1251_POWER_GPIO 87
49#define RX51_WL1251_IRQ_GPIO 42 51#define RX51_WL1251_IRQ_GPIO 42
52#define RX51_FMTX_RESET_GPIO 163
53#define RX51_FMTX_IRQ 53
50 54
51/* list all spi devices here */ 55/* list all spi devices here */
52enum { 56enum {
@@ -357,10 +361,14 @@ static struct regulator_consumer_supply rx51_vio_supplies[] = {
357 REGULATOR_SUPPLY("DVDD", "2-0018"), 361 REGULATOR_SUPPLY("DVDD", "2-0018"),
358 REGULATOR_SUPPLY("IOVDD", "2-0019"), 362 REGULATOR_SUPPLY("IOVDD", "2-0019"),
359 REGULATOR_SUPPLY("DVDD", "2-0019"), 363 REGULATOR_SUPPLY("DVDD", "2-0019"),
364 /* Si4713 IO supply */
365 REGULATOR_SUPPLY("vio", "2-0063"),
360}; 366};
361 367
362static struct regulator_consumer_supply rx51_vaux1_consumers[] = { 368static struct regulator_consumer_supply rx51_vaux1_consumers[] = {
363 REGULATOR_SUPPLY("vdds_sdi", "omapdss"), 369 REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
370 /* Si4713 supply */
371 REGULATOR_SUPPLY("vdd", "2-0063"),
364}; 372};
365 373
366static struct regulator_consumer_supply rx51_vdac_supply[] = { 374static struct regulator_consumer_supply rx51_vdac_supply[] = {
@@ -511,6 +519,41 @@ static struct regulator_init_data rx51_vio = {
511 .consumer_supplies = rx51_vio_supplies, 519 .consumer_supplies = rx51_vio_supplies,
512}; 520};
513 521
522static struct si4713_platform_data rx51_si4713_i2c_data __initdata_or_module = {
523 .gpio_reset = RX51_FMTX_RESET_GPIO,
524};
525
526static struct i2c_board_info rx51_si4713_board_info __initdata_or_module = {
527 I2C_BOARD_INFO("si4713", SI4713_I2C_ADDR_BUSEN_HIGH),
528 .platform_data = &rx51_si4713_i2c_data,
529};
530
531static struct radio_si4713_platform_data rx51_si4713_data __initdata_or_module = {
532 .i2c_bus = 2,
533 .subdev_board_info = &rx51_si4713_board_info,
534};
535
536static struct platform_device rx51_si4713_dev __initdata_or_module = {
537 .name = "radio-si4713",
538 .id = -1,
539 .dev = {
540 .platform_data = &rx51_si4713_data,
541 },
542};
543
544static __init void rx51_init_si4713(void)
545{
546 int err;
547
548 err = gpio_request_one(RX51_FMTX_IRQ, GPIOF_DIR_IN, "si4713 irq");
549 if (err) {
550 printk(KERN_ERR "Cannot request si4713 irq gpio. %d\n", err);
551 return;
552 }
553 rx51_si4713_board_info.irq = gpio_to_irq(RX51_FMTX_IRQ);
554 platform_device_register(&rx51_si4713_dev);
555}
556
514static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) 557static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n)
515{ 558{
516 /* FIXME this gpio setup is just a placeholder for now */ 559 /* FIXME this gpio setup is just a placeholder for now */
@@ -921,6 +964,7 @@ void __init rx51_peripherals_init(void)
921 board_smc91x_init(); 964 board_smc91x_init();
922 rx51_add_gpio_keys(); 965 rx51_add_gpio_keys();
923 rx51_init_wl1251(); 966 rx51_init_wl1251();
967 rx51_init_si4713();
924 spi_register_board_info(rx51_peripherals_spi_board_info, 968 spi_register_board_info(rx51_peripherals_spi_board_info,
925 ARRAY_SIZE(rx51_peripherals_spi_board_info)); 969 ARRAY_SIZE(rx51_peripherals_spi_board_info));
926 970