Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270851
b: refs/heads/master
c: 5f07c32
h: refs/heads/master
i:
  270849: 2534ab0
  270847: abf67a1
v: v3
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Oct 12, 2011
1 parent ac1c070 commit 2e47afb
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 70601ec10a2450369d554e49d708ab26deb17b66
refs/heads/master: 5f07c32e289d159be3fc1e4f257e8cad5336f83a
7 changes: 7 additions & 0 deletions trunk/drivers/input/misc/twl6040-vibra.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@ static int vibra_play(struct input_dev *input, void *data,
struct vibra_info *info = input_get_drvdata(input);
int ret;

/* Do not allow effect, while the routing is set to use audio */
ret = twl6040_get_vibralr_status(info->twl6040);
if (ret & TWL6040_VIBSEL) {
dev_info(&input->dev, "Vibra is configured for audio\n");
return -EBUSY;
}

info->weak_speed = effect->u.rumble.weak_magnitude;
info->strong_speed = effect->u.rumble.strong_magnitude;
info->direction = effect->direction < EFFECT_DIR_180_DEG ? 1 : -1;
Expand Down

0 comments on commit 2e47afb

Please sign in to comment.