Received: by 10.192.165.148 with SMTP id m20csp3167089imm; Mon, 7 May 2018 07:46:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqiEUvnJ3EydIGrgZJNkMd3QSWRyh4fOYcQnBricRARH5GjzhJaf51TrwmK7pnIKniwVzzo X-Received: by 2002:aca:5153:: with SMTP id f80-v6mr24741895oib.78.1525704389761; Mon, 07 May 2018 07:46:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525704389; cv=none; d=google.com; s=arc-20160816; b=wFczkycTVe1gaidVuj4jPE4wiTNLXjz77jFYMMoCiRUPUAH+E8vcrNldOENhOCUlx5 2uwRoeHB6brwc7iePHD/ltDE//llWnwTbIQuCyp18pkuVAF6Z8QXLSLPkjbSc5+6wVmH Fblrg2JRLa/4Ww0ti7jPK5h+o+j9XLa8KP18Dc1mw/2NhLHmoWnemvxSKNOD+9k98Obk F0FOnNOpe8KBX1riOb7LYY4WOkTDdt1I5ooB/FCx9DrSDiUpwMscZvtKh14K5vvkzQVW ayubgW1JgpRu9FBBhG6ZSfXz5Z60hucMYVTvkVw4FBXLnUwx3TOJcSI1Wyj6E+L6EQTY E9bA== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=ey0yZV5gWS2SypA72yROWqNxjNbqP8XX8WhYL6al/B0=; b=S8KhJrtyOaQgOigjO2zNqInsQF2UUIij1CJ/EWeT58K0qzT7fAmrGcueiasMXL+yiI 9qeyLvTDWVGhZRY5SDwNSbnK4KiNHVzVr39EZsVqESYKvxVoRGUQBCADIdfU3Szf7DcJ mD/vbIw/uHIGp2j1kYG7ILuqfSz5z53iWPi/Jvh8uKTGU85ex0LboONEKyU429E20IJZ viRzjA3PpdWuDwNFhgJthXFXXS3UEneTmB8UHARAk/VApKIJCm7ootPNzyvnv0O9bH4C ig6sw9aD7dQByHvY2Dnh6rc6nVDakyfppx5+tJ3ptEaxpETCMaJyRea11qyiT7Jw6dG9 niIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=GohEhhr3; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n52-v6si8679720ote.248.2018.05.07.07.46.15; Mon, 07 May 2018 07:46:29 -0700 (PDT) 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; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=GohEhhr3; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752224AbeEGOqJ (ORCPT + 99 others); Mon, 7 May 2018 10:46:09 -0400 Received: from mail-ot0-f193.google.com ([74.125.82.193]:43714 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751976AbeEGOqG (ORCPT ); Mon, 7 May 2018 10:46:06 -0400 Received: by mail-ot0-f193.google.com with SMTP id y10-v6so32233619otg.10 for ; Mon, 07 May 2018 07:46:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=endlessm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ey0yZV5gWS2SypA72yROWqNxjNbqP8XX8WhYL6al/B0=; b=GohEhhr3C+WrNdK67W55omwq5YvnYJMAY9def0ckoFsTXxvjrcwm1VOGvBMfL2SGfU 5ie2uljjQMm00W3gkpJyuYROrXnohTogHVFyIfSUpQlmKZU6Zmt13DMV5JFL7D2ZAyHz 8h5cMvQREgI06OwYoEHJSmeXEz6qKxXovnn0//fT98DF4+Q5U+AFiuFVwJClBWOi5+N3 aYFn97eMm6btBTmAKHykEaxpF80GfPpiRJxFP8Le2x1Fd8wXQGcE8emziql1miSyvHlw 8ZPEjC3JMPMcr5cDbJSrzrMM5bS0j+ymBmaR8EtuA/w8JIbtncq6FKXkbCLBN0sTcglA 0XgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ey0yZV5gWS2SypA72yROWqNxjNbqP8XX8WhYL6al/B0=; b=U6+X7rGQEqoGioqzmUigXJrtuMhe1Db23MX0upipNXG803p/hfIDq1nKmxZUvwpgVO okvCS5oKmgG1hUdnQERS1kYxeYOBL73/2b/rIwowKTe21sNXkqpWd3U38m7xssyDiqcP 1VKtwjllAlYEF8uikxYBA1PUyz3CCTa6xyE0n25bHEonPh3K0d2m0VtCaKxr3irCk94/ xdEmWYzwNSNQLBZwUmxnQrsf3nbkqb7W4qaNfsUoPb3peq1Ee7QuKh1TOeKp0UunNPwE Itk+XybFc2l68HTLx2VI29YOtZM7j/iTvVyWOoR9U9/iZAyrltAwsKJL5zrjzJLXmGOF yVLg== X-Gm-Message-State: ALQs6tBV6Rnzqbu8OygvfoYdch08dR8SYXapvTiq5ieFRffbh5Kb/9gI 98fWUEn8zYAybP6p4ZybASketSp7sgyfUe6XU0bnKQ== X-Received: by 2002:a9d:614c:: with SMTP id c12-v6mr17039939otk.223.1525704366346; Mon, 07 May 2018 07:46:06 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:526c:0:0:0:0:0 with HTTP; Mon, 7 May 2018 07:46:05 -0700 (PDT) In-Reply-To: References: <20180503030438.51150-1-chiu@endlessm.com> From: Daniel Drake Date: Mon, 7 May 2018 08:46:05 -0600 Message-ID: Subject: Re: [PATCH v2] platform/x86: asus-wmi: Add keyboard backlight toggle support To: Andy Shevchenko Cc: Chris Chiu , Corentin Chary , Darren Hart , Andy Shevchenko , acpi4asus-user , Platform Driver , Linux Kernel Mailing List , Linux Upstreaming Team , Jian-Hong Pan , bberg@redhat.com 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 Hi Andy, On Mon, May 7, 2018 at 8:10 AM, Andy Shevchenko wrote: > > On Thu, May 3, 2018 at 6:04 AM, Chris Chiu wrote: > > Some Asus laptops like UX550GE has hotkey (Fn+F7) for keyboard > > backlight toggle. In this UX550GE, the hotkey incremet the level > > of brightness for each keypress from 1 to 3, and then switch it > > off when the brightness has been the max. This commit interprets > > the code 0xc7 generated from hotkey to KEY_KBDILLUMUP to increment > > the brightness, then pass KEY_KBDILLUMTOGGLE to user space after > > the brightness max been reached for switching the led off. > > > > Pushed to my review and testing queue, thanks! We found that GNOME's handling of the toggle key is somewhat imperfect and it will need modifying before we achieve the Up-Up-Up-off-Up-Up-Up-off... cycle that we are looking for. https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/41 In that discussion an alternative perspective was raised: Is it right for the kernel to modify the key sent to userspace, when it is then relying on the specific userspace action of it changing the brightness to the next expected level? (and this userspace behaviour is not even working right in the GNOME case) Instead, would it make sense for the kernel to always report TOGGLE in this case, and for GNOME to interpret toggle as simply "cycle through all the available brightness levels"? We'd be interested in your thoughts. Thanks Daniel