aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumarg@android.com>2011-09-20 16:40:43 -0700
committerPraneeth Bajjuri <praneeth@ti.com>2011-09-27 17:16:33 -0500
commitd6b260b4e01c151c1fdd29ffb695a0e2fc639176 (patch)
tree6f763a5ab4c54789822354f1e080b04ee79c4faa /include
parent34466e466a7c567a8bf7cfd6a711075a7111d06e (diff)
downloadlinux-linaro-d6b260b4e01c151c1fdd29ffb695a0e2fc639176.tar.gz
HID: Add input_register callback.
Add input_register callback which gets called after hid_configure_usage is called for all the reports and before the input device is registered. This allows individual drivers to do extra work like input mapping just before device registration. Based on discussions with David Herrmann <dh.herrmann@googlemail.com> Change-Id: Idab6fb4f7b1e5e569bd0410967288717e9d34c98 Signed-off-by: Jaikumar Ganesh <jaikumarg@android.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/hid.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 9cf8e7ae745..ab64d4768f6 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -598,6 +598,8 @@ struct hid_usage_id {
* @input_mapping: invoked on input registering before mapping an usage
* @input_mapped: invoked on input registering after mapping an usage
* @feature_mapping: invoked on feature registering
+ * @input_register: called just before input device is registered after reports
+ * are parsed.
* @suspend: invoked on suspend (NULL means nop)
* @resume: invoked on resume if device was not reset (NULL means nop)
* @reset_resume: invoked on resume if device was reset (NULL means nop)
@@ -644,6 +646,8 @@ struct hid_driver {
void (*feature_mapping)(struct hid_device *hdev,
struct hid_field *field,
struct hid_usage *usage);
+ int (*input_register)(struct hid_device *hdev, struct hid_input
+ *hidinput);
#ifdef CONFIG_PM
int (*suspend)(struct hid_device *hdev, pm_message_t message);
int (*resume)(struct hid_device *hdev);