Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149357
b: refs/heads/master
c: 2f15cb5
h: refs/heads/master
i:
  149355: a923590
v: v3
  • Loading branch information
Mike Rapoport authored and Eric Miao committed Jun 5, 2009
1 parent 02d6398 commit 61f5313
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 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: 76e3fc36eb3d78997e7f4dcdc01cc38dc3178201
refs/heads/master: 2f15cb594e0c17177bd79ead9234cc6806954e6f
32 changes: 29 additions & 3 deletions trunk/arch/arm/mach-pxa/em-x270.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,26 +684,52 @@ static int em_x270_libertas_setup(struct spi_device *spi)
if (err)
return err;

err = gpio_request(GPIO19_WLAN_STRAP, "WLAN STRAP");
if (err)
goto err_free_pwen;

if (machine_is_exeda()) {
err = gpio_request(GPIO37_WLAN_RST, "WLAN RST");
if (err)
goto err_free_strap;

gpio_direction_output(GPIO37_WLAN_RST, 1);
msleep(100);
}

gpio_direction_output(GPIO19_WLAN_STRAP, 1);
mdelay(100);
msleep(100);

pxa2xx_mfp_config(ARRAY_AND_SIZE(em_x270_libertas_pin_config));

gpio_direction_output(GPIO115_WLAN_PWEN, 0);
mdelay(100);
msleep(100);
gpio_set_value(GPIO115_WLAN_PWEN, 1);
mdelay(100);
msleep(100);

spi->bits_per_word = 16;
spi_setup(spi);

return 0;

err_free_strap:
gpio_free(GPIO19_WLAN_STRAP);
err_free_pwen:
gpio_free(GPIO115_WLAN_PWEN);

return err;
}

static int em_x270_libertas_teardown(struct spi_device *spi)
{
gpio_set_value(GPIO115_WLAN_PWEN, 0);
gpio_free(GPIO115_WLAN_PWEN);
gpio_free(GPIO19_WLAN_STRAP);

if (machine_is_exeda()) {
gpio_set_value(GPIO37_WLAN_RST, 0);
gpio_free(GPIO37_WLAN_RST);
}

return 0;
}
Expand Down

0 comments on commit 61f5313

Please sign in to comment.