Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4991932imm; Mon, 14 May 2018 17:27:15 -0700 (PDT) X-Google-Smtp-Source: AB8JxZraxlobK2JfetCkZiO5xazRi2fPF+4R4KhIabvekS9pS197YZakjDn89fzTM7BK4a72hLjX X-Received: by 2002:a62:4a50:: with SMTP id x77-v6mr12608858pfa.142.1526344035340; Mon, 14 May 2018 17:27:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526344035; cv=none; d=google.com; s=arc-20160816; b=yPep+he0xyZH6Wf1OSoA1RbABGWvrjD6IZfjIsCA1h0Scg9wdOyFkOOIGWUju/1Z+z xTeXv6uksgP4QWJ0Rc7IBLitqCNtbfLtqWyHD1c67HUpamQTpjPq5xWrQRiUvH6wJp87 9eIl3/9YuX7xoF0HHtkdC2Pxi6MUkQ+9gPpq8UYERuXod5LX/f5/P4mWXfaQB1WgkAvL +vVAFqjV3JWOaJ7GNCIwy+vwHk9jAicxNK4D6gKtMY5qadgpTfp0UOnSrflzE35fEmHW lu1th0BQp0J+RxoyUOQuFyR5Ffn3XgY9mLLGF3EuyioS1lASG4QYn2zRs88MXozf4UCb YUig== 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=Y9pao8LUs7lrVkww02U0qjIUtK1kL/6jUjB6p9+TXBE=; b=dmirzN95LSFdAEbQe1Z/2kPxS2wgMdMYHK7nFtXwAjK6reShMUSEnrAhIj/5+n4Zw2 quesBJ+nIdu5/wuPGY2U5qgJzmi7SQV76VXqeZhzw79HCT/MtFCi3PIhCzgjvQDt2rwF clMNQSftfMlrw8xwVzMigcQanPLTZ1UCNyvDTrr2seTkVEaHqpcjsP0Sr62l9Aebs3gp xctmp5fCghzrDNmN6wwttCp4Pk5qDQPGdHUD1Q6lgnA4fHMMP9VKTrDbBtulnHBtsqfl cFUHJmhVrL3cdrBETt8enMGBHy2on3r2Iw4AaBJsAR93Dpe2R83ynRboWAZVzceQsdQg fSoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=ent/nI6j; 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 b10-v6si10425325pls.81.2018.05.14.17.27.01; Mon, 14 May 2018 17:27:15 -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=ent/nI6j; 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 S1752481AbeEOAZi (ORCPT + 99 others); Mon, 14 May 2018 20:25:38 -0400 Received: from mail-ot0-f181.google.com ([74.125.82.181]:43485 "EHLO mail-ot0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752333AbeEOAZg (ORCPT ); Mon, 14 May 2018 20:25:36 -0400 Received: by mail-ot0-f181.google.com with SMTP id y10-v6so16426023otg.10 for ; Mon, 14 May 2018 17:25:36 -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=Y9pao8LUs7lrVkww02U0qjIUtK1kL/6jUjB6p9+TXBE=; b=ent/nI6jYahHQMfTEbgpRgE2QbbnTRkarPBAFDwsuGuwG89faE3S7kEoMlNO1hv4tj 2husu+KiVv73QEyDyQ4Juse6PrAZp4+kfJlcYj/RWhezpcWaKSJ/ujlINykUmJVN5Q+p TCyYrz6XJGkNwrte57MlRfhZs/6JHj2HbtpxEmpg4VTEzyHxmH2fI/ROscfS5mJlobQM +N/tlja6zOf6+KFGL+1zY2MUqUBF36xbSO5H9XMhXIPd46MYSaRxDvE1rkKncL6gAFmh 3jLA/qVH7Ons+YEdRuvk+Is4InfioyLqpajOtSt9hkDfqtZ5CR0XfP8k9Ue7Lg1zQ+DC UmDQ== 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=Y9pao8LUs7lrVkww02U0qjIUtK1kL/6jUjB6p9+TXBE=; b=szb+gZcAJkvVb6rtnultfANiPSwKf5f4zkexw+Z6hH4WfrPkXy1/m4TWH7zzMiL5bT /tLRwIBO9z1dUZWr2DBoOz7CDpyiwgJjTPTBpBUOwBQI/xWL4wBl8mHVhEzC1SNx+Rif 2/Oh9QaIPqj3rx3Z3gmPdcWM7pmqORAyE3LLiiGsH7KnI1sxOblZ+eDh9bbSZ7kDsXxM D+As7DMhHhEqcl0CdTqarWjE/ywu3+5V8DjjyNHVT+wc1ktFCEBGNBYNInXgF5y7xv0X 65lg6xtJepPn0kmBxmoDYbPD69bFZQwv3mjaKGrMFe3K/+T46AufbFXogOuMlpYXFt5n f/bg== X-Gm-Message-State: ALKqPwcTNwn2kD0TEYWtk+hO/wcunpIVcZDvhg+AImBKUGCZKaHKqinB OqBEHjL68cUnPYXPYFTdjfwzUydcWX8zgtZkmRT/1Q== X-Received: by 2002:a9d:5990:: with SMTP id u16-v6mr8281638oth.370.1526343935916; Mon, 14 May 2018 17:25:35 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:526c:0:0:0:0:0 with HTTP; Mon, 14 May 2018 17:25:35 -0700 (PDT) In-Reply-To: References: <20180503030438.51150-1-chiu@endlessm.com> From: Daniel Drake Date: Mon, 14 May 2018 18:25:35 -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: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. Daniel