Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295926
b: refs/heads/master
c: d4860eb
h: refs/heads/master
v: v3
  • Loading branch information
Vladimir Zapolskiy authored and Tony Lindgren committed Mar 5, 2012
1 parent b9161df commit 2421377
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: afbb1893ef49cc465d9b2b724c1f1838999f8dba
refs/heads/master: d4860ebef4f7e45ebc37013d5008de85cc24a94e
25 changes: 14 additions & 11 deletions trunk/arch/arm/mach-omap2/board-rx51-peripherals.c
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,11 @@ static struct tsc2005_platform_data tsc2005_pdata = {
.esd_timeout_ms = 8000,
};

static struct gpio rx51_tsc2005_gpios[] __initdata = {
{ RX51_TSC2005_IRQ_GPIO, GPIOF_IN, "tsc2005 IRQ" },
{ RX51_TSC2005_RESET_GPIO, GPIOF_OUT_INIT_HIGH, "tsc2005 reset" },
};

static void rx51_tsc2005_set_reset(bool enable)
{
gpio_set_value(RX51_TSC2005_RESET_GPIO, enable);
Expand All @@ -1114,20 +1119,18 @@ static void __init rx51_init_tsc2005(void)
{
int r;

r = gpio_request_one(RX51_TSC2005_IRQ_GPIO, GPIOF_IN, "tsc2005 IRQ");
if (r < 0) {
printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 IRQ");
rx51_peripherals_spi_board_info[RX51_SPI_TSC2005].irq = 0;
}
omap_mux_init_gpio(RX51_TSC2005_RESET_GPIO, OMAP_PIN_OUTPUT);
omap_mux_init_gpio(RX51_TSC2005_IRQ_GPIO, OMAP_PIN_INPUT_PULLUP);

r = gpio_request_one(RX51_TSC2005_RESET_GPIO, GPIOF_OUT_INIT_HIGH,
"tsc2005 reset");
if (r >= 0) {
tsc2005_pdata.set_reset = rx51_tsc2005_set_reset;
} else {
printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 reset");
r = gpio_request_array(rx51_tsc2005_gpios,
ARRAY_SIZE(rx51_tsc2005_gpios));
if (r < 0) {
printk(KERN_ERR "tsc2005 board initialization failed\n");
tsc2005_pdata.esd_timeout_ms = 0;
return;
}

tsc2005_pdata.set_reset = rx51_tsc2005_set_reset;
}

void __init rx51_peripherals_init(void)
Expand Down

0 comments on commit 2421377

Please sign in to comment.