]> asedeno.scripts.mit.edu Git - linux.git/commit
platform/chrome: wilco_ec: Add property helper library
authorNick Crews <ncrews@chromium.org>
Wed, 24 Apr 2019 16:56:50 +0000 (10:56 -0600)
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>
Mon, 20 May 2019 08:18:09 +0000 (10:18 +0200)
commit0c0b7ea23aed0b55ef2f9803f13ddaae1943713d
tree1175fef70919712da89d30c88d92a781cb4c506a
parenta188339ca5a396acc588e5851ed7e19f66b0ebd9
platform/chrome: wilco_ec: Add property helper library

A Property is typically a data item that is stored to NVRAM
by the EC. Each of these data items has an index associated
with it, known as the Property ID (PID). Properties may have
variable lengths, up to a max of WILCO_EC_PROPERTY_MAX_SIZE
bytes. Properties can be simple integers, or they may be more
complex binary data.

This patch adds support for getting and setting properties.
This will be useful for setting the charge algorithm and charge
schedules, which all use properties.

Signed-off-by: Nick Crews <ncrews@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
drivers/platform/chrome/wilco_ec/Makefile
drivers/platform/chrome/wilco_ec/properties.c [new file with mode: 0644]
include/linux/platform_data/wilco-ec.h