summaryrefslogtreecommitdiff
path: root/chip/it83xx/keyboard_raw.c
Commit message (Collapse)AuthorAgeFilesLines
* ish: Trim down the release branchstabilize-wristpin-14469.59.B-ishstabilize-voshyr-14637.B-ishstabilize-quickfix-14695.187.B-ishstabilize-quickfix-14695.124.B-ishstabilize-quickfix-14526.91.B-ishstabilize-14695.85.B-ishstabilize-14695.107.B-ishstabilize-14682.B-ishstabilize-14633.B-ishstabilize-14616.B-ishstabilize-14589.B-ishstabilize-14588.98.B-ishstabilize-14588.14.B-ishstabilize-14588.123.B-ishstabilize-14536.B-ishstabilize-14532.B-ishstabilize-14528.B-ishstabilize-14526.89.B-ishstabilize-14526.84.B-ishstabilize-14526.73.B-ishstabilize-14526.67.B-ishstabilize-14526.57.B-ishstabilize-14498.B-ishstabilize-14496.B-ishstabilize-14477.B-ishstabilize-14469.9.B-ishstabilize-14469.8.B-ishstabilize-14469.58.B-ishstabilize-14469.41.B-ishstabilize-14442.B-ishstabilize-14438.B-ishstabilize-14411.B-ishstabilize-14396.B-ishstabilize-14395.B-ishstabilize-14388.62.B-ishstabilize-14388.61.B-ishstabilize-14388.52.B-ishstabilize-14385.B-ishstabilize-14345.B-ishstabilize-14336.B-ishstabilize-14333.B-ishrelease-R99-14469.B-ishrelease-R98-14388.B-ishrelease-R102-14695.B-ishrelease-R101-14588.B-ishrelease-R100-14526.B-ishfirmware-cherry-14454.B-ishfirmware-brya-14505.B-ishfirmware-brya-14505.71.B-ishfactory-kukui-14374.B-ishfactory-guybrush-14600.B-ishfactory-cherry-14455.B-ishfactory-brya-14517.B-ishJack Rosenthal2021-11-051-158/+0
| | | | | | | | | | | | | | | | | | | | | | 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>
* it83xx/keyboard: support keyboard_raw_is_input_low()Dino Li2020-10-141-0/+5
| | | | | | | | | | | | | | Support keyboard_raw_is_input_low() for enable CONFIG_KEYBOARD_FACTORY_TEST. BUG=b:170699805 BRANCH=none TEST=The function works as expected. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I30ff914bdaf3fe47949227fa0a5cee327408913e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2463037 Tested-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Reviewed-by: Diana Z <dzigterman@chromium.org>
* it83xx/KB/GPIO: support keyboard GPIO output modeRuibin Chang2020-10-141-3/+29
| | | | | | | | | | | | | | | | | | | | | | | These pins could be used as GPIO input, and they can be configured as GPIO output as well. So we made this patch to support it. BRANCH=none BUG=b:170699805 TEST=On board it8xxx2_evb 1.GPIO only: set/get level properly at GPIO mode. 2.GPIO and alternate mix: KSI input low and KSO GPIO level not change On board reef_it8320 1.keyboard scan function still work fine. Change-Id: I2098812649f2e3ee9a8718d0d75e541ce3f14338 Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2182128 Tested-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Ruibin Chang <Ruibin.Chang@ite.com.tw>
* it83xx/keyboard: enable push-pull for KSO2Dino Li2020-10-051-0/+3
| | | | | | | | | | | | | | | | | This change enables push-pull for EC's KSO2 if CONFIG_KEYBOARD_COL2_INVERTED is enabled (H1 inverts signal of column 2 to keyboard). BUG=b:169715234 BRANCH=octopus TEST= EC is able to drive KSO2 which connected to H1 to 3.3V. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I61e07a15be2c5275363f358bf539c3311305d845 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2437722 Commit-Queue: Diana Z <dzigterman@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Tested-by: James Chao <james_chao@asus.corp-partner.google.com>
* common: bit change 1 << constants with BIT(constants)Gwendal Grignou2019-03-261-1/+1
| | | | | | | | | | | | | | | | | Mechanical replacement of bit operation where operand is a constant. More bit operation exist, but prone to errors. Reveal a bug in npcx: chip/npcx/system-npcx7.c:114:54: error: conversion from 'long unsigned int' to 'uint8_t' {aka 'volatile unsigned char'} changes value from '16777215' to '255' [-Werror=overflow] BUG=None BRANCH=None TEST=None Change-Id: I006614026143fa180702ac0d1cc2ceb1b3c6eeb0 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1518660 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* common: replace 1 << digits, with BIT(digits)Gwendal Grignou2019-03-261-2/+2
| | | | | | | | | | | | | | | | Requested for linux integration, use BIT instead of 1 << First step replace bit operation with operand containing only digits. Fix an error in motion_lid try to set bit 31 of a signed integer. BUG=None BRANCH=None TEST=compile Change-Id: Ie843611f2f68e241f0f40d4067f7ade726951d29 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1518659 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* keyboard: it83xx: add COL02 inverted featureDino Li2016-05-061-0/+9
| | | | | | | | | | | | | | | | | The other chips support this feature so we implement it too. Signed-off-by: Dino Li <dino.li@ite.com.tw> BRANCH=none BUG=none TEST=The behavior of kso2 is inverted if define 'CONFIG_KEYBOARD_COL2_INVERTED'. Change-Id: I70d1694ca7d3d10278a484a632e88dc204b71b23 Reviewed-on: https://chromium-review.googlesource.com/342488 Commit-Ready: Dino Li <dino.li@ite.com.tw> Tested-by: Dino Li <dino.li@ite.com.tw> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* it83xx: keyboard: remove "CONFIG_IT83XX_KEYBOARD_KSI_WUC_INT" and fix ISRDino Li2016-03-221-24/+2
| | | | | | | | | | | | | | | | | | | | | | 1. Always use wake-up control interrupt for keyboard KSI. This can also wake-up EC from deep doze / sleep mode. 2. In keyboard ISR, we just clear interrupt status to prevent keyboard interrupt can't be re-enabled. (for example, a KSI interrupt wakes up keyboard scan task, but keyboard_raw_read_rows() got 0.) Signed-off-by: Dino Li <dino.li@ite.com.tw> BRANCH=none BUG=none TEST=keyboard function is normally. Change-Id: If8c292189c6133b179a63dedcb7a18abbc091312 Reviewed-on: https://chromium-review.googlesource.com/333865 Commit-Ready: Dino Li <dino.li@ite.com.tw> Tested-by: Dino Li <dino.li@ite.com.tw> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* it8380dev: fix KB init state abnormalDino Li2015-08-061-1/+0
| | | | | | | | | | | | | | | | | | | | Let keyboard_raw_task_start() function enable key scan interrupt. symptom: When any key is pressed while powering on the system. Console message "KB init state" will show no key pressed. Signed-off-by: Dino Li <dino.li@ite.com.tw> BRANCH=none BUG=none TEST=console message "KB init state" normal Change-Id: I49fcbc4c6c40d0c7e551631466a4ef4c2215a892 Reviewed-on: https://chromium-review.googlesource.com/290508 Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Dino Li <dino.li@ite.com.tw> Tested-by: Dino Li <dino.li@ite.com.tw>
* it8380dev: add i2c control moduleDino Li2015-06-301-5/+5
| | | | | | | | | | | | | | | | | | | | Add i2c control module for emulation board. To rename CONFIG_ to CONFIG_IT83XX_ for IT83XX series configuration. Signed-off-by: Dino Li <dino.li@ite.com.tw> BRANCH=none BUG=none TEST=1. console command "i2cscan" found devices correctly. 2. console command "i2cxfer". 2-a. port2 + battery, i2cxfer r, r16, and rlen OK. 2-b. port1 + slave evb, i2cxfer r, r16, rlen, w, and w16 OK. Change-Id: I67165f7dcdef538ba6dd03b47f1621a73cc68379 Reviewed-on: https://chromium-review.googlesource.com/263678 Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Dino Li <dino.li@ite.com.tw> Tested-by: Dino Li <dino.li@ite.com.tw>
* it8380dev: add KBC/KMSC moduleDino Li2015-03-221-0/+138
1. DLM 16KB. 2. Add KBC/KMSC module for emulation board. Signed-off-by: Dino Li <dino.li@ite.com.tw> BRANCH=none BUG=none TEST=EVB + x86 MB can boot into DOS and keyboard works. Change-Id: Ia5cc2d4f1733ce07879d410b0447b2d48e50cd95 Reviewed-on: https://chromium-review.googlesource.com/259923 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Tested-by: Dino Li <dino.li@ite.com.tw> Commit-Queue: Dino Li <dino.li@ite.com.tw>