ARM: OMAP1: nokia770: enable Tahvo

Add platform data for Tahvo.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
[tony@atomide.com: left out extcon to remove dependency to USB patches]
Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
Aaro Koskinen 2013-06-16 16:35:12 +03:00 committed by Tony Lindgren
parent 8fb61e8d84
commit a4b13a3b26
1 changed files with 10 additions and 0 deletions

View File

@ -234,16 +234,26 @@ static struct i2c_board_info nokia770_i2c_board_info_2[] __initdata = {
{
I2C_BOARD_INFO("retu-mfd", 0x01),
},
{
I2C_BOARD_INFO("tahvo-mfd", 0x02),
},
};
static void __init nokia770_cbus_init(void)
{
const int retu_irq_gpio = 62;
const int tahvo_irq_gpio = 40;
if (gpio_request_one(retu_irq_gpio, GPIOF_IN, "Retu IRQ"))
return;
if (gpio_request_one(tahvo_irq_gpio, GPIOF_IN, "Tahvo IRQ")) {
gpio_free(retu_irq_gpio);
return;
}
irq_set_irq_type(gpio_to_irq(retu_irq_gpio), IRQ_TYPE_EDGE_RISING);
irq_set_irq_type(gpio_to_irq(tahvo_irq_gpio), IRQ_TYPE_EDGE_RISING);
nokia770_i2c_board_info_2[0].irq = gpio_to_irq(retu_irq_gpio);
nokia770_i2c_board_info_2[1].irq = gpio_to_irq(tahvo_irq_gpio);
i2c_register_board_info(2, nokia770_i2c_board_info_2,
ARRAY_SIZE(nokia770_i2c_board_info_2));
platform_device_register(&nokia770_cbus_device);