Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp255266imm; Tue, 15 May 2018 00:55:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrbIMd+3vd16jSs0fUZ2h79vlRjVwzppt5adx/tXuxhB5vImE2ok4wKVG0GCcg1ijvE+OYW X-Received: by 2002:a62:a21e:: with SMTP id m30-v6mr14070204pff.251.1526370903169; Tue, 15 May 2018 00:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526370903; cv=none; d=google.com; s=arc-20160816; b=aVS0y0+6hlgFlALGIbKlf1YNlxPeixfzsLbg7V7Jm4Ww0CIlpJd1L4a5rbeQxDjT6z VDbsxmZQr8gjzxZFp+4AfnU0ypjO1WoD73dy1k5fuh4zqdhunyXoyXykYbicfh5453pW 2MqYEY9NpZaKTteN9IxJuGriIURS6KjYzB6iLdjZMHukc2j2IWhiNgU6ZHolOXD5Oh1P nl1BIOTfZ+2NoC1K+ansasD278w3gcNBQeducaMdP5/ZLmHuP+oNzEv3Vla/ksCQ5GPJ u9hkWhAnL97g5Jm0EzZjByV/pijVhGncqStjgHXMOKyaBFfJQIPhLR289c62lK/a3vol r1Kg== 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=34pOXq2Ut6j+UzFxxrzdgHre7ctuUA06KCZHDjgdCpI=; b=yjLW+2l8JYD45CAktFRO2Q7qUl/aYIwib1rtb3sDBV2b0jb4GwwVckZ2OG63iranwl iqhjQWY9ppF6y+obzARyYuVYzieItYiTKsmm4WXOoI0hszgkfupIurdPpR8mcP/VG1vu gy5M8DKroZT7z735a6OYkI55Lldrejz2usZiULAtlKQd1fHPuV5v56NLGnMJenHSV8d8 S3L9gyujEYsNaQTkh+slejUoieDrvWAwCm4IIQr7PC+fA6wsD8u3qLuCUvCVnMBdPbWk WrKScqDr4dThTo+6Ic1WdzPIT4uNEW2Uq50ox9OgpDPRx/n+qCxxwZ1PcOTrBZJ7iN6c 1hzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Cfh914Vl; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3-v6si9159332pgr.171.2018.05.15.00.54.48; Tue, 15 May 2018 00:55:03 -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=@gmail.com header.s=20161025 header.b=Cfh914Vl; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752357AbeEOHwz (ORCPT + 99 others); Tue, 15 May 2018 03:52:55 -0400 Received: from mail-qk0-f176.google.com ([209.85.220.176]:32980 "EHLO mail-qk0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752168AbeEOHwy (ORCPT ); Tue, 15 May 2018 03:52:54 -0400 Received: by mail-qk0-f176.google.com with SMTP id c11-v6so12208710qkm.0; Tue, 15 May 2018 00:52:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=34pOXq2Ut6j+UzFxxrzdgHre7ctuUA06KCZHDjgdCpI=; b=Cfh914Vl5xbWTz6vgpleQ9ix0ffO795kt0gs0lLgwTlU48Ysb1BN1mEiZL5b4QDBXV U6at3TMm7Clc67MMgndSBRqR2BD3SekcTaYiJl2z20+/zBIP53i7lYJ0V4dr3JyttgdF YrtCzMkdMgWA4YOsNww0BySX3GEkhCrJv8lzjSbuwi9HxsjEZBTqmOPjADD9wYxFlXgH YoiULfCPTO7CFJo+h2iCnPARBSUfTAsBYxeXTBOquPjcm7WTgVvel7KbBU55Kb9khGiD jnYBP+LLfY86Z+ue+P1F9OUAzPYeblGKCj9WKZE1gqqU0uvnkHxFFHlwxBNKaKyoCbcH LYtg== 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=34pOXq2Ut6j+UzFxxrzdgHre7ctuUA06KCZHDjgdCpI=; b=CjpX0q0SXV0DmJ0HA5wudhJTFIfn6hh8abuEK3Dr9oTd+DMm/4xUkmmFYVqIfkOits 0siRon2ORk3PsI7FgL9DtAvGvhu2VfChekGEv+qmclQCXaBoYnZqLxwsPGKcjfIzD3cb wSA93xtGIjoGrSWGED/vyo4STJfK/ZNnDita4epQNOmMJtKKTx/zr1Kf371RRdoRCxtd wMmjV+2dgTEmZ2EKNWHqm5G601jU+b9jVtrGQSeIpkiC3FaMm8wF3xBFnZbnymw5G36t fovITedHpYMdbXYm+DjFmRxspyHuB6sJlULOK0w7XgBGjiqZcuxbehP7lxplsxTnV8Z+ 6N/A== X-Gm-Message-State: ALKqPwcWkrC1dzgTQ1z1ivtV+/MqU6Ju+lKMhA6S8SENmo1MrDCrHKem GlwiNP3CH4tsg693pGW9Vf/sRKAVrCEownwnNEo= X-Received: by 2002:a37:cbc1:: with SMTP id u62-v6mr11042520qkl.83.1526370773133; Tue, 15 May 2018 00:52:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.152.150 with HTTP; Tue, 15 May 2018 00:52:52 -0700 (PDT) In-Reply-To: References: <20180503030438.51150-1-chiu@endlessm.com> From: Andy Shevchenko Date: Tue, 15 May 2018 10:52:52 +0300 Message-ID: Subject: Re: [PATCH v2] platform/x86: asus-wmi: Add keyboard backlight toggle support To: Daniel Drake Cc: Chris Chiu , Corentin Chary , Darren Hart , Andy Shevchenko , acpi4asus-user , Platform Driver , Linux Kernel Mailing List , Linux Upstreaming Team , Jian-Hong Pan , Benjamin Berg 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 On Tue, May 15, 2018 at 3:25 AM, Daniel Drake wrote: > Hi Andy, > > On Mon, May 7, 2018 at 8:46 AM, Daniel Drake 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"? > > Any comments on this? I am tempted to send a patch to just make this > key always emit TOGGLE from the kernel given that we have a tentative > agreement on implementing the brightness cycle within GNOME. The patch is slipped to our for-next queue. We have about 1-2 weeks to fix things there if the initial approach is not what you want. -- With Best Regards, Andy Shevchenko