[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEgFhe+DQrJ6HqGF1_OWZ77Qs-hZLNgX1bHpx5FOt-y-3xh8gA@mail.gmail.com>
Date: Thu, 20 Nov 2014 10:16:03 -0800
From: Bill Richardson <wfrichar@...omium.org>
To: Javier Martinez Canillas <javier.martinez@...labora.co.uk>
Cc: Lee Jones <lee.jones@...aro.org>,
Doug Anderson <dianders@...omium.org>,
Olof Johansson <olof@...om.net>, Simon Glass <sjg@...gle.com>,
Gwendal Grignou <gwendal@...gle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] mfd: cros_ec: Create sysfs attributes for the
ChromeOS EC.
On Thu, Nov 20, 2014 at 3:58 AM, Javier Martinez Canillas
<javier.martinez@...labora.co.uk> wrote:
>
> I don't really know why there are two interfaces for this but I guess
> that different user-space utilities use one or another. Maybe the
> ChromiumOS folks can comment on this.
The /dev/cros_ec interface responds to ioctls and is the primary means
by which userspace applications talk to the EC (replacing three really
awkward bus-specific libraries). It emits a simplified version string
when read so that humans can tell if the EC is alive and speaking the
same protocol that the userspace app expects.
The /sys/class/chromeos/cros_ec/* tree was originally envisioned as a
way to provide additional human-readable interfaces to a subset of the
EC commands, but except for the lightbar it's not often used. The
version component here shows all the version-related info that the EC
can provide.
I apologize for the poor kernel conventions used here. In my
ignorance, I apparently chose the worst code possible to use as a
template, and then invented some new stupidness of my own.
Bill
--
Art for Art's Sake
Engineering for Money
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists