Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149372
b: refs/heads/master
c: d5af277
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Eric Miao committed Jun 11, 2009
1 parent f28c97b commit 953b719
Show file tree
Hide file tree
Showing 2 changed files with 12 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: 5452537210d59268cbc283526dc050f0822385f1
refs/heads/master: d5af27783f8c898b64f7079908ad3e27632a71ea
14 changes: 11 additions & 3 deletions trunk/arch/arm/mach-pxa/sharpsl_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/delay.h>
#include <linux/leds.h>
#include <linux/suspend.h>
#include <linux/gpio.h>

#include <asm/mach-types.h>
#include <mach/pm.h>
Expand Down Expand Up @@ -918,9 +919,12 @@ static int __init sharpsl_pm_probe(struct platform_device *pdev)

sharpsl_pm.machinfo->init();

pxa_gpio_mode(sharpsl_pm.machinfo->gpio_acin | GPIO_IN);
pxa_gpio_mode(sharpsl_pm.machinfo->gpio_batfull | GPIO_IN);
pxa_gpio_mode(sharpsl_pm.machinfo->gpio_batlock | GPIO_IN);
gpio_request(sharpsl_pm.machinfo->gpio_acin, "AC IN");
gpio_direction_input(sharpsl_pm.machinfo->gpio_acin);
gpio_request(sharpsl_pm.machinfo->gpio_batfull, "Battery Full");
gpio_direction_input(sharpsl_pm.machinfo->gpio_batfull);
gpio_request(sharpsl_pm.machinfo->gpio_batlock, "Battery Lock");
gpio_direction_input(sharpsl_pm.machinfo->gpio_batlock);

/* Register interrupt handlers */
if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin), sharpsl_ac_isr, IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, "AC Input Detect", sharpsl_ac_isr)) {
Expand Down Expand Up @@ -979,6 +983,10 @@ static int sharpsl_pm_remove(struct platform_device *pdev)
if (sharpsl_pm.machinfo->batfull_irq)
free_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr);

gpio_free(sharpsl_pm.machinfo->gpio_batlock);
gpio_free(sharpsl_pm.machinfo->gpio_batfull);
gpio_free(sharpsl_pm.machinfo->gpio_acin);

if (sharpsl_pm.machinfo->exit)
sharpsl_pm.machinfo->exit();

Expand Down

0 comments on commit 953b719

Please sign in to comment.