<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/cros_ec.h, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/include/cros_ec.h?h=main</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/include/cros_ec.h?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2026-06-29T21:29:44Z</updated>
<entry>
<title>cros_ec: Convert dm_cros_ec_get_ops into an inline function and constify dm_cros_ec_ops</title>
<updated>2026-06-29T21:29:44Z</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2026-06-12T01:59:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4a0990218aa9185c2ccd7986dc1ad14b24aaaa9d'/>
<id>urn:sha1:4a0990218aa9185c2ccd7986dc1ad14b24aaaa9d</id>
<content type='text'>
Convert dm_cros_ec_get_ops into an inline function to improve compiler
code coverage, and constify struct dm_cros_ec_ops in a few places.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>cros_ec: Sync ec_commands.h from upstream Chrome OS EC</title>
<updated>2026-05-25T19:43:31Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2026-05-08T16:22:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a219f64c2794135b44ab9aa9b808c5c25d18262c'/>
<id>urn:sha1:a219f64c2794135b44ab9aa9b808c5c25d18262c</id>
<content type='text'>
Sync include/ec_commands.h from upstream commit 4f3d17aa34
("skywalker: set SLEEP_TIMEOUT_MS to 50 seconds"). The new file makes
two build assumptions that do not hold for U-Boot.

It hides '&lt;stdint.h&gt;' from __KERNEL__ builds, leaving UINT16_MAX
(used by EC_RES_MAX) undefined for U-Boot; widen the gate to
'!defined(__KERNEL__) || defined(__UBOOT__)'

It gates '&lt;linux/limits.h&gt;' on '#ifdef __KERNEL__'; the matching
'#else' branch defines BIT()/BIT_ULL()/GENMASK()/GENMASK_ULL()
locally, assuming kernel headers provide those macros otherwise.
U-Boot defines __KERNEL__ too but has no &lt;linux/limits.h&gt;. Nest a
'!defined(__UBOOT__)' check around the include so the __UBOOT__ path
stays in the __KERNEL__ branch (no local BIT/GENMASK defines), which
avoids redefinition warnings against U-Boot's linux/bitops.h. Pull
in linux/bitops.h up front for U-Boot so the file's own BIT() and
GENMASK() uses still resolve.

Adapt callers to two interface changes. The 'ec_current_image' enum
tag is now 'ec_image' (EC_IMAGE_* constants unchanged); rename it in
affected files to match. The VBNV-context interface was dropped
upstream, but it still used in lab Chromebooks; keep those constants and
structs in cros_ec.h

Likewise, MEC_EMI_BASE and MEC_EMI_SIZE are a U-Boot-local addition to
ec_commands.h that the upstream sync removes; preserve them in cros_ec.h
next to the VBNV block, and switch the only consumer
(arch/x86/cpu/apollolake/cpu_spl.c) to include cros_ec.h

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>cros_ec: Complete the comment for cros_ec_read_batt_charge()</title>
<updated>2022-04-06T18:01:42Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-02-28T19:08:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a50b56133315b16a03597d6a66c106e2e1de5903'/>
<id>urn:sha1:a50b56133315b16a03597d6a66c106e2e1de5903</id>
<content type='text'>
Add the missing 'Return' information.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>doc: replace @return by Return:</title>
<updated>2022-01-19T17:11:34Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2022-01-19T17:05:50Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=185f812c419f1b4f0d10d9787d59cf9f11a2a600'/>
<id>urn:sha1:185f812c419f1b4f0d10d9787d59cf9f11a2a600</id>
<content type='text'>
Sphinx expects Return: and not @return to indicate a return value.

find . -name '*.c' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;

find . -name '*.h' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
</entry>
<entry>
<title>cros_ec: Drop cros_ec_entering_mode()</title>
<updated>2021-07-21T16:27:34Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-07-05T22:32:50Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1e465eb6698e294e8fa9ed41165483b88062396a'/>
<id>urn:sha1:1e465eb6698e294e8fa9ed41165483b88062396a</id>
<content type='text'>
This function is not needed anymore. Drop it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>cros_ec: Allow reading the battery-charge state</title>
<updated>2021-07-21T16:27:34Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-07-05T22:32:49Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=201efb2bb0f7c4ae5f08f51b6f6b7cdfdba5b4f4'/>
<id>urn:sha1:201efb2bb0f7c4ae5f08f51b6f6b7cdfdba5b4f4</id>
<content type='text'>
Add a function to read this information from the EC. It is useful for
determining whether the battery has enough charge to boot.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>pwm: Add a driver for Chrome OS EC PWM</title>
<updated>2021-04-10T14:08:39Z</updated>
<author>
<name>Alper Nebi Yasak</name>
<email>alpernebiyasak@gmail.com</email>
</author>
<published>2020-10-22T20:49:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1b9ee2882e6bd1c17ab2ec86249aa0347af68242'/>
<id>urn:sha1:1b9ee2882e6bd1c17ab2ec86249aa0347af68242</id>
<content type='text'>
This PWM is used in rk3399-gru-bob and rk3399-gru-kevin to control
the display brightness. We can only change the duty cycle, so on
set_config() we just try to match the duty cycle that dividing duty_ns
by period_ns gives us. To disable, we set the duty cycle to zero while
keeping the old value for when we want to re-enable it.

The cros_ec_set_pwm_duty() function is taken from Depthcharge's
cros_ec_set_bl_pwm_duty() but modified to use the generic pwm type.
The driver itself is very loosely based on rk_pwm.c for the general pwm
driver structure.

The devicetree binding file is from Linux, before it was converted to
YAML at 5df5a577a6b4 ("dt-bindings: pwm: Convert google,cros-ec-pwm.txt
to YAML format") in their repo.

Signed-off-by: Alper Nebi Yasak &lt;alpernebiyasak@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>cros_ec: Add vstore support</title>
<updated>2021-01-30T21:25:41Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-01-16T21:52:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=10f746591fba16a48f0e3d14641be09f01982807'/>
<id>urn:sha1:10f746591fba16a48f0e3d14641be09f01982807</id>
<content type='text'>
The EC can store small amounts of data for the benefit of the
verified boot process. Since the EC is seldom reset, this can allow the
AP to store data that survives a reboot or a suspend/resume cycle.

Add support for this.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>cros_ec: Add support for switches</title>
<updated>2021-01-30T21:25:41Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-01-16T21:52:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3a6c994f3896d66e617acdf9bb58ffc4def08b71'/>
<id>urn:sha1:3a6c994f3896d66e617acdf9bb58ffc4def08b71</id>
<content type='text'>
On x86 platforms the EC provides a way to read 'switches', which are
on/off values determined by the EC.

Add a new driver method for this and implement it for LPC.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>cros_ec: Add documentation for cros_ec driver operations</title>
<updated>2021-01-30T21:25:41Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-01-16T21:52:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2b4b65339110e11b4a859fceeb1eec82b2ebb5f1'/>
<id>urn:sha1:2b4b65339110e11b4a859fceeb1eec82b2ebb5f1</id>
<content type='text'>
Add comments to these methods so it is documented in this central place,
not just in each driver.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
</feed>
