From patchwork Wed Jun 5 19:45:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pedro Vanzella X-Patchwork-Id: 10977695 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8AD736C5 for ; Wed, 5 Jun 2019 19:46:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F6F528680 for ; Wed, 5 Jun 2019 19:46:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73F7B287DC; Wed, 5 Jun 2019 19:46:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1901E28680 for ; Wed, 5 Jun 2019 19:46:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726502AbfFETqF (ORCPT ); Wed, 5 Jun 2019 15:46:05 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:60551 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726421AbfFETqF (ORCPT ); Wed, 5 Jun 2019 15:46:05 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id B948522513; Wed, 5 Jun 2019 15:46:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 05 Jun 2019 15:46:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= pedrovanzella.com; h=from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=fm3; bh=x5A4X9kps/1wo CZo+kGU09DojzghTluX+8UD453C1EU=; b=ObdEykcBMNgofV+n93BlMXPN8MqzB wsefx1NCZSOHRqcRtliTEsmKjdPDMftpIpxvLVyO6DiYUPvh2A9bF/oZZYVt/ZEs K3Nn7EGApw3AzAjRj9Tq+DRAFgl8MbuQR7IVF+veyamKyCoyj6K5+MC3nTu9AOLP IZPOErhchXXJQ9/Ww3HKZBjgSSHu5b7egni3QfH5Au2r+1YU1Ycdzoy5rm0CiYeg xKnwZ5gfkj7b+92Fpdkrvo83QnkYavBou1LDqSWTcB1jU29gNxOFp7YyXw16K2DF VQ5DfCQzbVmR6lr63POimEgEyXMYfQYQ080lyrROKJ21cTG67kO5veVNg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=x5A4X9kps/1woCZo+ kGU09DojzghTluX+8UD453C1EU=; b=MScdOzldZ3M09EOmkzGXY5Y+A7hAD3Rc0 UUix2avlzkqqLMAJ+vN2JFaOYTN6IIzY/qY/D2vuac92H3UbPmOfg3Y2wmmWuUuZ 3JVkyIfjQ8HamxV+w6UEU2nd2nr9OH7XYXB1MImGJGbP/8flFaKLnlEbDbtxhuBo cXM9C8eCIriGXZeBzU2UcNTvneWiC7Dya0jbW+G7452CFPQ+axxLoByRfWZMcGiZ BtjH9Xlp7Olu5v37Q6ghDeFRLO08RlrmGDFnX0VoB2JgzRV67DVIbXPnCMdVYS7n FF7jpJNOP++v3uj+s0IiRqTtV3JgXv2aYHEKacj3/5yOTmq4cENOA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudegvddgudeggecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomheprfgvughrohcu gggrnhiivghllhgruceophgvughrohesphgvughrohhvrghniigvlhhlrgdrtghomheqne cukfhppeejtddrvdejrddvjedrudegleenucfrrghrrghmpehmrghilhhfrhhomhepphgv ughrohesphgvughrohhvrghniigvlhhlrgdrtghomhenucevlhhushhtvghrufhiiigvpe dt X-ME-Proxy: Received: from localhost (toroon020aw-lp130-02-70-27-27-149.dsl.bell.ca [70.27.27.149]) by mail.messagingengine.com (Postfix) with ESMTPA id 0603E80063; Wed, 5 Jun 2019 15:46:02 -0400 (EDT) From: Pedro Vanzella To: linux-input@vger.kernel.org Cc: Pedro Vanzella , Jiri Kosina , Benjamin Tissoires , linux-kernel@vger.kernel.org Subject: [PATCH v2 0/4] Read battery voltage from G403 and G900 mice Date: Wed, 5 Jun 2019 15:45:29 -0400 Message-Id: <20190605194533.18717-1-pedro@pedrovanzella.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The gaming line of Logitech devices doesn't use the old hidpp20 feature for battery level reporting. Instead, they report the current voltage of the battery, in millivolts. This patch set handles this case by adding a quirk to the devices we know to have this new feature, in both wired and wireless mode. This version of the patch set is better split, as well as adding the quirk to make sure we don't needlessly probe every device connected. Pedro Vanzella (4): HID: hid-logitech-hidpp: add quirk to handle battery voltage HID: hid-logitech-hidpp: add function to query battery voltage HID: hid-logitech-hidpp: report battery voltage to the power supply HID: hid-logitech-hidpp: subscribe to battery voltage events drivers/hid/hid-logitech-hidpp.c | 150 ++++++++++++++++++++++++++++++- 1 file changed, 147 insertions(+), 3 deletions(-) Reviewed-by: Filipe LaĆ­ns