From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Lee Jones <lee.jones@linaro.org>
Cc: Doug Anderson <dianders@chromium.org>,
Bill Richardson <wfrichar@chromium.org>,
Olof Johansson <olof@lixom.net>, Simon Glass <sjg@google.com>,
Gwendal Grignou <gwendal@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] mfd: cros_ec: Create sysfs attributes for the ChromeOS EC.
Date: Thu, 20 Nov 2014 12:58:59 +0100 [thread overview]
Message-ID: <546DD783.2030902@collabora.co.uk> (raw)
In-Reply-To: <20141118142645.GD24004@x1>
Hello Lee,
On 11/18/2014 03:26 PM, Lee Jones wrote:
> On Mon, 17 Nov 2014, Javier Martinez Canillas wrote:
>
>> From: Bill Richardson <wfrichar@chromium.org>
>>
>> This adds the first few sysfs attributes for the Chrome OS EC. These
>> controls are made available under /sys/devices/virtual/chromeos/cros_ec
>>
>> flashinfo - display current flash info
>
> drivers/mtd?
>
>> reboot - tell the EC to reboot in various ways
>
> drivers/power?
>
Well this driver is special in the sense that there is a Cortex-M Embedded
Controller that has different peripherals (flash, keyboard, charger, etc).
The kernel communicates with these peripherals by using a tunnel through
the protocol used to communicate with the Embedded Controller (SPI/I2C/LPC).
But you are right that this is not suitable for drivers/mfd, I just added
there because that is the location in the downstream ChromeOS kernel but
like you said, the MFD subsystem should not be a dumping ground for devices
that is not clear where should live.
On v2 I'll add this sysfs interface and the dev to drivers/platform/chrome/
since I think is a better place for the cros_ec dev driver. It will still
be spawns from the cros_ec MFD driver though but that is OK for you AFAIU.
>> version - information about the EC software and hardware
>
> What's the difference between this version and the version you can
> read in the new _dev driver?
>
The version information read from the cros_ec dev interface is a subset
of the information read from the version sysfs, e.g:
$ cat /dev/cros_ec
1.0.0
pit_v1.1.1198-1cd618e
pit_v1.1.1198-1cd618e
read-only
$ cat /sys/class/chromeos/cros_ec/version
RO version: pit_v1.1.1198-1cd618e
RW version: pit_v1.1.1198-1cd618e
Firmware copy: RO
Build info: pit_v1.1.1198-1cd618e 2014-04-30 16:29:52 @build122-m2
Chip vendor: stm
Chip name: stm32l15x
Chip revision:
Board version: 0
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.
Best regards,
Javier
next prev parent reply other threads:[~2014-11-20 11:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-17 15:30 [PATCH 0/3] mfd: cros_ec: Add user-space dev inferface support Javier Martinez Canillas
2014-11-17 15:30 ` [PATCH 1/3] mfd: cros_ec: Add Chrome OS EC userspace device interface Javier Martinez Canillas
2014-11-18 14:18 ` Lee Jones
2014-11-20 11:27 ` Javier Martinez Canillas
2014-11-20 11:58 ` Lee Jones
2014-11-20 12:13 ` Javier Martinez Canillas
2014-11-20 13:26 ` Lee Jones
2014-11-18 17:00 ` One Thousand Gnomes
2014-11-19 18:37 ` Javier Martinez Canillas
2014-11-19 20:45 ` Olof Johansson
2014-11-20 10:03 ` Javier Martinez Canillas
2014-11-17 15:30 ` [PATCH 2/3] mfd: cros_ec: Create sysfs attributes for the ChromeOS EC Javier Martinez Canillas
2014-11-18 14:26 ` Lee Jones
2014-11-20 11:58 ` Javier Martinez Canillas [this message]
2014-11-20 18:16 ` Bill Richardson
2014-11-21 18:40 ` Javier Martinez Canillas
2014-11-17 15:30 ` [PATCH 3/3] mfd: cros_ec: Expose Chrome OS Lightbar to users Javier Martinez Canillas
2014-11-18 14:22 ` Lee Jones
2014-11-20 12:00 ` Javier Martinez Canillas
2014-11-20 13:27 ` Lee Jones
2014-11-20 13:36 ` Javier Martinez Canillas
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=546DD783.2030902@collabora.co.uk \
--to=javier.martinez@collabora.co.uk \
--cc=dianders@chromium.org \
--cc=gwendal@google.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olof@lixom.net \
--cc=sjg@google.com \
--cc=wfrichar@chromium.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