aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2012-07-30 13:28:18 +0200
committerHenrik Rydberg <rydberg@euromail.se>2012-09-19 19:50:20 +0200
commit9ebf3d7687192923e3d44fdbcd8d9f8375053fb8 (patch)
tree6973ce11e93dc97c3d5766bbc8f8b45814c0688e /include
parentInput: MT - Allow legacy pressure computation (diff)
downloadlinux-dev-9ebf3d7687192923e3d44fdbcd8d9f8375053fb8.tar.xz
linux-dev-9ebf3d7687192923e3d44fdbcd8d9f8375053fb8.zip
HID: Add an input configured notification callback
A hid device may create several input devices, and a driver may need to prepare or finalize the configuration per input device. Currently, there is no sane way for a driver to know when a device has been configured. This patch adds a callback providing that information. Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> Tested-by: Ping Cheng <pingc@wacom.com> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'include')
-rw-r--r--include/linux/hid.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 42970de1b40c..f37da2803005 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -626,6 +626,7 @@ struct hid_usage_id {
* @report_fixup: called before report descriptor parsing (NULL means nop)
* @input_mapping: invoked on input registering before mapping an usage
* @input_mapped: invoked on input registering after mapping an usage
+ * @input_configured: invoked just before the device is registered
* @feature_mapping: invoked on feature registering
* @suspend: invoked on suspend (NULL means nop)
* @resume: invoked on resume if device was not reset (NULL means nop)
@@ -670,6 +671,8 @@ struct hid_driver {
int (*input_mapped)(struct hid_device *hdev,
struct hid_input *hidinput, struct hid_field *field,
struct hid_usage *usage, unsigned long **bit, int *max);
+ void (*input_configured)(struct hid_device *hdev,
+ struct hid_input *hidinput);
void (*feature_mapping)(struct hid_device *hdev,
struct hid_field *field,
struct hid_usage *usage);