summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-wiimote.h
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2011-11-17 17:12:00 +0400
committerJiri Kosina <jkosina@suse.cz>2011-11-23 02:08:09 +0400
commitfad8c0e34323eb7789f93750258a2cf02dc6cf69 (patch)
treebb2b0f3b89fa751702dec42681cdb1bf206d0259 /drivers/hid/hid-wiimote.h
parent7e274400629fbf8eab294fef39c3efde463966a9 (diff)
downloadlinux-fad8c0e34323eb7789f93750258a2cf02dc6cf69.tar.xz
HID: wiimote: Add read-mem helpers
Add helper functions similar to the write-mem helpers but for reading wiimote memory and eeprom. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-wiimote.h')
-rw-r--r--drivers/hid/hid-wiimote.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hid/hid-wiimote.h b/drivers/hid/hid-wiimote.h
index d78f79c08901..865740d3a3fe 100644
--- a/drivers/hid/hid-wiimote.h
+++ b/drivers/hid/hid-wiimote.h
@@ -62,6 +62,8 @@ struct wiimote_state {
/* results of synchronous requests */
__u8 cmd_battery;
__u8 cmd_err;
+ __u8 *cmd_read_buf;
+ __u8 cmd_read_size;
};
struct wiimote_data {
@@ -113,6 +115,8 @@ enum wiiproto_reqs {
extern void wiiproto_req_drm(struct wiimote_data *wdata, __u8 drm);
extern int wiimote_cmd_write(struct wiimote_data *wdata, __u32 offset,
const __u8 *wmem, __u8 size);
+extern ssize_t wiimote_cmd_read(struct wiimote_data *wdata, __u32 offset,
+ __u8 *rmem, __u8 size);
/* requires the state.lock spinlock to be held */
static inline bool wiimote_cmd_pending(struct wiimote_data *wdata, int cmd,