Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp414616pxa; Wed, 19 Aug 2020 05:11:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwq753TAEo2rDeXDkzD3UNrJVAfGD6NZpaSuz0oqspRN4tQcMTcpBgy0Z76Fbx3AaiCs0Ig X-Received: by 2002:aa7:d54d:: with SMTP id u13mr3073900edr.356.1597839065820; Wed, 19 Aug 2020 05:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597839065; cv=none; d=google.com; s=arc-20160816; b=DDVJM6xiRa0fB0VKxnKxqZcFUn5ygFvDbqr310HVjTS8S1g3TvXZwamEEN+NFxNc63 6425jgnf7GYfEsz8BL2Cx8zoyG13qv27mNfCUjHuqYelic5AWKgAh1e5Iy+U59bh1mNE CkQ7xDZvcRuhMDz0Wy9yn0IIAehxOVq37SyRaqE4D9KGr/gqxtECGDnxGOWDhWRsqGrV yv1r3eXJYZYvjjwQrrrnlg5Np/VaYCjTzsswNLtJKmr/rAjK2K94pC9/t9dGGBGy+Inh 8xBMCBcb9L+Ecm+HW7EE9NE+zYE+FPCQY8NPl60m/UuOaJ8nzMjdChGcSV3yTkuJu+co XCOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=YI8e15tS5trv0VW3ExmLNjsDCj8++RhE/HGbSLQofDw=; b=DC4Am36S7IDCDfpHvHBjW9HcNSn+is+sOL5zB03q2HlbtUF6iHxXvV8PSAutio/sxK qPSuvTp3MLGb8VF4ApvLLXoki4MmX4SHfZzWPMu/wz3JPiQbqTlKqBwk2tjebJP/pERn I3/qsr9M0A2GIpwX8MTzXC2YwdMv7/PGPZd/uWMfAwbRKueFPgzGCx1fSw7fm1tap85v dKSiGRpUVM9lSfto0zHdj0JkgjDaIp3eJ2bRos2E8X57/L38ji75ssy184rx3+w/zcze J0Y0w8HmKy7OtDNBIZMpOwXjRAlBUm8CW8nlR7HdzP8wLWPZRG3fqFL4BzXm4Wcm0EeP 1lqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="p/C6dXOh"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e24si14683961eds.212.2020.08.19.05.10.41; Wed, 19 Aug 2020 05:11:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="p/C6dXOh"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728106AbgHSMKB (ORCPT + 99 others); Wed, 19 Aug 2020 08:10:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:46818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728200AbgHSMIe (ORCPT ); Wed, 19 Aug 2020 08:08:34 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C9E36205CB; Wed, 19 Aug 2020 12:08:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597838914; bh=ds1bI2FNOetemI0iGOxjd//vmJ7FuX5vgPU2SVW5nOQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p/C6dXOhGr5YrrBD8slToXpFiWvIHbiPDOvXWigza0lxxRXRnLPlwHZI9paHkeb1N M4gl2HAbv84kIqey4gd+t1DIqIUOzNWzBwTs+HjZfQOz2ZzOHlBj8j0wQzyRs7DuNg Werlhf12WnCxzoLwZubGDmLmSuSP0vTLPYlyy/EY= Date: Wed, 19 Aug 2020 14:08:56 +0200 From: Greg KH To: penghao Cc: jikos@kernel.org, benjamin.tissoires@redhat.com, linux-usb@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] USB HID: Add disabled wakeup from s3 by touchpad on byd zhaoxin notebook Message-ID: <20200819120856.GA931936@kroah.com> References: <20200819115101.22532-1-penghao@uniontech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200819115101.22532-1-penghao@uniontech.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 19, 2020 at 07:51:01PM +0800, penghao wrote: > BYD Notebook built-in touch pad, USB interface,so disabled,the touch pad > device idVendor 0x0c45 idProduct 0x7056 > > Signed-off-by: penghao > --- > 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); Shouldn't this be a quirk somewhere instead of this core check? thanks, greg k-h