summaryrefslogtreecommitdiff
path: root/board/hammer/variants.h
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2021-04-14 17:46:47 +0800
committerCommit Bot <commit-bot@chromium.org>2021-04-15 11:46:17 +0000
commitf85969bcc0d0fae9b94dd460a2333fa8539c9d0a (patch)
treeae7ed86657a0d2188734524a4dfd7b44d78affaf /board/hammer/variants.h
parent58cf225eec156aa1cf560b6d39f92a9c0798f0af (diff)
downloadchrome-ec-f85969bcc0d0fae9b94dd460a2333fa8539c9d0a.tar.gz
zed: update touchpad parameter
Update touchpad parameter for zed. There's no integer solution for CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y (calculation appended below), this CL also modified the runtime check in elan tp driver to allow rounding errors. Math details: Given dpi_y = 800, LOGICAL_MAX_Y = 1811, we want to find an integer PHYSICAL_MAX_Y such that dpi == 254 * LOGICAL_MAX_Y / PHYSICAL_MAX_Y. The closest solution is 1) PHYSICAL_MAX_Y = 574, 254 * LOGICAL_MAX_Y / PHYSICAL_MAX_Y = 801.3832 != dpi_y, or 2) PHYSICAL_MAX_Y = 575, 254 * LOGICAL_MAX_Y / PHYSICAL_MAX_Y = 799.9895 != dpi_y Both cannot pass our runtime verification. BUG=None TEST=No "TP mismatch" in ec console BRANCH=trogdor Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I9d0c54d029bb2f9e78114341a6246857b41937b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2825473 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'board/hammer/variants.h')
-rw-r--r--board/hammer/variants.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/board/hammer/variants.h b/board/hammer/variants.h
index e9ebadd0c6..d3ac1f7086 100644
--- a/board/hammer/variants.h
+++ b/board/hammer/variants.h
@@ -53,7 +53,7 @@
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_X 2925
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_Y 1440
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_PRESSURE 511
-#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 928 /* tenth of mm */
+#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 929 /* tenth of mm */
#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y 457 /* tenth of mm */
#define CONFIG_TOUCHPAD_VIRTUAL_SIZE (56*1024)
#elif defined(BOARD_MAGNEMITE)
@@ -71,7 +71,7 @@
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_X 2925
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_Y 1440
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_PRESSURE 511
-#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 928 /* tenth of mm */
+#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 929 /* tenth of mm */
#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y 457 /* tenth of mm */
#define CONFIG_TOUCHPAD_VIRTUAL_SIZE (56*1024)
#elif defined(BOARD_STAFF)
@@ -79,8 +79,8 @@
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_X 3206
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_Y 1832
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_PRESSURE 511
-#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 1017 /* tenth of mm */
-#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y 581 /* tenth of mm */
+#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 1018 /* tenth of mm */
+#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y 582 /* tenth of mm */
#define CONFIG_TOUCHPAD_VIRTUAL_SIZE (56*1024)
#elif defined(BOARD_STAR)
/* TODO: update correct parameters */
@@ -97,8 +97,8 @@
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_X 2160
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_Y 1573
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_PRESSURE 255
-#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 1030 /* tenth of mm */
-#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y 750 /* tenth of mm */
+#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 1031 /* tenth of mm */
+#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y 751 /* tenth of mm */
#define CONFIG_TOUCHPAD_VIRTUAL_SIZE (CONFIG_UPDATE_PDU_SIZE + 128*1024)
/* Enable to send heatmap to AP */
#define CONFIG_USB_ISOCHRONOUS
@@ -108,11 +108,11 @@
/* TODO: update correct parameters */
#define HAS_I2C_TOUCHPAD
-#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_X 3207
-#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_Y 1783
+#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_X 3340
+#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_Y 1811
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_PRESSURE 511
-#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 1018 /* tenth of mm */
-#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y 566 /* tenth of mm */
+#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 1060 /* tenth of mm */
+#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y 575 /* tenth of mm */
#define CONFIG_TOUCHPAD_VIRTUAL_SIZE (64*1024)
#else
#error "No touchpad information for board."