summaryrefslogtreecommitdiff
path: root/drivers/misc/cros_ec_sandbox.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-01-17 00:52:25 +0300
committerSimon Glass <sjg@chromium.org>2021-01-31 00:25:41 +0300
commit7791df576c4e0bcb0529850e14173d028ec37275 (patch)
tree93b1185fd5fb60bc540d9b93d0478cf072978ac1 /drivers/misc/cros_ec_sandbox.c
parent698e30f7a862ae6eb4754ef0d42b8dc8cf416edd (diff)
downloadu-boot-7791df576c4e0bcb0529850e14173d028ec37275.tar.xz
cros_ec: Add support for reading the SKU ID
This allows reading strapping pins attached to the EC. Add an implementation for this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/misc/cros_ec_sandbox.c')
-rw-r--r--drivers/misc/cros_ec_sandbox.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c
index 1922a9c1b9..9324384704 100644
--- a/drivers/misc/cros_ec_sandbox.c
+++ b/drivers/misc/cros_ec_sandbox.c
@@ -473,6 +473,13 @@ static int process_cmd(struct ec_state *ec,
len = sizeof(*resp);
break;
}
+ case EC_CMD_GET_SKU_ID: {
+ struct ec_sku_id_info *resp = resp_data;
+
+ resp->sku_id = 1234;
+ len = sizeof(*resp);
+ break;
+ }
default:
printf(" ** Unknown EC command %#02x\n", req_hdr->command);
return -1;