aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-wiimote-core.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2011-11-17 08:12:12 -0500
committerJiri Kosina <jkosina@suse.cz>2011-11-22 17:11:10 -0500
commit43d782ae80b82667d66010d0d82aa80893a48d12 (patch)
treed757170b529aed0068bd987522b5c3e1aa32babe /drivers/hid/hid-wiimote-core.c
parent1d3452c63d4b62329d34d7634f67a3dbec21ca87 (diff)
HID: wiimote: Allow direct DRM debug access
Keep track of current drm and add new debugfs file which reads or writes the current DRM. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-wiimote-core.c')
-rw-r--r--drivers/hid/hid-wiimote-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c
index 2fd2f0337b8d..745667e8b61b 100644
--- a/drivers/hid/hid-wiimote-core.c
+++ b/drivers/hid/hid-wiimote-core.c
@@ -238,6 +238,7 @@ void wiiproto_req_drm(struct wiimote_data *wdata, __u8 drm)
238 cmd[1] = 0; 238 cmd[1] = 0;
239 cmd[2] = drm; 239 cmd[2] = drm;
240 240
241 wdata->state.drm = drm;
241 wiiproto_keep_rumble(wdata, &cmd[1]); 242 wiiproto_keep_rumble(wdata, &cmd[1]);
242 wiimote_queue(wdata, cmd, sizeof(cmd)); 243 wiimote_queue(wdata, cmd, sizeof(cmd));
243} 244}
@@ -1141,6 +1142,7 @@ static struct wiimote_data *wiimote_create(struct hid_device *hdev)
1141 spin_lock_init(&wdata->state.lock); 1142 spin_lock_init(&wdata->state.lock);
1142 init_completion(&wdata->state.ready); 1143 init_completion(&wdata->state.ready);
1143 mutex_init(&wdata->state.sync); 1144 mutex_init(&wdata->state.sync);
1145 wdata->state.drm = WIIPROTO_REQ_DRM_K;
1144 1146
1145 return wdata; 1147 return wdata;
1146 1148