diff --git a/linux-4.19/hi3516dv300_small_patch/hi3516dv300_small.patch b/linux-4.19/hi3516dv300_small_patch/hi3516dv300_small.patch index 4bd6f1fa924b88485d92a8c11b4c34f4bd599442..299188bac5ba7d3d30885b7805e80b134959e08f 100644 --- a/linux-4.19/hi3516dv300_small_patch/hi3516dv300_small.patch +++ b/linux-4.19/hi3516dv300_small_patch/hi3516dv300_small.patch @@ -303444,32 +303444,6 @@ index 05122167d9d8..98db2015b83f 100644 } EXPORT_SYMBOL_GPL(hid_disconnect); -diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c -index 11bd2ca22a2e..e8d78ad05422 100644 ---- a/drivers/hid/hid-input.c -+++ b/drivers/hid/hid-input.c -@@ -31,7 +31,7 @@ - - #include - #include -- -+#include "hdf_hid_adapter.h" - #include "hid-ids.h" - - #define unk KEY_UNKNOWN -@@ -1364,8 +1364,11 @@ void hidinput_report_event(struct hid_device *hid, struct hid_report *report) - if (hid->quirks & HID_QUIRK_NO_INPUT_SYNC) - return; - -- list_for_each_entry(hidinput, &hid->inputs, list) -+ list_for_each_entry(hidinput, &hid->inputs, list) { - input_sync(hidinput->input); -+ if (hid->input_dev) -+ HidReportEvent(hid->input_dev, EV_SYN, SYN_REPORT, 0); -+ } - } - EXPORT_SYMBOL_GPL(hidinput_report_event); - diff --git a/drivers/hidmac/Kconfig b/drivers/hidmac/Kconfig new file mode 100644 index 000000000000..dcb3e08bf5d2 @@ -364685,4 +364659,66 @@ index 67048f922ff2..e950f32243b6 100755 ipv6_addr_metric) ipv6_addr_metric_test;; -- 2.25.1 - +diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c +index 11bd2ca22..7c040f28a 100644 +--- a/drivers/hid/hid-input.c ++++ b/drivers/hid/hid-input.c +@@ -31,7 +31,7 @@ + + #include + #include +- ++#include "hdf_hid_adapter.h" + #include "hid-ids.h" + + #define unk KEY_UNKNOWN +@@ -1364,8 +1364,11 @@ void hidinput_report_event(struct hid_device *hid, struct hid_report *report) + if (hid->quirks & HID_QUIRK_NO_INPUT_SYNC) + return; + +- list_for_each_entry(hidinput, &hid->inputs, list) ++ list_for_each_entry(hidinput, &hid->inputs, list) { + input_sync(hidinput->input); ++ if(hid->input_dev) ++ HidReportEvent(hid->input_dev, EV_SYN, SYN_REPORT, 0); ++ } + } + EXPORT_SYMBOL_GPL(hidinput_report_event); + +@@ -1729,6 +1732,27 @@ static inline void hidinput_configure_usages(struct hid_input *hidinput, + report->field[i]->usage + j); + } + ++static void transferinfo(struct input_dev *dev) ++{ ++ HidInfo info; ++ info.devName = dev->name; ++ memcpy(info.devProp, dev->propbit, sizeof(unsigned long) * BITS_TO_LONGS(INPUT_PROP_CNT)); ++ memcpy(info.eventType, dev->evbit, sizeof(unsigned long) * BITS_TO_LONGS(EV_CNT)); ++ memcpy(info.keyCode, dev->keybit, sizeof(unsigned long) * BITS_TO_LONGS(KEY_CNT)); ++ memcpy(info.relCode, dev->relbit, sizeof(unsigned long) * BITS_TO_LONGS(REL_CNT)); ++ memcpy(info.absCode, dev->absbit, sizeof(unsigned long) * BITS_TO_LONGS(ABS_CNT)); ++ memcpy(info.miscCode, dev->mscbit, sizeof(unsigned long) * BITS_TO_LONGS(MSC_CNT)); ++ memcpy(info.ledCode, dev->ledbit, sizeof(unsigned long) * BITS_TO_LONGS(LED_CNT)); ++ memcpy(info.soundCode, dev->sndbit, sizeof(unsigned long) * BITS_TO_LONGS(SND_CNT)); ++ memcpy(info.forceCode, dev->ffbit, sizeof(unsigned long) * BITS_TO_LONGS(FF_CNT)); ++ memcpy(info.switchCode, dev->swbit, sizeof(unsigned long) * BITS_TO_LONGS(SW_CNT)); ++ info.bustype = dev->id.bustype; ++ info.vendor = dev->id.vendor; ++ info.product = dev->id.product; ++ info.version = dev->id.version; ++ GetInfoFromHid(info); ++} ++ + /* + * Register the input device; print a message. + * Configure the input layer interface +@@ -1811,7 +1835,7 @@ int hidinput_connect(struct hid_device *hid, unsigned int force) + hidinput_cleanup_hidinput(hid, hidinput); + continue; + } +- ++ transferinfo(hidinput->input); + if (input_register_device(hidinput->input)) + goto out_unwind; + hidinput->registered = true;