Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184747
b: refs/heads/master
c: f2afbbb
h: refs/heads/master
i:
  184745: e1c19ed
  184743: 75ec1cb
v: v3
  • Loading branch information
Vaibhav Hiremath authored and Tony Lindgren committed Feb 19, 2010
1 parent 1c8b073 commit c37da2b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1f738dc306c86a8293c7ea929d07f55f32d52ff6
refs/heads/master: f2afbbb82e263086d02a772e43f5290b1a6f673e
39 changes: 39 additions & 0 deletions trunk/arch/arm/mach-omap2/board-am3517evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,39 @@
#define LCD_PANEL_BKLIGHT_PWR 182
#define LCD_PANEL_PWM 181

static struct i2c_board_info __initdata am3517evm_i2c_boardinfo[] = {
{
I2C_BOARD_INFO("s35390a", 0x30),
.type = "s35390a",
},
};

/*
* RTC - S35390A
*/
#define GPIO_RTCS35390A_IRQ 55

static void __init am3517_evm_rtc_init(void)
{
int r;

omap_mux_init_gpio(GPIO_RTCS35390A_IRQ, OMAP_PIN_INPUT_PULLUP);
r = gpio_request(GPIO_RTCS35390A_IRQ, "rtcs35390a-irq");
if (r < 0) {
printk(KERN_WARNING "failed to request GPIO#%d\n",
GPIO_RTCS35390A_IRQ);
return;
}
r = gpio_direction_input(GPIO_RTCS35390A_IRQ);
if (r < 0) {
printk(KERN_WARNING "GPIO#%d cannot be configured as input\n",
GPIO_RTCS35390A_IRQ);
gpio_free(GPIO_RTCS35390A_IRQ);
return;
}
am3517evm_i2c_boardinfo[0].irq = gpio_to_irq(GPIO_RTCS35390A_IRQ);
}

static int __init am3517_evm_i2c_init(void)
{
omap_register_i2c_bus(1, 400, NULL, 0);
Expand Down Expand Up @@ -235,6 +268,12 @@ static void __init am3517_evm_init(void)
usb_ehci_init(&ehci_pdata);
/* DSS */
am3517_evm_display_init();

/* RTC - S35390A */
am3517_evm_rtc_init();

i2c_register_board_info(1, am3517evm_i2c_boardinfo,
ARRAY_SIZE(am3517evm_i2c_boardinfo));
}

static void __init am3517_evm_map_io(void)
Expand Down

0 comments on commit c37da2b

Please sign in to comment.