Skip to content

Commit

Permalink
HID: hid-sony - allow 3rd party INTEC controller to turn off all leds
Browse files Browse the repository at this point in the history
Without this patch the 3rd party INTEC (PS3) controller will blink all
leds when user turns them off, it appears to require an extra flag set.

Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Simon Wood authored and Jiri Kosina committed Apr 24, 2014
1 parent b3ed458 commit 88f6576
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/hid/hid-sony.c
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,10 @@ static void sixaxis_state_worker(struct work_struct *work)
report.data.leds_bitmap |= sc->led_state[2] << 3;
report.data.leds_bitmap |= sc->led_state[3] << 4;

/* Set flag for all leds off, required for 3rd party INTEC controller */
if ((report.data.leds_bitmap & 0x1E) == 0)
report.data.leds_bitmap |= 0x20;

/*
* The LEDs in the report are indexed in reverse order to their
* corresponding light on the controller.
Expand Down

0 comments on commit 88f6576

Please sign in to comment.