aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hid.h
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@enac.fr>2011-01-07 17:44:32 -0500
committerJiri Kosina <jkosina@suse.cz>2011-01-11 15:26:53 -0500
commit0d2689c0f054f6a8bf3115d6386bd9c2d65dc44b (patch)
tree09550f95283383e63b216d19f39406c7e2881afe /include/linux/hid.h
parent31b6ca0af758a88e5e769b48cc6dde037ee37b96 (diff)
HID: add feature_mapping callback
Currently hid doesn't export the features it knows to the specific modules. Some information can be really important in such features: MosArt and Cypress devices are by default not in a multitouch mode. We have to send the value 2 on the right feature. This patch exports to the module the features report so they can find the right feature to set up the correct mode. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include/linux/hid.h')
-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 bb0f56f5c01e..96bd7920a01a 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -593,6 +593,7 @@ struct hid_usage_id {
593 * @report_fixup: called before report descriptor parsing (NULL means nop) 593 * @report_fixup: called before report descriptor parsing (NULL means nop)
594 * @input_mapping: invoked on input registering before mapping an usage 594 * @input_mapping: invoked on input registering before mapping an usage
595 * @input_mapped: invoked on input registering after mapping an usage 595 * @input_mapped: invoked on input registering after mapping an usage
596 * @feature_mapping: invoked on feature registering
596 * @suspend: invoked on suspend (NULL means nop) 597 * @suspend: invoked on suspend (NULL means nop)
597 * @resume: invoked on resume if device was not reset (NULL means nop) 598 * @resume: invoked on resume if device was not reset (NULL means nop)
598 * @reset_resume: invoked on resume if device was reset (NULL means nop) 599 * @reset_resume: invoked on resume if device was reset (NULL means nop)
@@ -636,6 +637,9 @@ struct hid_driver {
636 int (*input_mapped)(struct hid_device *hdev, 637 int (*input_mapped)(struct hid_device *hdev,
637 struct hid_input *hidinput, struct hid_field *field, 638 struct hid_input *hidinput, struct hid_field *field,
638 struct hid_usage *usage, unsigned long **bit, int *max); 639 struct hid_usage *usage, unsigned long **bit, int *max);
640 void (*feature_mapping)(struct hid_device *hdev,
641 struct hid_input *hidinput, struct hid_field *field,
642 struct hid_usage *usage);
639#ifdef CONFIG_PM 643#ifdef CONFIG_PM
640 int (*suspend)(struct hid_device *hdev, pm_message_t message); 644 int (*suspend)(struct hid_device *hdev, pm_message_t message);
641 int (*resume)(struct hid_device *hdev); 645 int (*resume)(struct hid_device *hdev);