summaryrefslogtreecommitdiff
path: root/include/i2c_hid_touchpad.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 /include/i2c_hid_touchpad.h
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-stabilize-14526.84.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 'include/i2c_hid_touchpad.h')
-rw-r--r--include/i2c_hid_touchpad.h81
1 files changed, 0 insertions, 81 deletions
diff --git a/include/i2c_hid_touchpad.h b/include/i2c_hid_touchpad.h
deleted file mode 100644
index d5d728a488..0000000000
--- a/include/i2c_hid_touchpad.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Copyright 2020 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.
- */
-
-/* Implementation of I2C HID for touchpads */
-#ifndef __CROS_EC_I2C_HID_TOUCHPAD_H
-#define __CROS_EC_I2C_HID_TOUCHPAD_H
-
-#include "common.h"
-#include "i2c_hid.h"
-#include "stdbool.h"
-#include "stdint.h"
-
-/* Max fingers to support */
-#define I2C_HID_TOUCHPAD_MAX_FINGERS 5
-
-/*
- * Struct holding a touchpad event
- *
- * The user should parse the original touchpad report, apply necessary
- * transformations and fill the result in this common struct. The touchpad is
- * assumed to implement the Linux HID MT-B protocol.
- */
-struct touchpad_event {
- /* If hover is detected */
- bool hover;
- /* If button is clicked */
- bool button;
- /* Struct for contacts */
- struct {
- /* X & Y of the contact */
- uint16_t x;
- uint16_t y;
- /* Pressure/contact area */
- uint16_t pressure;
- /* W & H of the contact */
- uint16_t width;
- uint16_t height;
- /*
- * Orientation of the contact ellipse. Can be plain 0 if
- * unavailable.
- */
- uint16_t orientation;
- /*
- * If the touchpad believes it is a palm. Some touchpads report
- * it through the confidence field.
- */
- bool is_palm;
- /* If this slot contains valid contact (touching the surface) */
- bool valid;
- } __packed finger[I2C_HID_TOUCHPAD_MAX_FINGERS];
-} __packed;
-
-/* Initialize the I2C HID touchpad */
-void i2c_hid_touchpad_init(void);
-/*
- * Process an I2C-HID command from host.
- *
- * @param len >= 0 - Input data length in bytes
- * @param buffer Shared input/output buffer
- * @param send_response Function to send the response to host
- * @param data Extracted request content if there is any
- * @param reg I2C HID register as defined in include/i2c-hid.h
- * @param cmd I2C HID command as defined in common/i2c_hid_touchpad.c
- *
- * @return EC_SUCCESS, or non-zero if error.
- */
-int i2c_hid_touchpad_process(unsigned int len, uint8_t *buffer,
- void (*send_response)(int len), uint8_t *data,
- int *reg, int *cmd);
-/**
- * Compile an (outgoing) HID input report for an (incoming) touchpad event
- *
- * The compiled report would be sent next time when the host requests one.
- *
- * @param touchpad_event Touchpad event data
- */
-void i2c_hid_compile_report(struct touchpad_event *event);
-
-#endif /* __CROS_EC_I2C_HID_TOUCHPAD_H */