Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp696253ybz; Wed, 15 Apr 2020 16:57:10 -0700 (PDT) X-Google-Smtp-Source: APiQypLAnP4XRAMn/wME48iGwtbR6w0c6EsD7S00yhp3Yv0MBzragwgUaWrp2Wi2xTcDlAiUcPdI X-Received: by 2002:a17:906:2ad4:: with SMTP id m20mr7659723eje.324.1586995030071; Wed, 15 Apr 2020 16:57:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586995030; cv=none; d=google.com; s=arc-20160816; b=Q6GfA9dbw66SJcwfa98asu51jXpbfBVNpoTTTqWYFS2OLuLMKUf/KJH4XflSIrwOT9 jPanoQn+x5vhJr+lGLY64DFWME1bDO7+7ZaX/ro6kB3ntMFh56QTfXcEXHPbakdc7u5Y vk6Ag5AkyG0cjIce+h+qeKaosogmfBOuu7ad61Mra0Bl1oY7KccgnsEFkDrLTrdLGubO CJSdsly7e8wkr4xO5uU8B2rV34T8cB9JBDHbs7mmza4ckm7yUE4aPGe8Gk6njwBanozc Ge3B5m6tf0pj7O41l8jAm+j8yOLbcEF57zp/icoyD89C77xRdza7iZ1hen8O98RlLK28 m+tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=lTvs4wwT9mex/mfZcneiEGYMME5Fb0P/C72x4jJeC0k=; b=Sq0JOAyMrN9FSXynTey48DDdsrjPEQFR1qCihtBM9HzrkyWTK+Om+v3Itc/aaYD9jv vrPn/yhI0JJBhU4WUVy/mgNEomV2sTm7uIQ/H5HsG41k0FfbmIp5AB/5pOnwNJ1M871f SX3TWwIyf4rz2YJl6akn+hDNC6iKu7/B2uXJ4upz9IOs+ie0D6hZwwG0vB/wYTY8h6QH W55MmsJ0ORiYn25ifKCFM0jSdt2kOxy6AHURHe+6TksXW7+3jXZtTA5+K54CjWuwKIVF tn7ijlzSdVBs7GAgK1jCu8XBlqcBWYm26Cz7WPtE75yo7vMLiMOOvaIRug8O4YDpb8oM qiFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IiCKWJvZ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k11si8893418ejp.508.2020.04.15.16.56.46; Wed, 15 Apr 2020 16:57:10 -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=IiCKWJvZ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S370643AbgDOMyw (ORCPT + 99 others); Wed, 15 Apr 2020 08:54:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:37274 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2897211AbgDOMyi (ORCPT ); Wed, 15 Apr 2020 08:54:38 -0400 Received: from pobox.suse.cz (prg-ext-pat.suse.com [213.151.95.130]) (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 A43EA206D5; Wed, 15 Apr 2020 12:54:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586955278; bh=vkQZmf+zD+ArKC+EwWvdATC5JyOKWkdALl4rkDZGb2o=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=IiCKWJvZJ+CWEJub7UXbp6ayjiB1HAgLK3ioO6igV41b2KjhzPC389Qox0Z6Lro13 kMOfTzAWO/6kCzNZ2FNgsTFPrP8eFMRKu4aOWEXUItDHpH0c9hWJOlRuIpqVDQZ6a5 vwBhDtM+zIj4yr7fI0vfkBfeZztpU0tEthsFzseE= Date: Wed, 15 Apr 2020 14:54:34 +0200 (CEST) From: Jiri Kosina To: Xiaojian Cao cc: Artem Borisov , Masaki Ota , Benjamin Tissoires , Henrik Rydberg , "linux-input@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Tetsuya Nomura , "vadim@cirque.com" , "pod.alcht@cn.alps.com" Subject: RE: [PATCH 2/2] HID: alps: Refactor axis resolution logic In-Reply-To: Message-ID: References: <20200409230009.22551-1-dedsa2002@gmail.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 15 Apr 2020, Xiaojian Cao wrote: > Thanks for your checking, my feedbacks are as below: > > 1.It is about the coding style that we should not use HWID in the string > "HID_DEVICE_ID_ALPS_1657", there are a large number of HWIDs using this > touchpad. We should use the device type information in this string, such > as "U1_UNICORN_LEGACY". Ok, thanks for the feedback. Based on it, I am queuing the patch below. HID_DEVICE_ID_ALPS_1657 PID is too specific, as there are many other ALPS hardware IDs using this particular touchpad. Rename the identifier to HID_DEVICE_ID_ALPS_U1_UNICORN_LEGACY in order to describe reality better. Fixes: 640e403b1fd24 ("HID: alps: Add AUI1657 device ID") Reported-by: Xiaojian Cao Signed-off-by: Jiri Kosina --- drivers/hid/hid-alps.c | 2 +- drivers/hid/hid-ids.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid-alps.c b/drivers/hid/hid-alps.c index c2a2bd528890..b2ad319a74b9 100644 --- a/drivers/hid/hid-alps.c +++ b/drivers/hid/hid-alps.c @@ -802,7 +802,7 @@ static int alps_probe(struct hid_device *hdev, const struct hid_device_id *id) break; case HID_DEVICE_ID_ALPS_U1_DUAL: case HID_DEVICE_ID_ALPS_U1: - case HID_DEVICE_ID_ALPS_1657: + case HID_DEVICE_ID_ALPS_U1_UNICORN_LEGACY: data->dev_type = U1; break; default: diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index e3e2fa6733fb..6eb25b9e8575 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -79,9 +79,9 @@ #define HID_DEVICE_ID_ALPS_U1_DUAL_PTP 0x121F #define HID_DEVICE_ID_ALPS_U1_DUAL_3BTN_PTP 0x1220 #define HID_DEVICE_ID_ALPS_U1 0x1215 +#define HID_DEVICE_ID_ALPS_U1_UNICORN_LEGACY 0x121E #define HID_DEVICE_ID_ALPS_T4_BTNLESS 0x120C #define HID_DEVICE_ID_ALPS_1222 0x1222 -#define HID_DEVICE_ID_ALPS_1657 0x121E #define USB_VENDOR_ID_AMI 0x046b #define USB_DEVICE_ID_AMI_VIRT_KEYBOARD_AND_MOUSE 0xff10 -- Jiri Kosina SUSE Labs