From: Frank Praznik <frank.praznik@oh.rr.com>
To: linux-input@vger.kernel.org
Cc: jkosina@suse.cz, simon@mungewell.org,
Frank Praznik <frank.praznik@oh.rr.com>
Subject: [PATCH v5 7/7] HID: hid-sony - allow 3rd party INTEC controller to turn off all leds
Date: Mon, 14 Apr 2014 10:11:37 -0400 [thread overview]
Message-ID: <1397484697-2389-8-git-send-email-frank.praznik@oh.rr.com> (raw)
In-Reply-To: <1397484697-2389-1-git-send-email-frank.praznik@oh.rr.com>
From: Simon Wood <simon@mungewell.org>
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>
---
drivers/hid/hid-sony.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 54a04ba..bc3c6ee 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -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.
--
1.8.5.3
next prev parent reply other threads:[~2014-04-14 14:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 14:11 [PATCH v5 0/7] HID: sony: More Sony controller fixes and improvements Frank Praznik
2014-04-14 14:11 ` [PATCH v5 1/7] HID: sony: Use inliners for work queue initialization and cancellation Frank Praznik
2014-04-14 14:11 ` [PATCH v5 2/7] HID: sony: Use a struct for the Sixaxis output report Frank Praznik
2014-04-14 14:11 ` [PATCH v5 3/7] HID: sony: Convert startup and shutdown functions to use a uniform parameter type Frank Praznik
2014-04-14 14:11 ` [PATCH v5 4/7] HID: sony: Use the controller Bluetooth MAC address as the unique value in the battery name string Frank Praznik
2014-04-14 14:11 ` [PATCH v5 5/7] HID: sony: Initialize the controller LEDs with a device ID value Frank Praznik
2014-04-14 14:11 ` [PATCH v5 6/7] HID: sony: Add blink support to the Sixaxis and DualShock 4 LEDs Frank Praznik
2014-04-14 14:11 ` Frank Praznik [this message]
2014-04-18 17:24 ` [PATCH v5 0/7] HID: sony: More Sony controller fixes and improvements simon
2014-04-24 16:56 ` Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1397484697-2389-8-git-send-email-frank.praznik@oh.rr.com \
--to=frank.praznik@oh.rr.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=simon@mungewell.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.