Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31216
b: refs/heads/master
c: bd66f3b
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and Jaroslav Kysela committed Jun 28, 2006
1 parent 6e8a044 commit 9901c63
Show file tree
Hide file tree
Showing 2 changed files with 16 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: c6feefd03ed12d89af591345fb9c26de7098764d
refs/heads/master: bd66f3bbc369191279d18c21f305341c8bc9cafe
15 changes: 15 additions & 0 deletions trunk/sound/aoa/core/snd-aoa-gpio-feature.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,17 @@ static void ftr_handle_notify(void *data)
mutex_unlock(&notif->mutex);
}

static void gpio_enable_dual_edge(int gpio)
{
int v;

if (gpio == -1)
return;
v = pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, gpio, 0);
v |= 0x80; /* enable dual edge */
pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, gpio, v);
}

static void ftr_gpio_init(struct gpio_runtime *rt)
{
get_gpio("headphone-mute", NULL,
Expand Down Expand Up @@ -234,6 +245,10 @@ static void ftr_gpio_init(struct gpio_runtime *rt)
&linein_detect_gpio,
&linein_detect_gpio_activestate);

gpio_enable_dual_edge(headphone_detect_gpio);
gpio_enable_dual_edge(lineout_detect_gpio);
gpio_enable_dual_edge(linein_detect_gpio);

get_irq(headphone_detect_node, &headphone_detect_irq);
get_irq(lineout_detect_node, &lineout_detect_irq);
get_irq(linein_detect_node, &linein_detect_irq);
Expand Down

0 comments on commit 9901c63

Please sign in to comment.