Re: Issue 239197 in chromium: Need a common userspace interface to Chrome OS EC

1 view
Skip to first unread message

chro...@googlecode.com

unread,
May 24, 2013, 7:55:22 PM5/24/13
to chromi...@chromium.org

Comment #4 on issue 239197 by bugdro...@chromium.org: Need a common
userspace interface to Chrome OS EC
http://code.google.com/p/chromium/issues/detail?id=239197#c4

Project: chromeos/vendor/kernel-exynos-staging
Branch : samsung-3.8-peach-alpha
Author : Bill Richardson <wfri...@chromium.org>
Commit : 6343ee9189f313cd80ed1a21c802e5903892745d

Code Review +2: Simon Glass
Verified +1: Simon Glass
Commit Ready : Simon Glass
Change-Id : Ia4daa7ac236c2f2a6f6562c2b3dec74531bf55bb
Reviewed-at : https://gerrit-int.chromium.org/38359

CHROMIUM: cros_ec: Remove unused member from struct cros_ec_device

The dev_lock member wasn't used anywhere. Locking is handled at a lower
level.

BUG=chromium:239197
BRANCH=all
TEST=manual

Built, booted. That mutex isn't used anywhere.

Signed-off-by: Bill Richardson <wfri...@chromium.org>
Commit-Queue: Simon Glass <s...@google.com>

M include/linux/mfd/cros_ec.h

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
May 24, 2013, 7:56:22 PM5/24/13
to chromi...@chromium.org

Comment #5 on issue 239197 by bugdro...@chromium.org: Need a common
userspace interface to Chrome OS EC
http://code.google.com/p/chromium/issues/detail?id=239197#c5

Project: chromeos/vendor/kernel-exynos-staging
Branch : samsung-3.8-peach-alpha
Author : Bill Richardson <wfri...@chromium.org>
Commit : 89f730f3edc56f0ad097fb169dd8908dd58a0208

Code Review +2: Simon Glass
Verified +1: Simon Glass
Commit Ready : Simon Glass
Change-Id : Ie138692720ed818b142d458b5975a778d3f8926d
Reviewed-at : https://gerrit-int.chromium.org/38360

CHROMIUM: cros_ec: Fix the comment on cros_ec_remove()

This comment was incorrect, so update it.

BUG=chromium:239197
BRANCH=all
TEST=build for pit

Signed-off-by: Bill Richardson <wfri...@chromium.org>
Updated commit message and removed erroneous free()
Signed-off-by: Simon Glass <s...@chromium.org>

chro...@googlecode.com

unread,
May 24, 2013, 7:57:22 PM5/24/13
to chromi...@chromium.org

Comment #6 on issue 239197 by bugdro...@chromium.org: Need a common
userspace interface to Chrome OS EC
http://code.google.com/p/chromium/issues/detail?id=239197#c6

Project: chromeos/vendor/kernel-exynos-staging
Branch : samsung-3.8-peach-alpha
Author : Bill Richardson <wfri...@chromium.org>
Commit : c4414f0944758730f4f14cb83ba50a44138f4fca

Code Review +2: Simon Glass
Verified +1: Simon Glass
Commit Ready : Simon Glass
Change-Id : I0cbee48e1161aa525b400c1f5511ae6b7e657415
Reviewed-at : https://gerrit-int.chromium.org/38361

CHROMIUM: cros_ec: IRQs for cros_ec should be optional

Preparing the way for the LPC device, which is just a plaform_device without
interrupts.

BUG=chromium:239197
BRANCH=all
TEST=none

We don't use this yet, so nothing to test.

Signed-off-by: Bill Richardson <wfri...@chromium.org>
Commit-Queue: Simon Glass <s...@google.com>

M drivers/mfd/cros_ec.c

chro...@googlecode.com

unread,
May 24, 2013, 7:58:22 PM5/24/13
to chromi...@chromium.org

Comment #7 on issue 239197 by bugdro...@chromium.org: Need a common
userspace interface to Chrome OS EC
http://code.google.com/p/chromium/issues/detail?id=239197#c7

Project: chromeos/vendor/kernel-exynos-staging
Branch : samsung-3.8-peach-alpha
Author : Bill Richardson <wfri...@chromium.org>
Commit : adf97098254a4bc1726c1f2cabef45b853783faa

Code Review +2: Simon Glass
Verified +1: Simon Glass
Commit Ready : Simon Glass
Change-Id : I2224aef34288cc5cbc79d6b2d95353e5540c148f
Reviewed-at : https://gerrit-int.chromium.org/38362

CHROMIUM: cros_ec: Allow static din/dout buffers with cros_ec_register()

The lower-level driver may want to provide its own buffers. If so, there's
no need to allocate new ones.

BUG=chromium:239197
BRANCH=all
TEST=none

We don't use this yet, so nothing to test.

Signed-off-by: Bill Richardson <wfri...@chromium.org>
Commit-Queue: Simon Glass <s...@google.com>

M drivers/mfd/cros_ec.c
M include/linux/mfd/cros_ec.h

chro...@googlecode.com

unread,
May 24, 2013, 7:59:22 PM5/24/13
to chromi...@chromium.org

Comment #8 on issue 239197 by bugdro...@chromium.org: Need a common
userspace interface to Chrome OS EC
http://code.google.com/p/chromium/issues/detail?id=239197#c8

Project: chromeos/vendor/kernel-exynos-staging
Branch : samsung-3.8-peach-alpha
Author : Bill Richardson <wfri...@chromium.org>
Commit : 8f451bc1d72b48a8111e141bc5d82b72e8a2dcd2

Code Review +2: Simon Glass
Verified +1: Simon Glass
Commit Ready : Simon Glass
Change-Id : I27055cc386327fed9ca969febae91a1c61ee3a86
Reviewed-at : https://gerrit-int.chromium.org/38363

CHROMIUM: cros_ec: Tweak struct cros_ec_device for clarity

The members of struct cros_ec_device were improperly commented, and
intermixed the private and public sections. This is just cleanup to make it
more obvious what goes with what.

BUG=chromium:239197
BRANCH=all
TEST=none

Signed-off-by: Bill Richardson <wfri...@chromium.org>
Commit-Queue: Simon Glass <s...@google.com>

M drivers/mfd/cros_ec.c
M drivers/mfd/cros_ec_i2c.c
M drivers/mfd/cros_ec_spi.c

chro...@googlecode.com

unread,
May 28, 2013, 1:58:47 PM5/28/13
to chromi...@chromium.org

Comment #9 on issue 239197 by bugdro...@chromium.org: Need a common
userspace interface to Chrome OS EC
http://code.google.com/p/chromium/issues/detail?id=239197#c9

Project: chromeos/vendor/kernel-exynos-staging
Branch : samsung-3.8-peach-alpha
Author : Bill Richardson <wfri...@chromium.org>
Commit : e9b34fd6125f46229f14b60db248433f21afa5ab

Code Review +2: Simon Glass
Verified +1: Simon Glass
Commit Ready : Simon Glass
Change-Id : Id97392261e2dbebb66cb82114f0d36eb7c8c2ea7
Reviewed-at : https://gerrit-int.chromium.org/38364

CHROMIUM: cros_ec: Add Chrome OS EC userspace device interface

This replaces the ad-hoc and unsafe userspace access methods with a single
common interface.

BUG=chromium:239197
BRANCH=all
TEST=none

Nothing to test until it's enabled.

Signed-off-by: Bill Richardson <wfri...@chromium.org>
Commit-Queue: Simon Glass <s...@google.com>

M drivers/mfd/Kconfig
M drivers/mfd/Makefile
M drivers/mfd/cros_ec.c
A drivers/mfd/cros_ec_dev.c
A include/linux/mfd/cros_ec_dev.h

chro...@googlecode.com

unread,
May 28, 2013, 2:00:47 PM5/28/13
to chromi...@chromium.org

Comment #10 on issue 239197 by bugdro...@chromium.org: Need a common
userspace interface to Chrome OS EC
http://code.google.com/p/chromium/issues/detail?id=239197#c10

Project: chromeos/vendor/kernel-exynos-staging
Branch : samsung-3.8-peach-alpha
Author : Bill Richardson <wfri...@chromium.org>
Commit : bc67a32b6490bec2f03ae084e6b7e32b04adf78b

Code Review +2: Simon Glass
Verified +1: Simon Glass
Commit Ready : Simon Glass
Change-Id : I210291236938dafdf9e81ef5a045bf6882d5af9d
Reviewed-at : https://gerrit-int.chromium.org/38365

CHROMIUM: config: cros_ec: Enable userspace interface device

Start using the common Chrome OS EC interface.

BUG=chromium:239197
BRANCH=all
TEST=manual

On the DUT:

localhost ~ # cat /dev/cros_ec
1.0.0
localhost ~ #

Signed-off-by: Bill Richardson <wfri...@chromium.org>
Commit-Queue: Simon Glass <s...@google.com>

M chromeos/config/armel/chromeos-exynos5.flavour.config

chro...@googlecode.com

unread,
Jun 11, 2013, 3:34:49 PM6/11/13
to chromi...@chromium.org

Comment #24 on issue 239197 by bugdro...@chromium.org: Need a common
userspace interface to Chrome OS EC
http://code.google.com/p/chromium/issues/detail?id=239197#c24

Project: chromiumos/third_party/kernel-next
Branch : chromeos-3.8
Author : Bill Richardson <wfri...@chromium.org>
Commit : 6a81f2b66c7e9aa5cb38753b02475e6d6578b7de

Code Review +2: Simon Glass
Verified +1: Bill Richardson
Change-Id : I3848fe27059cb2196b68dfbf75ec49975577f8e3
Reviewed-at : https://gerrit.chromium.org/gerrit/58130

CHROMIUM: config: Enable /dev/cros_ec on x86_64

This only affects Chromebooks that have Google's Embedded Controller (Link
at the moment). Others will see no change.

BUG=chromium:239197
BRANCH=none
TEST=manual

On machines with the Google EC, you can do this:

localhost ~ # ls -l /dev/cros_ec
crw------- 1 root root 251, 0 Jun 10 14:55 /dev/cros_ec
localhost ~ # cat /dev/cros_ec
1.0.0
localhost ~ #

The ToT ectool has already been updated to use this interface (when present)
in preference to the deprecated, optionally locking, platform-specific ones.

Signed-off-by: Bill Richardson <wfri...@chromium.org>

M chromeos/config/x86_64/common.config

chro...@googlecode.com

unread,
Jun 12, 2013, 2:14:28 PM6/12/13
to chromi...@chromium.org

Comment #25 on issue 239197 by bugdro...@chromium.org: Need a common
userspace interface to Chrome OS EC
http://code.google.com/p/chromium/issues/detail?id=239197#c25

Project: chromiumos/third_party/kernel-next
Branch : chromeos-3.8
Author : Simon Glass <s...@chromium.org>
Commit : 40aa68dfb3046cf5d4d5423dc84f23a17cc3288d

Code Review +2: Randall Spangler
Verified +1: Simon Glass
Change-Id : Iab523ece2c395186ee7a17fd205fb07c93599972
Reviewed-at : https://gerrit.chromium.org/gerrit/58199

CHROMIUM: cros_ec: Read EC version on start-up

It's useful to be able to see this information. The ordering is:

- cros_ec_dev interface version
- EC's RO image name
- EC's RW image name
- Currently running EC image (read-only, read-write)

BUG=chromium:239197
BRANCH=all
TEST=on pit:
cat /dev/cros_ec
1.0.0
pit_no_version
pit_no_version
read-only

Signed-off-by: Simon Glass <s...@chromium.org>
(cherry picked from commit 548f2c6c4128b4633158412be93b1d0e4bf46cb0)

M drivers/mfd/cros_ec_dev.c

chro...@googlecode.com

unread,
Jun 12, 2013, 2:16:28 PM6/12/13
to chromi...@chromium.org

Comment #26 on issue 239197 by bugdro...@chromium.org: Need a common
userspace interface to Chrome OS EC
http://code.google.com/p/chromium/issues/detail?id=239197#c26

Project: chromiumos/third_party/kernel-next
Branch : chromeos-3.8
Author : Simon Glass <s...@chromium.org>
Commit : ca7f1892dd6750ff73059c8eb1ba85759b21af15

Code Review +2: Randall Spangler
Verified +1: Simon Glass
Change-Id : Ia679f4bb690ed847d9b949251351e36e01653d12
Reviewed-at : https://gerrit.chromium.org/gerrit/58200

CHROMIUM: cros_ec: Detect in-progress commands

Some commands take a while to execute. Use -EAGAIN to signal this to the
caller.

BUG=chromium:239197
BRANCH=all
TEST=tested by a later commit

Signed-off-by: Simon Glass <s...@chromium.org>
(cherry picked from commit 88063b3cddbee8759ec93adb2e639b0217d3a829)

M drivers/mfd/cros_ec_spi.c

chro...@googlecode.com

unread,
Jun 20, 2013, 4:00:56 AM6/20/13
to chromi...@chromium.org

Comment #27 on issue 239197 by bugdro...@chromium.org: Need a common
userspace interface to Chrome OS EC
http://code.google.com/p/chromium/issues/detail?id=239197#c27

Project : chromiumos/platform/ec
Branch : factory-pit-4280.B
Author : Vadim Bendebury <vbe...@chromium.org>
Committer: Heng-ruey Hsu <henr...@chromium.org>
Commit : 5faf6d7c15c96f6ea0e96e60ed100e07ca38625e

Code Review +2: Heng-ruey Hsu
Verified +1: Heng-ruey Hsu
Commit Queue : Chumped
Change-Id : I16fcc0d6752d9e778a026717208d8d6487d5dc77
Reviewed-at : https://gerrit.chromium.org/gerrit/59391

drop: Ignore command version for VBNV CONTEXT command

The ec driver does not yet pass the command version properly from app
to the EC. This causes a failure when trying to use the vbnvram
context command (23). The thing is that the command version is not
even important for this command, as it was never implemented
differently.

As a quick fix - mark the command descriptor as supporting both
versions. I wonder if we should implement a "don't care" option for
situations like this.

BRANCH=none
BUG=chromium:239197
TEST=manual
. on peach_pit:
localhost ~ # mosys nvram vboot read
70000000000000000000000000000020
localhost ~ #

Signed-off-by: Vadim Bendebury <vbe...@chromium.org>
Commit-Queue: Heng-ruey Hsu <henr...@chromium.org>

M common/system_common.c

chro...@googlecode.com

unread,
Jun 20, 2013, 7:19:03 PM6/20/13
to chromi...@chromium.org

Comment #29 on issue 239197 by bugdro...@chromium.org: Need a common
userspace interface to Chrome OS EC
http://code.google.com/p/chromium/issues/detail?id=239197#c29

Project: chromiumos/platform/ec
Branch : master
Author : Vadim Bendebury <vbe...@chromium.org>
Commit : b839e6524193b61bad0f5ce935b45f48e26d23c0

Code Review +2: Vadim Bendebury
Verified +1: Vadim Bendebury
Change-Id : I16fcc0d6752d9e778a026717208d8d6487d5dc77
Reviewed-at : https://gerrit.chromium.org/gerrit/59348

drop: Ignore command version for VBNV CONTEXT command

The ec driver does not yet pass the command version properly from app
to the EC. This causes a failure when trying to use the vbnvram
context command (23). The thing is that the command version is not
even important for this command, as it was never implemented
differently.

As a quick fix - mark the command descriptor as supporting both
versions. I wonder if we should implement a "don't care" option for
situations like this.

BRANCH=none
BUG=chromium:239197
TEST=manual
. on peach_pit:
localhost ~ # mosys nvram vboot read
70000000000000000000000000000020
localhost ~ #

Signed-off-by: Vadim Bendebury <vbe...@chromium.org>

Reply all
Reply to author
Forward
0 new messages