Re: [PATCH v5] platform/chrome: wilco_ec: Add telemetry char device interface
From: Nick Crews
Date: Fri May 24 2019 - 10:51:09 EST
Hey Enric, thanks for the review!
On Fri, May 24, 2019 at 3:51 AM Enric Balletbo i Serra
> Hi Nick,
> I'm mostly fine with it but ...
> On 21/5/19 21:20, Nick Crews wrote:
> > The Wilco Embedded Controller is able to send telemetry data
> > which is useful for enterprise applications. A daemon running on
> > the OS sends a command to the EC via a write() to a char device,
> > and can read the response with a read(). The write() request is
> > verified by the driver to ensure that it is performing only one
> > of the whitelisted commands, and that no extraneous data is
> > being transmitted to the EC. The response is passed directly
> > back to the reader with no modification.
> > The character device will appear as /dev/wilco_telemN, where N
> > is some small non-negative integer, starting with 0. Only one
> Still remains my question in the previous version.
> We will really have more than one /dev/wilco_telemN devices handled by this
> driver? Why not use a Miscellaneous Character Device Driver that will simplify
> the code?
We probably will not have more than one device handled by the driver,
but I did this
at the request of Dmitry. He wanted to just do it right the first time so no one
would have to fix it if in the future a second device was needed. FYI,
I did the same
thing for the events driver at https://lore.kernel.org/patchwork/patch/1078461/.
I just tried to find the email thread and/or the review on the
Chromium Gerrit that
documents this, but I couldn't find it. It must have been a private
message, so sorry I
can't link you to it.
Dmitry, am I interpreting your reasoning correctly?