linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: penghao <penghao@uniontech.com>
To: jikos@kernel.org, benjamin.tissoires@redhat.com
Cc: linux-usb@vger.kernel.org, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, penghao@uniontech.com
Subject: [PATCH] USB HID: Add disabled wakeup from s3 by touchpad on byd zhaoxin notebook
Date: Wed, 19 Aug 2020 19:51:01 +0800	[thread overview]
Message-ID: <20200819115101.22532-1-penghao@uniontech.com> (raw)

BYD Notebook built-in touch pad, USB interface,so disabled,the touch pad
device idVendor 0x0c45 idProduct 0x7056

Signed-off-by: penghao <penghao@uniontech.com>
---
 drivers/hid/usbhid/hid-core.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 492dd641a25d..630a3cad211f 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -1193,7 +1193,13 @@ static int usbhid_start(struct hid_device *hid)
 			interface->desc.bInterfaceProtocol ==
 				USB_INTERFACE_PROTOCOL_KEYBOARD) {
 		usbhid_set_leds(hid);
-		device_set_wakeup_enable(&dev->dev, 1);
+		/*
+		 * USB HID: Add disabled touchpad wakeup on byd zhaoxin notebook
+		 */
+		if ((hid->vendor == 0x0c45) && (hid->product == 0x7056))
+			device_set_wakeup_enable(&dev->dev, 0);
+		else
+			device_set_wakeup_enable(&dev->dev, 1);
 	}
 
 	mutex_unlock(&usbhid->mutex);
-- 
2.11.0




             reply	other threads:[~2020-08-19 11:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19 11:51 penghao [this message]
2020-08-19 12:08 ` [PATCH] USB HID: Add disabled wakeup from s3 by touchpad on byd zhaoxin notebook Greg KH
     [not found]   ` <285385314.979590.1597840631436.JavaMail.xmail@bj-wm-cp-2>
2020-08-19 12:44     ` Re: [PATCH] USB HID: Add disabled wakeup from s3 by touchpad on bydzhaoxin notebook Greg KH
2020-08-25 11:37     ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200819115101.22532-1-penghao@uniontech.com \
    --to=penghao@uniontech.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).