Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1101334imu; Wed, 23 Jan 2019 10:45:34 -0800 (PST) X-Google-Smtp-Source: ALg8bN5VqR/RXX973p9lols5bHUeyrnpwiSpLFRTefA/gVsIPgIbRfExWqdYFdGnC4uhrLqxySxg X-Received: by 2002:a17:902:b406:: with SMTP id x6mr3198059plr.329.1548269134139; Wed, 23 Jan 2019 10:45:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548269134; cv=none; d=google.com; s=arc-20160816; b=Qw5rCEpHWiWjmc/o7FaXSnNJnEr5KAHtVmIcUgR4KGZnOxtL4NrU592Pw2yDcKEL7p JdtQGKbs2J6uof0bkxJVRUShP1PZVe+AWcfyk1JJ8E301+01CP/DtMDYyLJ0iIoXaiMB pajiIdlDZgUXSHgQxpCTKf20NecSSAUMT6/TmHJKd3PcJ88i5ABOtqrBIMYXDDdvS0ex coni/z6UFaLqosWKMv/aNrHCienHS49jwrZ0rOZ8IQvJpG/mvs2p+w9mp3+e4tq4AJhi vIc7Qc3QdNOfUOnz4G6AIaZqOuff3o8KR4XIdpBnHpxI+l3KQqxqS/ELRaesK+ltrIPw krYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XZEnY1/HSMRptC3WUfVMj0vBoO4FFPZN70BHX8zxRYg=; b=ZVX8kWxmgD436e6gdjB5W0Jj1Bh/0T+86QQGWFdYJ2sYlGVFkcsBv91M8Mn5/TzIxT 82vNlN1ifYBqDR8rBCANHZQHPcv8QOWtWKiD/KmfqMJ0Jbel0wgqhxRxIwlNrUYPme6o iSBtXL9YIWlUALqeoNinC+XxqSCq6LBTAhUWK4y6mBpHbuK/3oIPqWoSTIZYfoqffn8b t4rdsH/PC+ezG7yJWqpgTYiRx1cXTJJe1fWJ/cGg4X8q5yzWC9Vqp1CajMXktp1vtols VKfqTlw3gcYPiKY3zDncfkBzlsFI9NmgyZAmhwsGcmi6h26MQh9hE371DZN3n2kP7GoZ W+Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="E5W/bFhi"; 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 p16si19418970plr.31.2019.01.23.10.45.14; Wed, 23 Jan 2019 10:45:34 -0800 (PST) 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="E5W/bFhi"; 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 S1726202AbfAWSpF (ORCPT + 99 others); Wed, 23 Jan 2019 13:45:05 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:43046 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725896AbfAWSpF (ORCPT ); Wed, 23 Jan 2019 13:45:05 -0500 Received: by mail-pg1-f195.google.com with SMTP id v28so1448092pgk.10; Wed, 23 Jan 2019 10:45:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XZEnY1/HSMRptC3WUfVMj0vBoO4FFPZN70BHX8zxRYg=; b=E5W/bFhiInrtNM/SJ32SK4eXISxAi5v2ZeBVRBKUejTVghCEGA3dy/kBXLoBYULtz9 JVEWSGTselhXPFv0BhnIivNpAkWP0j3d9SrdSyy/x1h++gcf6WUIYHOJiTIFrvOtRk9s ZR0+hSOPnQkOaFUInGMXc5m+JdwGH7Z1Y+Sr12+H9uP3SIcZWfb4+mn2gzw3NPmbp9tb dNx05/WoMiDp8K/O6WvzwNQOspX68HPmPcpvPaNFvbJDdFc9jXqHGo7Twh5fgiA57fkW WgeFICE8/6PMznaDA5q4jWhZkV/14s72wMm17tQxfJslBEGbIHLB53gkyXRFQCLCbYOI K9OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XZEnY1/HSMRptC3WUfVMj0vBoO4FFPZN70BHX8zxRYg=; b=jVi8qlaz8tJde5oUZrKuN7Seeu6nmLl9y9FkoksApkry5DOqufXoz4tr91h8pqUVly aDf87uDQFODSFcd7OIniLXeBMnnQv0dCLrmFwKMwmfhiesz50PqXlxVj/G7WbrKc+SmO sUcEhEk9JoF7k1COekr+hKXGzaF8TBFHb2pXmXk9fed7jsM9vAgGma3sWDoqWbAtNI+/ 6KnmtI8Ys4VQQOnGmCa8h+VdkqBa4COYe+C1pRMuPElthOM/t8RC+cMYQK5sbJvvdX++ VGDt0xlp9GkZ3Vc8+oAk35dSXgt4a66NzXkVIfY6UDgwkz2Gx0B4Np323DkbgXBLJDhS qjrg== X-Gm-Message-State: AJcUukf+TGZ7pxz3OLH6L8tuYVy2Jl/5h7EzLST/xQSY2TK39GlcGJmr 1kaPSw3lgHQM1VV2BWZvBaad5+VZ X-Received: by 2002:a62:2702:: with SMTP id n2mr3180173pfn.29.1548269103802; Wed, 23 Jan 2019 10:45:03 -0800 (PST) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id u186sm35604319pfu.51.2019.01.23.10.45.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Jan 2019 10:45:03 -0800 (PST) Date: Wed, 23 Jan 2019 10:45:01 -0800 From: Dmitry Torokhov To: Nick Crews Cc: linux-kernel@vger.kernel.org, sjg@chromium.org, sre@kernel.org, linux-input@vger.kernel.org, groeck@chromium.org, dlaurie@chromium.org, Duncan Laurie , Nick Crews , Enric Balletbo i Serra , Benson Leung Subject: Re: [PATCH v4 6/9] platform/chrome: Add event handling Message-ID: <20190123184501.GA179701@dtor-ws> References: <20190123183325.92946-1-ncrews@chromium.org> <20190123183325.92946-7-ncrews@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190123183325.92946-7-ncrews@chromium.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Nick, Duncan, On Wed, Jan 23, 2019 at 11:33:22AM -0700, Nick Crews wrote: > From: Duncan Laurie > > The Wilco Embedded Controller can return extended events that > are not handled by standard ACPI objects. These events can > include hotkeys which map to standard functions like brightness > controls, or information about EC controlled features like the > charger or battery. > > These events are triggered with an ACPI Notify(0x90) and the > event data buffer is read through an ACPI method provided by > the BIOS which reads the event buffer from EC RAM. > > These events are then processed, with hotkey events being sent > to the input subsystem and other events put into a queue which > can be read by a userspace daemon via a sysfs attribute. I thought we agreed that brightness keys will be routed through normal keyboard interface, not separate input device? Looking at the driver more, I do not see why it needs to be toed to EC, this seems to be a straightforward ACPI driver that should bind to and ACPI device by its HID, since the only thing it does is installing ACPI notify handler and shuffling the events over to userspace. I do not think we want to use a binary attribute for this, as it does not support polling well and in general is not well suitable for pumping data to userspace. I'd recommend char misc device for that. What kind of events will be delivered over this interface? Thanks. -- Dmitry