]> git.baikalelectronics.ru Git - kernel.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)
commit32eb10d30196c8f70d73a45f4bb72d30f9429703
tree1175fef70919712da89d30c88d92a781cb4c506a
parent49250288820449e26abffc1305ba221bd05ce90d
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