mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
stm32: invert keyboard col2 option
Silego variant in pinky rev2 require the signal to be inverted. BUG=None TEST=on pinky-rev2: all keys from col2 work correctly BRANCH=None Change-Id: I83a029b4e9c6b4770e83f30b170595d45ea40cca Signed-off-by: Chris Zhong <zyw@rock-chips.com> Signed-off-by: Alexandru M Stan <amstan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/220314
This commit is contained in:
committed by
chrome-internal-fetch
parent
7a8891268d
commit
4be45e962c
@@ -22,6 +22,7 @@
|
||||
#define CONFIG_FORCE_CONSOLE_RESUME
|
||||
#define CONFIG_HOST_COMMAND_STATUS
|
||||
#define CONFIG_I2C
|
||||
#define CONFIG_KEYBOARD_COL2_INVERTED
|
||||
#define CONFIG_KEYBOARD_PROTOCOL_MKBP
|
||||
#define CONFIG_LED_COMMON
|
||||
#define CONFIG_LOW_POWER_IDLE
|
||||
|
||||
@@ -31,13 +31,13 @@ GPIO(5V_DRV, A, 8, GPIO_OUT_LOW, NULL)
|
||||
GPIO(BAT_LED0, B, 11, GPIO_OUT_LOW, NULL)
|
||||
GPIO(BAT_LED1, A, 11, GPIO_OUT_LOW, NULL)
|
||||
GPIO(EC_BL_OVERRIDE, F, 1, GPIO_OUT_LOW, NULL)
|
||||
GPIO(EC_INT, B, 9, GPIO_OUT_LOW, NULL)
|
||||
GPIO(EC_INT, B, 9, GPIO_OUT_LOW, NULL)
|
||||
GPIO(ENTERING_RW, F, 0, GPIO_OUT_LOW, NULL)
|
||||
GPIO(I2C1_SCL, B, 6, GPIO_ODR_HIGH, NULL)
|
||||
GPIO(I2C1_SDA, B, 7, GPIO_ODR_HIGH, NULL)
|
||||
GPIO(KB_OUT00, B, 0, GPIO_KB_OUTPUT, NULL)
|
||||
GPIO(KB_OUT01, B, 8, GPIO_KB_OUTPUT, NULL)
|
||||
GPIO(KB_OUT02, B, 12, GPIO_KB_OUTPUT, NULL)
|
||||
GPIO(KB_OUT02, B, 12, GPIO_OUT_LOW, NULL) /* Inverted from silegro */
|
||||
GPIO(KB_OUT03, B, 13, GPIO_KB_OUTPUT, NULL)
|
||||
GPIO(KB_OUT04, B, 14, GPIO_KB_OUTPUT, NULL)
|
||||
GPIO(KB_OUT05, B, 15, GPIO_KB_OUTPUT, NULL)
|
||||
|
||||
@@ -86,6 +86,13 @@ test_mockable void keyboard_raw_drive_column(int out)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_KEYBOARD_COL2_INVERTED
|
||||
if (bsrr & (gpio_list[GPIO_KB_OUT02].mask << 16 |
|
||||
gpio_list[GPIO_KB_OUT02].mask))
|
||||
bsrr ^= (gpio_list[GPIO_KB_OUT02].mask << 16 |
|
||||
gpio_list[GPIO_KB_OUT02].mask);
|
||||
#endif
|
||||
|
||||
if (bsrr)
|
||||
STM32_GPIO_BSRR(kb_out_ports[i]) = bsrr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user