keyscan: decouple keyboard_raw functionality from the presence of TASK_KEYSCAN
With the addition of external i2c keyboard controllers, chips that don't necessarly have gpios going to a keyboard can now still have a TASK_KEYSCAN. Therefore it's wrong to assume we want the chip/*/keyboard_raw code included. There was no easy way to make an ways on option (eg: CONFIG_KEYBOARD_RAW) that could get #undefd in strategic places. The place that would always define it would be in include/config.h but I don't believe that executes before the build.mk rules. BUG=b:135895590 TEST=Other boards with keyboards still happy. TEST=No compile errors (regarding missing keyboard GPIOS) when declaring TASK_KEYSCAN on a fresh stm32 board. BRANCH=master Change-Id: I061812a6941a11784950280648912edd5844bd79 Signed-off-by: Alexandru M Stan <amstan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1693862 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
This commit is contained in:
parent
7353ca1063
commit
460cc37c5b
|
@ -10,7 +10,9 @@ CORE:=host
|
|||
|
||||
chip-y=system.o gpio.o uart.o persistence.o flash.o lpc.o reboot.o i2c.o \
|
||||
clock.o spi_master.o trng.o
|
||||
ifndef CONFIG_KEYBOARD_NOT_RAW
|
||||
chip-$(HAS_TASK_KEYSCAN)+=keyboard_raw.o
|
||||
endif
|
||||
chip-$(CONFIG_USB_PD_TCPC)+=usb_pd_phy.o
|
||||
|
||||
ifeq ($(CONFIG_DCRYPTO),y)
|
||||
|
|
|
@ -31,6 +31,8 @@ chip-$(CONFIG_HOSTCMD_X86)+=lpc.o ec2i.o
|
|||
chip-$(CONFIG_HOSTCMD_ESPI)+=espi.o
|
||||
chip-$(CONFIG_SPI_MASTER)+=spi_master.o
|
||||
chip-$(CONFIG_PECI)+=peci.o
|
||||
ifndef CONFIG_KEYBOARD_NOT_RAW
|
||||
chip-$(HAS_TASK_KEYSCAN)+=keyboard_raw.o
|
||||
endif
|
||||
chip-$(CONFIG_I2C_MASTER)+=i2c.o
|
||||
chip-$(CONFIG_I2C_SLAVE)+=i2c_slave.o
|
||||
|
|
|
@ -26,4 +26,6 @@ chip-$(CONFIG_PECI)+=peci.o
|
|||
chip-$(CONFIG_PWM)+=pwm.o fan.o
|
||||
chip-$(CONFIG_SPI)+=spi.o
|
||||
chip-$(CONFIG_WATCHDOG)+=watchdog.o
|
||||
ifndef CONFIG_KEYBOARD_NOT_RAW
|
||||
chip-$(HAS_TASK_KEYSCAN)+=keyboard_raw.o
|
||||
endif
|
||||
|
|
|
@ -43,7 +43,9 @@ chip-$(CONFIG_PWM)+=pwm.o
|
|||
chip-$(CONFIG_SPI)+=spi.o qmspi.o
|
||||
chip-$(CONFIG_TFDP)+=tfdp.o
|
||||
chip-$(CONFIG_WATCHDOG)+=watchdog.o
|
||||
ifndef CONFIG_KEYBOARD_NOT_RAW
|
||||
chip-$(HAS_TASK_KEYSCAN)+=keyboard_raw.o
|
||||
endif
|
||||
|
||||
# location of the scripts and keys used to pack the SPI flash image
|
||||
SCRIPTDIR:=./chip/${CHIP}/util
|
||||
|
|
|
@ -25,7 +25,9 @@ chip-$(CONFIG_I2C)+=i2c.o
|
|||
chip-$(CONFIG_HOSTCMD_LPC)+=lpc.o
|
||||
chip-$(CONFIG_PWM)+=pwm.o
|
||||
chip-$(CONFIG_WATCHDOG)+=watchdog.o
|
||||
ifndef CONFIG_KEYBOARD_NOT_RAW
|
||||
chip-$(HAS_TASK_KEYSCAN)+=keyboard_raw.o
|
||||
endif
|
||||
chip-$(CONFIG_DMA)+=dma.o
|
||||
chip-$(CONFIG_SPI)+=spi.o
|
||||
|
||||
|
|
|
@ -35,7 +35,9 @@ chip-$(CONFIG_CEC)+=cec.o
|
|||
chip-$(CONFIG_PWM)+=pwm.o
|
||||
chip-$(CONFIG_SPI)+=spi.o
|
||||
chip-$(CONFIG_WATCHDOG)+=watchdog.o
|
||||
ifndef CONFIG_KEYBOARD_NOT_RAW
|
||||
chip-$(HAS_TASK_KEYSCAN)+=keyboard_raw.o
|
||||
endif
|
||||
chip-$(CONFIG_WAKE_ON_VOICE)+=apm.o
|
||||
chip-$(CONFIG_WAKE_ON_VOICE)+=wov.o
|
||||
|
||||
|
|
|
@ -21,4 +21,6 @@ chip-$(CONFIG_BLUETOOTH_LE)+=radio.o bluetooth_le.o
|
|||
chip-$(CONFIG_BLUETOOTH_LE_RADIO_TEST)+=radio_test.o
|
||||
chip-$(CONFIG_COMMON_TIMER)+=hwtimer.o clock.o
|
||||
chip-$(CONFIG_I2C)+=i2c.o
|
||||
ifndef CONFIG_KEYBOARD_NOT_RAW
|
||||
chip-$(HAS_TASK_KEYSCAN)+=keyboard_raw.o
|
||||
endif
|
||||
|
|
|
@ -55,7 +55,9 @@ chip-$(CONFIG_STREAM_USART)+=usart_rx_dma.o usart_tx_dma.o
|
|||
chip-$(CONFIG_CMD_USART_INFO)+=usart_info_command.o
|
||||
chip-$(CONFIG_WATCHDOG)+=watchdog.o
|
||||
chip-$(HAS_TASK_CONSOLE)+=uart.o
|
||||
ifndef CONFIG_KEYBOARD_NOT_RAW
|
||||
chip-$(HAS_TASK_KEYSCAN)+=keyboard_raw.o
|
||||
endif
|
||||
chip-$(HAS_TASK_POWERLED)+=power_led.o
|
||||
chip-$(CONFIG_FLASH_PHYSICAL)+=flash-$(CHIP_FAMILY).o
|
||||
ifdef CONFIG_FLASH_PHYSICAL
|
||||
|
|
|
@ -2416,6 +2416,13 @@
|
|||
/* Enable extra debugging output from keyboard modules */
|
||||
#undef CONFIG_KEYBOARD_DEBUG
|
||||
|
||||
/*
|
||||
* Disables the directly connected keyboard pins and drivers on a particular
|
||||
* chip. You might want this enabled if the keyboard is indirectly connected
|
||||
* to the EC, perhaps through an I2C controller.
|
||||
*/
|
||||
#undef CONFIG_KEYBOARD_NOT_RAW
|
||||
|
||||
/* The board uses a negative edge-triggered GPIO for keyboard interrupts. */
|
||||
#undef CONFIG_KEYBOARD_IRQ_GPIO
|
||||
|
||||
|
@ -2507,6 +2514,7 @@
|
|||
* Enable keypad (a palm-sized keyboard section usually placed on the far right)
|
||||
*/
|
||||
#undef CONFIG_KEYBOARD_KEYPAD
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/* Support common LED interface */
|
||||
|
|
Loading…
Reference in New Issue