linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Nick Crews <ncrews@chromium.org>
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 <dlaurie@google.com>,
	Nick Crews <ncrews@google.com>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Benson Leung <bleung@chromium.org>
Subject: Re: [PATCH v4 6/9] platform/chrome: Add event handling
Date: Wed, 23 Jan 2019 10:45:01 -0800	[thread overview]
Message-ID: <20190123184501.GA179701@dtor-ws> (raw)
In-Reply-To: <20190123183325.92946-7-ncrews@chromium.org>

Hi Nick, Duncan,

On Wed, Jan 23, 2019 at 11:33:22AM -0700, Nick Crews wrote:
> From: Duncan Laurie <dlaurie@google.com>
> 
> 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

  reply	other threads:[~2019-01-23 18:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-23 18:33 [PATCH v4 0/9] platform/chrome: rtc: Add support for Wilco EC Nick Crews
2019-01-23 18:33 ` [PATCH v4 1/9] cros_ec: Remove cros_ec dependency in lpc_mec Nick Crews
2019-01-23 18:33 ` [PATCH v4 2/9] platform/chrome: Add new driver for Wilco EC Nick Crews
2019-01-23 18:33 ` [PATCH v4 3/9] platform/chrome: Add support for raw commands in debugfs Nick Crews
2019-01-23 22:42   ` Enric Balletbo Serra
2019-01-23 18:33 ` [PATCH v4 4/9] platform/chrome: rtc: Add RTC driver Nick Crews
2019-02-07 19:50   ` Alexandre Belloni
2019-01-23 18:33 ` [PATCH v4 5/9] platform/chrome: Add sysfs attributes Nick Crews
2019-02-19 16:04   ` Enric Balletbo Serra
2019-01-23 18:33 ` [PATCH v4 6/9] platform/chrome: Add event handling Nick Crews
2019-01-23 18:45   ` Dmitry Torokhov [this message]
2019-01-23 18:33 ` [PATCH v4 7/9] platform/chrome: Add EC properties Nick Crews
2019-01-23 18:52   ` Dmitry Torokhov
2019-01-23 18:33 ` [PATCH v4 8/9] platform/chrome: Add peakshift and adv_batt_charging Nick Crews
2019-01-23 18:33 ` [PATCH v4 9/9] platform/chrome: Add binary telemetry attributes Nick Crews

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190123184501.GA179701@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=bleung@chromium.org \
    --cc=dlaurie@chromium.org \
    --cc=dlaurie@google.com \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ncrews@chromium.org \
    --cc=ncrews@google.com \
    --cc=sjg@chromium.org \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).