Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3942975imu; Mon, 12 Nov 2018 03:14:00 -0800 (PST) X-Google-Smtp-Source: AJdET5eXoxsd7N5h3egzf5hi3t6FpVgxWW9O//2Ho4XKboBBQhjOthFbEr1LK+C836Buei6Tc5kw X-Received: by 2002:a17:902:163:: with SMTP id 90-v6mr532209plb.87.1542021240102; Mon, 12 Nov 2018 03:14:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542021240; cv=none; d=google.com; s=arc-20160816; b=oyr6i1XizRPWrxgH4YXZmgl4UOEV7xzGnB0iB78ops/Ii/TStbS3wISITMwwWAwmeu LMeV1mU15dlGvisPCFFhjLc8MalhNqYcLF5ZHNY6fPQ44MHviY6g8d7lwOESvhC42/Yy Qt3ed6VeeAUijDXerUuSCgiPXbFeHMFff6zq9J7dGlzaxUuzvpfQyXaABOiQHG9ZU38q tgobcgsSPsUHo46/XhonEy+Cdls6L7ah0Pbo5Qf9hSK1MVro6/fxsUkqIkFiy/swnWpT TjVnPtvE6Hs3Yn5ZZz9W7hWk+Oz3rFEjQiH9sBscUwFc5RS/GipjIQXunZrFri3HG01R esug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=CswHIA8tEHqpVzkXyUcR6WukXg8wl5xzBLmn9jSwykM=; b=KQxAMTyQhEA6CyDof1VsiUaiuJeqUjafMHhfxagQ8qr4xZIKujBP6pr3wZ9mIi1t1L LLLka2++VHSD2iNgbmmt76WElQOc03F2njZ5d4icAZeSw0Bv0NFFKP8yS6RVmyO4AghZ ZV7q/+0NGvGonU9m8rpSRFmckvmrMjBHMjj52MCS9cnSNcE0of6nG8ejShxHQL61ExR5 yDLZs4rgfexADbb/OjgpE7vS73tGH77/KmY+R7pWErPHtX3++UWNmbJxpPavx02vNkW6 ug3mzRkgNG4QuKFMT9ztnI86UPmVmVgVMxyTIbZO3hdb4Fv64MMVclN+Ai8tknTbPp1b tTIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si16518608pgs.267.2018.11.12.03.13.44; Mon, 12 Nov 2018 03:14:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729278AbeKLVF5 (ORCPT + 99 others); Mon, 12 Nov 2018 16:05:57 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:35342 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728350AbeKLVF5 (ORCPT ); Mon, 12 Nov 2018 16:05:57 -0500 Received: by mail-qk1-f193.google.com with SMTP id w204so12531100qka.2 for ; Mon, 12 Nov 2018 03:13:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CswHIA8tEHqpVzkXyUcR6WukXg8wl5xzBLmn9jSwykM=; b=jkrqiynaSfAMsuoyVFubIcW4ZzQKRpnxrwB9DbYLecknm2TsjKbPfe49f4LRTEPOQu i6ZUt1tziVTMvpSF9A/xU3rsrlP73AkltKBsUJ/n2OpJpIVd/gPuPYxoTdIpZmyqHlzU GxvUFJn24uGd/LBvzmBZSCOJzgR/T/OBi41Bp1855dWE6m2eRU6ctTa3zNoMAdShAHQ+ mUXbxLEuk71jlEYsVTySxony/mLf5jyMVwfqF9/X6SwKUhvRdkVLeal13u4qxuLl3Og8 hqOlYG2dP+52LP6oGEKBJ4SqPqKXiv7oTT/F1QcbLGrxmrl8Hku3/E26MvlYUswHGOE6 eVXQ== X-Gm-Message-State: AGRZ1gJdaxQl2rx2X3GtmuGiVmAsOJgACt0aTmVX470BKEtrErH8YyVA iAn3PwkRteVTQVadbii4MXh1DABy1/HsY+cQ/EdsMA== X-Received: by 2002:ac8:1a38:: with SMTP id v53mr409221qtj.362.1542021189314; Mon, 12 Nov 2018 03:13:09 -0800 (PST) MIME-Version: 1.0 References: <20181108235921.62193-1-bleung@chromium.org> In-Reply-To: From: Benjamin Tissoires Date: Mon, 12 Nov 2018 12:12:57 +0100 Message-ID: Subject: Re: [PATCH] HID: input: Ignore battery reported by Symbol DS4308 To: bleung@chromium.org Cc: Jiri Kosina , "open list:HID CORE LAYER" , lkml , Dmitry Torokhov , Dmitry Torokhov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 9, 2018 at 9:50 AM Benjamin Tissoires wrote: > > On Fri, Nov 9, 2018 at 12:59 AM Benson Leung wrote: > > > > The Motorola/Zebra Symbol DS4308-HD is a handheld USB barcode scanner > > which does not have a battery, but reports one anyway that always has > > capacity 2. > > > > Let's apply the IGNORE quirk to prevent it from being treated like a > > power supply so that userspaces don't get confused that this > > accessory is almost out of power and warn the user that they need to charge > > their wired barcode scanner. > > > > Reported here: https://bugs.chromium.org/p/chromium/issues/detail?id=804720 > > > > Signed-off-by: Benson Leung > > --- > > Reviewed-by: Benjamin Tissoires And applied, thanks > > > drivers/hid/hid-ids.h | 1 + > > drivers/hid/hid-input.c | 3 +++ > > 2 files changed, 4 insertions(+) > > > > diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h > > index c0d668944dbe..07f6348b9f86 100644 > > --- a/drivers/hid/hid-ids.h > > +++ b/drivers/hid/hid-ids.h > > @@ -1043,6 +1043,7 @@ > > #define USB_VENDOR_ID_SYMBOL 0x05e0 > > #define USB_DEVICE_ID_SYMBOL_SCANNER_1 0x0800 > > #define USB_DEVICE_ID_SYMBOL_SCANNER_2 0x1300 > > +#define USB_DEVICE_ID_SYMBOL_SCANNER_3 0x1200 > > > > #define USB_VENDOR_ID_SYNAPTICS 0x06cb > > #define USB_DEVICE_ID_SYNAPTICS_TP 0x0001 > > diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c > > index a2f74e6adc70..44ea8e7c71a9 100644 > > --- a/drivers/hid/hid-input.c > > +++ b/drivers/hid/hid-input.c > > @@ -325,6 +325,9 @@ static const struct hid_device_id hid_battery_quirks[] = { > > { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, > > USB_DEVICE_ID_ELECOM_BM084), > > HID_BATTERY_QUIRK_IGNORE }, > > + { HID_USB_DEVICE(USB_VENDOR_ID_SYMBOL, > > + USB_DEVICE_ID_SYMBOL_SCANNER_3), > > + HID_BATTERY_QUIRK_IGNORE }, > > {} > > }; > > > > -- > > 2.19.1.930.g4563a0d9d0-goog > >