Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3627958imm; Mon, 4 Jun 2018 06:52:24 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL+dYpKrvenjRQdVJ0bBfkVYw8fr6qI1q5Y61zcAbfUEGoZDrbA6fT5PyKTa/f0OR5zejJ1 X-Received: by 2002:a17:902:14b:: with SMTP id 69-v6mr22371548plb.184.1528120344310; Mon, 04 Jun 2018 06:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528120344; cv=none; d=google.com; s=arc-20160816; b=UBr8hEBJD5tYXwZUzGA3DBozIjYW/IybgcZ7yOKjN0fJUYwf0yLQv4aDI6BK6cNUIt IIgzASFctiIXMFQn9yrhS4ZAAMiuLtvdPa7OZZjbLLfDoMo04Jr9kA1xThWt9Xwenl0c 4skv+2MRtSgRraOARZWZZqhUmdT+CL+pZFH40FMzLR7FPhLs+p45b7eln7VGB3PZjxl9 MI6jOTssi1N7Z6nlTcyuEe+dCZdin1fVLANbOz5o0ZNN6eXjIHxAY/ITUOZZu6jLQfau 5FC5m19TCavo/Xt3Ry4ICy6CKMYMuA0+beieBPVKmynZ9GkaMK1iaohBiBRhWksRKjKp Kmjg== 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=X5O17NPoqQ8x/BhVZYnt6YQK/N5M9UCbDAmKURKPn3M=; b=eYEmEwMJEtGFPnYxUYMx7zUX/cYmttf869yGEn2ln0ap2AqQ6lMwtXPHeHpV/yc0Hk 3YTT1UumnAzo8isc8YNkAzvZShNRBdGrCZ0Arqp9i560ce2lV9GLpgDNFwlhzTSyQ/Xu qERSCi49rBc59Ln4/hsOVMgDRUoEnJ16XTZwh9J6Zz0fq/0rygXcd6wuQbNzKZVY+mvE zqv56RjO5vvLFbfVIuD65xhGxuBAMkSnhmsHVeND38xd7K9QqRD8lVjPfXh641aWgEy+ dAhVTQWWDl6D/CTsbqJEPt8ZWwN8IGmbW1bwhNAjq8xXQR1UvzyfpefpSXtBx+xzUI2w Fepg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=G9c8CMOu; 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 y124-v6si10929339pgy.228.2018.06.04.06.52.09; Mon, 04 Jun 2018 06:52:24 -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=G9c8CMOu; 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 S1753296AbeFDNvq (ORCPT + 99 others); Mon, 4 Jun 2018 09:51:46 -0400 Received: from mail-ot0-f193.google.com ([74.125.82.193]:38328 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753147AbeFDNvo (ORCPT ); Mon, 4 Jun 2018 09:51:44 -0400 Received: by mail-ot0-f193.google.com with SMTP id n3-v6so37707885ota.5 for ; Mon, 04 Jun 2018 06:51:44 -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=X5O17NPoqQ8x/BhVZYnt6YQK/N5M9UCbDAmKURKPn3M=; b=G9c8CMOuD1J7dQCQFezjJLC+kEgKI/RcI1lOgXAmGYeQRZ85lcLF+IvDEUUVuO2pOn GRRBHgCzKmWtOouX/CAZEkAJ55ZL7CHbo7+oLPakA0zvUsiVXYJCZDw2hiHoWxT02wWv 6aYKx6UEaZt9lud93b4rCybPp94S+m3vek6YZ8vDv2umVewVoCb0Zy0ONV3T8c3Qzuzh OJexG8fAclMQokxh0zASOWt84qrZepk/K77Sr1qfPJbkqdlS+FeOaAOQMhO9opRgH9Yc WtVBuUfA/PM9owgGwJHk5/HSnoWGzHfmjDztBDKQG1+CpauF7obG0EybITadOjI8HG+Q ZBYw== 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=X5O17NPoqQ8x/BhVZYnt6YQK/N5M9UCbDAmKURKPn3M=; b=NKO8ilGpP3g/1rHnBzCdfWsM48+9hhwDrLdC1R9PBa11TAq11JJ+Ylr5nuCz8ua7VT MzjmUB1ViqMC+Kbboh/rHFqTCzfNafV/xugxxGdeUhRoqiZQZKPcbRUpCwQUPKU9yvOo m0fIhA1cmREYqRDHlG1UlkU6iZS9Rj4ltCuUd5HAAXZdcvmQc+TLRKnW5ySy9H2X/Fho 1BnqeUIb2kn5QwgegauaVVYbHEqBbuc7nfTG/oMhHUEX3bJwGkCwzhH1ecAe4RGOEbyh 99UeP8wL9FGiRu2oqREHABO+K2fnxQtyFXyms6qxz7xUO5/fwfA4u1ne9tBYnpkq/0jW IbIA== X-Gm-Message-State: APt69E3nhfgefKaOuQLa80cCdldzMvDuO2tu8xBLRuGOjj9mgHubUXcY wIAW+JWd09JK2xt+zg0k41mNVJqGNiryqnDLvMB8sw== X-Received: by 2002:a9d:4609:: with SMTP id y9-v6mr8116088ote.259.1528120303964; Mon, 04 Jun 2018 06:51:43 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:e34:0:0:0:0:0 with HTTP; Mon, 4 Jun 2018 06:51:43 -0700 (PDT) In-Reply-To: References: <20180604123238.82200-1-chiu@endlessm.com> From: Daniel Drake Date: Mon, 4 Jun 2018 07:51:43 -0600 Message-ID: Subject: Re: [PATCH 1/2] platform/x86: asus-wmi: Call new led hw_changed API on kbd brightness change To: Hans de Goede Cc: Chris Chiu , Corentin Chary , Darren Hart , Andy Shevchenko , Linux Kernel , Platform Driver , acpi4asus-user , Linux Upstreaming Team , Bastien Nocera , 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 Mon, Jun 4, 2018 at 7:22 AM, Hans de Goede wrote: > Is this really a case of the hardware itself processing the > keypress and then changing the brightness *itself* ? > > From the "[PATCH 2/2] platform/x86: asus-wmi: Add keyboard backlight > toggle support" patch I get the impression that the driver is > modifying the brightness from within the kernel rather then the > keyboard controller are ACPI embeddec-controller doing it itself. > > If that is the case then the right fix is for the driver to stop > mucking with the brighness itself, it should simply report the > right keyboard events and export a led interface and then userspace > will do the right thing (and be able to offer flexible policies > to the user). Before this modification, the driver reports the brightness keypresses to userspace and then userspace can respond by changing the brightness level, as you describe. You are right in that the hardware doesn't change the brightness directly itself, which is the normal usage of LED_BRIGHT_HW_CHANGED. However this approach was suggested by Benjamin Berg and Bastien Nocera in the thread: Re: [PATCH v2] platform/x86: asus-wmi: Add keyboard backlight toggle support https://marc.info/?l=linux-kernel&m=152639169210655&w=2 The issue is that we need to support a new "keyboard backlight brightness cycle" key (in the patch that follows this one) which doesn't fit into any definitions of keys recognised by the kernel and likewise there's no userspace code to handle it. If preferred we could leave the standard brightness keys behaving as they are (input events) and make the new special key type directly handled by the kernel? Daniel