From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10A1BC43457 for ; Fri, 9 Oct 2020 13:37:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BBFCF215A4 for ; Fri, 9 Oct 2020 13:37:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SLRHN8EB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732022AbgJINha (ORCPT ); Fri, 9 Oct 2020 09:37:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:48967 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731678AbgJINh3 (ORCPT ); Fri, 9 Oct 2020 09:37:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602250645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x1qsye1PzZJmVZ4NeMP08Jte5iTc9p8avnaZ06vt4hA=; b=SLRHN8EBfcb4hEUg8w/g53FbJTUwmEyABFE0x1u8KeY6mRaJXrGTcVnciQbV9fSFJh6BWZ rDrmSs29UPyv5W7grhk7lCluLS18YlIyBjdPiHs3G/Wg5SqUHqBRYiBRM9qQK9nZ4J5E7g VAzMGV5ksbuRQeg9aocfJlWqgVLRr7E= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-220-pGyVKoYQPZWi-E-Lwi__NA-1; Fri, 09 Oct 2020 09:37:23 -0400 X-MC-Unique: pGyVKoYQPZWi-E-Lwi__NA-1 Received: by mail-ej1-f70.google.com with SMTP id x12so3601707eju.22 for ; Fri, 09 Oct 2020 06:37:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=x1qsye1PzZJmVZ4NeMP08Jte5iTc9p8avnaZ06vt4hA=; b=ccoTPa7tEX2rK4Vl9X2Gyj/eAHcvpSQ84IVyUgteoZIhExu3I4aYFKlCpkpzd+RfCq nlybx3jlnmXk2a+0DnH2hdlrF1QvPPznfvA0lpAD9m1I+CW5Z4y0cgrgA8HcnITNQOQb Kne20wr+ZYcUaaCVyJsieEFuLKpOQZBnb/Vt9jUKbyez0HC8sM2jmLWlrRJvWVVYp8u1 8LVQrbgA4i0YLVO3n4+O5ynOocASwp+V90uLAS2XZ8IvRfIQD2WJbGy/ljntraYZWzPC L540MiUrIThOdhb4McAJ2O5Sr8CqPayXHoTXG1naRyuoN+HZzZ3ykKrvhxWargiMn+r8 0S/A== X-Gm-Message-State: AOAM533h2UXr2ONZxQ5GjnFe2lWymFLXO9fhBGhxsrfGsMoZBNyBLM9l Ccz0Bm+yKqLynwKK/J1RbMCfcdpwvL9B081K+aICW/yCP+IGhNlFmN5/DB3Zmf8Yun9qF9c9miw hIO8IBaBCzSOA68LkXu3NZzYy X-Received: by 2002:a17:907:1042:: with SMTP id oy2mr13804210ejb.64.1602250642190; Fri, 09 Oct 2020 06:37:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjDRASl1SrPHlItgzc579TQKOKrfxm53XFwA9vXZ7WeJVfCVMdKa3NAHVVi+JadU/McrwRPw== X-Received: by 2002:a17:907:1042:: with SMTP id oy2mr13804186ejb.64.1602250641942; Fri, 09 Oct 2020 06:37:21 -0700 (PDT) Received: from x1.localdomain (2001-1c00-0c0c-fe00-d2ea-f29d-118b-24dc.cable.dynamic.v6.ziggo.nl. [2001:1c00:c0c:fe00:d2ea:f29d:118b:24dc]) by smtp.gmail.com with ESMTPSA id cz11sm6138649edb.62.2020.10.09.06.37.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Oct 2020 06:37:21 -0700 (PDT) Subject: Re: [PATCH V6 RESEND] HID: ASUS: Add support for ASUS N-Key keyboard To: Andy Shevchenko , Jiri Kosina , Mark Gross Cc: Luke D Jones , benjamin.tissoires@redhat.com, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org References: <20200923215633.209724-1-luke@ljones.dev> <20201009131435.GF4077@smile.fi.intel.com> From: Hans de Goede Message-ID: <46e870fa-ff64-73ca-9979-32c8a1b5b12a@redhat.com> Date: Fri, 9 Oct 2020 15:37:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201009131435.GF4077@smile.fi.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 10/9/20 3:14 PM, Andy Shevchenko wrote: > On Fri, Oct 09, 2020 at 11:38:55AM +0200, Jiri Kosina wrote: >> On Thu, 24 Sep 2020, Luke D Jones wrote: >> >>> The ASUS N-Key keyboard uses the productId of 0x1866 and is used in >>> almost all modern ASUS gaming laptops with slight changes to the >>> firmware. This patch enables: Fn+key hotkeys, keyboard backlight >>> brightness control, and notify asus-wmi to toggle "fan-mode". >>> >>> The keyboard has many of the same key outputs as the existing G752 >>> keyboard including a few extras, and varies a little between laptop >>> models. The key-sets have been split and sub-grouped so that there >>> will not be conflict between key event codes used. >>> >>> An existing key event used across some keyboards for "Mic Toggle" >>> has been changed to emit "F20" as this is what all the main >>> desktop environments are using. >>> >>> Additionally this keyboard requires the LED interface to be >>> intitialised before such things as keyboard backlight control work. >>> >>> Misc changes in scope: update some hardcoded comparisons to use an >>> available define. >>> >>> Signed-off-by: Luke D Jones >> >> Thanks for the patch. Looks good to me in general, one small nit before >> this can be merged as a whole ... >> >>> --- >>> drivers/hid/hid-asus.c | 188 ++++++++++++++++++--- >>> drivers/hid/hid-ids.h | 1 + >>> include/linux/platform_data/x86/asus-wmi.h | 2 + >> >> ... I'd like to get Ack from Andy (CCing) on the addition below to >> asus-wmi.h. > > There is a new sheriff in town (Hans and Mark). > My personal opinion it is good to go. > > Acked-by: Andy Shevchenko I'm afraid that a quick review by me has found multiple issues with this patch. I'm going to take a quick break now, I'll email a detailed review after that. Regards, Hans > >> [ ... snip ... ] >>> diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h >>> index 897b8332a39f..05253cfe786c 100644 >>> --- a/include/linux/platform_data/x86/asus-wmi.h >>> +++ b/include/linux/platform_data/x86/asus-wmi.h >>> @@ -27,6 +27,8 @@ >>> #define ASUS_WMI_METHODID_INIT 0x54494E49 /* INITialize */ >>> #define ASUS_WMI_METHODID_HKEY 0x59454B48 /* Hot KEY ?? */ >>> >>> +#define ASUS_WMI_METHODID_NOTIF 0x00100021 /* Notify method ?? */ >>> + >>> #define ASUS_WMI_UNSUPPORTED_METHOD 0xFFFFFFFE >>> >>> /* Wireless */ >