summaryrefslogtreecommitdiff
path: root/util/comm-host.h
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-11-04 12:11:58 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-05 04:22:34 +0000
commit252457d4b21f46889eebad61d4c0a65331919cec (patch)
tree01856c4d31d710b20e85a74c8d7b5836e35c3b98 /util/comm-host.h
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-stabilize-14526.73.B-ish.tar.gz
In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'util/comm-host.h')
-rw-r--r--util/comm-host.h103
1 files changed, 0 insertions, 103 deletions
diff --git a/util/comm-host.h b/util/comm-host.h
deleted file mode 100644
index 309c97eeb5..0000000000
--- a/util/comm-host.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Copyright 2013 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- *
- * For hysterical raisins, there are several mechanisms for communicating with
- * the EC. This abstracts them.
- */
-
-#ifndef __UTIL_COMM_HOST_H
-#define __UTIL_COMM_HOST_H
-
-#include "common.h"
-#include "ec_commands.h"
-
-/* ec_command return value for non-success result from EC */
-#define EECRESULT 1000
-
-/* Maximum output and input sizes for EC command, in bytes */
-extern int ec_max_outsize, ec_max_insize;
-
-/*
- * Maximum-size output and input buffers, for use by callers. This saves each
- * caller needing to allocate/free its own buffers.
- */
-extern void *ec_outbuf;
-extern void *ec_inbuf;
-
-/* Interfaces to allow for comm_init() */
-enum comm_interface {
- COMM_DEV = BIT(0),
- COMM_LPC = BIT(1),
- COMM_I2C = BIT(2),
- COMM_SERVO = BIT(3),
- COMM_ALL = -1
-};
-
-/**
- * Initialize alternative interfaces
- *
- * @param interfaces Interfaces to try; use COMM_ALL to try all of them.
- * @param device_name For DEV option, the device file to use.
- * @param i2c_bus For I2C option, the bus number to use (or -1 to autodetect).
- * @return 0 in case of success, or error code.
- */
-int comm_init_alt(int interfaces, const char *device_name, int i2c_bus);
-
-/**
- * Initialize dev interface
- *
- * @return 0 in case of success, or error code.
- */
-int comm_init_dev(const char *device_name);
-
-/**
- * Initialize input & output buffers
- *
- * @return 0 in case of success, or error code.
- */
-int comm_init_buffer(void);
-
-/**
- * Send a command to the EC. Returns the length of output data returned (0 if
- * none), or negative on error.
- */
-int ec_command(int command, int version,
- const void *outdata, int outsize, /* to the EC */
- void *indata, int insize); /* from the EC */
-
-/**
- * Set the offset to be applied to the command number when ec_command() calls
- * ec_command_proto().
- */
-void set_command_offset(int offset);
-
-/**
- * Send a command to the EC. Returns the length of output data returned (0 if
- * none), or negative on error. This is the low-level interface implemented
- * by the protocol-specific driver. DO NOT call this version directly from
- * anywhere but ec_command(), or the --device option will not work.
- */
-extern int (*ec_command_proto)(int command, int version,
- const void *outdata, int outsize, /* to EC */
- void *indata, int insize); /* from EC */
-
-/**
- * Return the content of the EC information area mapped as "memory".
- * The offsets are defined by the EC_MEMMAP_ constants. Returns the number
- * of bytes read, or negative on error. Specifying bytes=0 will read a
- * string (always including the trailing '\0').
- */
-extern int (*ec_readmem)(int offset, int bytes, void *dest);
-
-/**
- * Wait for a MKBP event matching 'mask' for at most 'timeout' milliseconds.
- * Then read the incoming event content in 'buffer' (or at most
- * 'buf_size' bytes of it).
- * Return the size of the event read on success, 0 in case of timeout,
- * or a negative value in case of error.
- */
-extern int (*ec_pollevent)(unsigned long mask, void *buffer, size_t buf_size,
- int timeout);
-
-#endif /* __UTIL_COMM_HOST_H */