Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp725494pxb; Fri, 14 Jan 2022 15:05:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJwVG27cOXGWHrFIie0WDOVOQVgp0pV+uQlgDlgRp6JCuYeCoOBdtjmfnneOT4d9AKZxDT2t X-Received: by 2002:a17:907:ea2:: with SMTP id ho34mr8822697ejc.168.1642201547226; Fri, 14 Jan 2022 15:05:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642201547; cv=none; d=google.com; s=arc-20160816; b=TPfO+k3F7XMvswVCGJzZoE2GHwuWLMweptxEM8LxnW5b70CZIgVS+KrdJKsqJcjGKN Bu6DOTApvbzGsHKHnu4qJg/K4dosH0ikVSfOr/4PBqIh+jWGvs/TgfIMmhTSrf4clUZe G6Zo336zjnSQBu9xS0TUqxG1OKt/YRg1v2yPu2JdaE/uU6R8LCOnWwoK6/A+AnoEBDcI bz312DgFAvsAIG9a37U/PXXG9FUmum/fBEbVNIMawTJgU2mqJO/jExfkgxZcxgGNNT6A vi8WdzmJ8EcrGzo19g9cVAHAM0jyVNm3BGX/X5+tvtyc/LVq8TkUlJ/xXtDMveBpqiqs nWcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=oi38lNbF2nCViHYOk3ZTIpO9qvlEErwQJAzcfemw1uo=; b=ZbzBNGsRH7Gel1JHQz/hKZmVWyIPEIOy7Fbd+I3La/UCaeDmXwB0idgYY2D71PmpLF FJEjWuSTgSYqLUVuFOsXbIWG7/onIfjr8DmYvOCPVLnhA9VvSiCpo8msOpC+4Y1Lx/fe hgN6Vi+JJJg8b2CKIUWyVfCaKf13Fg92hC+50vZsMX2gdXnzSSaa+Qcv0aX2diiZGVjN kzMLIgwszzRWs84+tmnyf5Vho0TS1AuXt+tVTZmAcsS+kBn/W7jnipWCgmaOM9vqxXWv ixWSYnvIL5PlyLYVEIw8CuS5rdmMUYCXQyJxgbe47+probnMLNvaUAlYLyITqJf9EAyM rX/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=j+NXxFC+; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lg12si641729ejb.200.2022.01.14.15.05.23; Fri, 14 Jan 2022 15:05:47 -0800 (PST) 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=@chromium.org header.s=google header.b=j+NXxFC+; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235073AbiANTZP (ORCPT + 99 others); Fri, 14 Jan 2022 14:25:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232539AbiANTZO (ORCPT ); Fri, 14 Jan 2022 14:25:14 -0500 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EF50C06161C for ; Fri, 14 Jan 2022 11:25:14 -0800 (PST) Received: by mail-ot1-x333.google.com with SMTP id s21-20020a05683004d500b0058f585672efso11235694otd.3 for ; Fri, 14 Jan 2022 11:25:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc; bh=oi38lNbF2nCViHYOk3ZTIpO9qvlEErwQJAzcfemw1uo=; b=j+NXxFC+a5tmI+S+u8A/WWv9YGt9fS/U2yQDmTjMDqshvap+8Y9IIwTqPMbVdTttW0 XHv6RmZcqWi98cuyRWxGrsTaZvydtCXjj9g0ZwztxBcMzwnAIxRwclgCczlDReIr8CZq oc4/zqCHmhcb5iJ31KiauDT3Jm9CIBZnhhAbQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc; bh=oi38lNbF2nCViHYOk3ZTIpO9qvlEErwQJAzcfemw1uo=; b=06gB3PCos0wnaSHOqI2kbvRZZc1yjA6RK7cQAv5E+fhYWWu8gU7rGr59MBzzGC/oLT jyLPe1IwpEVl0s11ubzvLNaVEOFlqPkF/DG5a7EUyTeU6llCxXxhBvqdvlkoZ97GXYmE Xkp8yTiPCFIxn9hUC8VbHdTNs04YHoIpVSt6JqRbp4jN/wlNQl05JPujRNvOEUDfok32 k95NhLu7pk6OOwjFQxMyVRh0ueIYZx3yOUakQbpiIEOEwbKjNRwYGURBOkg/AtszvG6X LFBouv1kFAvhDdS4vFwjivdgsuyyJqVdHJ+EpeV3M2ZFcXRd7c85Jj4ZmZBkj8ZtibQm RVHw== X-Gm-Message-State: AOAM533I+7l0OPU+3z9m98lWXk1IbudFhU4jgzi3z1BS+5VkBkzDZncU OMVeFnJdG/4B91O9cTzJ1bBiRw+Edy8F4K04VlqI/A== X-Received: by 2002:a9d:2243:: with SMTP id o61mr7938721ota.126.1642188313396; Fri, 14 Jan 2022 11:25:13 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 14 Jan 2022 13:25:12 -0600 MIME-Version: 1.0 In-Reply-To: References: <20220107091357.28960-1-xiazhengqiao@huaqin.corp-partner.google.com> From: Stephen Boyd User-Agent: alot/0.10 Date: Fri, 14 Jan 2022 13:25:12 -0600 Message-ID: Subject: Re: [PATCH v2] HID: google: modify HID device groups of eel To: Jiri Kosina , Zhengqiao Xia Cc: benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, dianders@chromium.org, Wei-Ning Huang , Dmitry Torokhov , Nicolas Boichat , "Sean O'Brien" , phoenixshen@chromium.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Jiri Kosina (2022-01-14 00:38:23) > On Fri, 7 Jan 2022, Zhengqiao Xia wrote: > > > If HID_GROUP of eel is set to HID_GROUP_GENERIC, Whiskers Tablet > > Mode Switch of eel hammer will not be detected by system. when it > > is set to HID_GROUP_VIVALDI, system will detect Whiskers Tablet > > Mode Switch successfully. > > > > Signed-off-by: Zhengqiao Xia > > --- > > drivers/hid/hid-google-hammer.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/hid/hid-google-hammer.c b/drivers/hid/hid-google-hammer.c > > index 0403beb3104b..e5acd15f4a55 100644 > > --- a/drivers/hid/hid-google-hammer.c > > +++ b/drivers/hid/hid-google-hammer.c > > @@ -585,7 +585,7 @@ static void hammer_remove(struct hid_device *hdev) > > static const struct hid_device_id hammer_devices[] = { > > { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, > > USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_DON) }, > > - { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, > > + { HID_DEVICE(BUS_USB, HID_GROUP_VIVALDI, > > USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_EEL) }, > > { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, > > Color me confused, but anything with HID_GROUP_VIVALDI should be matched > by hid-vivaldi driver, so what is this about? > My understanding is that 'vivaldi' is mostly a keyboard layout and 'hammer' is a detachable keyboard. We want to prevent the hid-vivaldi driver from probing this particular device because the hid-vivaldi driver doesn't know about detachable keyboards. Hammer devices also support 360 degree wraparound so we know that the keyboard has been put behind the screen or that it's being used to stand up the device on a table. Given all that, I'm still confused. If we make the hid-google-hammer driver probe this device and the keyboard layout is vivaldi then we'd want the part of the vivaldi driver that exposes the function_row_physmap through sysfs. Otherwise userspace won't know how to handle the function row properly. I think we need the device to stack two drivers here. Does that happen with HID?