Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220993
b: refs/heads/master
c: 48cd65a
h: refs/heads/master
i:
  220991: 9c8960e
v: v3
  • Loading branch information
Vasily Khoruzhick authored and Ben Dooks committed Sep 26, 2010
1 parent 5cb8a55 commit 017fcea
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 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: 14477095abc661a9f195ca4733bb739c54794b32
refs/heads/master: 48cd65a6a020292e1ab5d0f5ba96571c858964e6
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-s3c2410/include/mach/h1940-latch.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#define H1940_LATCH_AUDIO_POWER H1940_LATCH_GPIO(9)
#define H1940_LATCH_SM803_ENABLE H1940_LATCH_GPIO(10)
#define H1940_LATCH_LCD_P4 H1940_LATCH_GPIO(11)
#define H1940_LATCH_CPUQ5 H1940_LATCH_GPIO(12)
#define H1940_LATCH_SD_POWER H1940_LATCH_GPIO(12)
#define H1940_LATCH_BLUETOOTH_POWER H1940_LATCH_GPIO(13)
#define H1940_LATCH_LED_GREEN H1940_LATCH_GPIO(14)
#define H1940_LATCH_LED_FLASH H1940_LATCH_GPIO(15)
Expand Down
23 changes: 20 additions & 3 deletions trunk/arch/arm/mach-s3c2410/mach-h1940.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ static unsigned int latch_state = H1940_LATCH_BIT(H1940_LATCH_LCD_P4) |
H1940_LATCH_BIT(H1940_LATCH_LCD_P1) |
H1940_LATCH_BIT(H1940_LATCH_LCD_P2) |
H1940_LATCH_BIT(H1940_LATCH_LCD_P3) |
H1940_LATCH_BIT(H1940_LATCH_MAX1698_nSHUTDOWN) |
H1940_LATCH_BIT(H1940_LATCH_CPUQ5);
H1940_LATCH_BIT(H1940_LATCH_MAX1698_nSHUTDOWN);

static void h1940_latch_control(unsigned int clear, unsigned int set)
{
Expand Down Expand Up @@ -247,10 +246,25 @@ static struct platform_device h1940_device_bluetooth = {
.id = -1,
};

static void h1940_set_mmc_power(unsigned char power_mode, unsigned short vdd)
{
switch (power_mode) {
case MMC_POWER_OFF:
gpio_set_value(H1940_LATCH_SD_POWER, 0);
break;
case MMC_POWER_UP:
case MMC_POWER_ON:
gpio_set_value(H1940_LATCH_SD_POWER, 1);
break;
default:
break;
};
}

static struct s3c24xx_mci_pdata h1940_mmc_cfg __initdata = {
.gpio_detect = S3C2410_GPF(5),
.gpio_wprotect = S3C2410_GPH(8),
.set_power = NULL,
.set_power = h1940_set_mmc_power,
.ocr_avail = MMC_VDD_32_33,
};

Expand Down Expand Up @@ -397,6 +411,9 @@ static void __init h1940_init(void)
gpio_request(H1940_LATCH_USB_DP, "USB pullup");
gpio_direction_output(H1940_LATCH_USB_DP, 0);

gpio_request(H1940_LATCH_SD_POWER, "SD power");
gpio_direction_output(H1940_LATCH_SD_POWER, 0);

platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices));
}

Expand Down

0 comments on commit 017fcea

Please sign in to comment.