UPSTREAM: spl: input: Allow input in SPL and TPL
In some cases it is necessary to read the keyboard in early phases of U-Boot. Update the config to allow this. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com> Change-Id: I0f166e55c84c9f10ced9e4580e6b7c7a6f980a79
This commit is contained in:
parent
909b972800
commit
f4462f85e6
|
|
@ -1,3 +1,16 @@
|
|||
config INPUT
|
||||
bool "Enable input subsystem"
|
||||
depends on DM
|
||||
default y
|
||||
|
||||
config SPL_INPUT
|
||||
bool "Enable input subsystem for SPL"
|
||||
depends on SPL_DM
|
||||
|
||||
config TPL_INPUT
|
||||
bool "Enable input subsystem for TPL"
|
||||
depends on TPL_DM
|
||||
|
||||
config DM_KEYBOARD
|
||||
bool "Enable driver model keyboard support"
|
||||
depends on DM
|
||||
|
|
@ -27,8 +40,43 @@ config RK_IR
|
|||
help
|
||||
This adds a driver for the rockchip IR controller.
|
||||
|
||||
config SPL_DM_KEYBOARD
|
||||
bool "Enable driver model keyboard support"
|
||||
depends on SPL_DM
|
||||
help
|
||||
This adds a uclass for keyboards and implements keyboard support
|
||||
using driver model. The API is implemented by keyboard.h and
|
||||
includes methods to start/stop the device, check for available
|
||||
input and update LEDs if the keyboard has them.
|
||||
|
||||
config TPL_DM_KEYBOARD
|
||||
bool "Enable driver model keyboard support"
|
||||
depends on TPL_DM
|
||||
help
|
||||
This adds a uclass for keyboards and implements keyboard support
|
||||
using driver model. The API is implemented by keyboard.h and
|
||||
includes methods to start/stop the device, check for available
|
||||
input and update LEDs if the keyboard has them.
|
||||
|
||||
config CROS_EC_KEYB
|
||||
bool "Enable Chrome OS EC keyboard support"
|
||||
depends on INPUT
|
||||
help
|
||||
Most ARM Chromebooks use an EC to provide access to the keyboard.
|
||||
Messages are used to request key scans from the EC and these are
|
||||
then decoded into keys by this driver.
|
||||
|
||||
config SPL_CROS_EC_KEYB
|
||||
bool "Enable Chrome OS EC keyboard support in SPL"
|
||||
depends on SPL_INPUT
|
||||
help
|
||||
Most ARM Chromebooks use an EC to provide access to the keyboard.
|
||||
Messages are used to request key scans from the EC and these are
|
||||
then decoded into keys by this driver.
|
||||
|
||||
config TPL_CROS_EC_KEYB
|
||||
bool "Enable Chrome OS EC keyboard support in TPL"
|
||||
depends on TPL_INPUT
|
||||
help
|
||||
Most ARM Chromebooks use an EC to provide access to the keyboard.
|
||||
Messages are used to request key scans from the EC and these are
|
||||
|
|
|
|||
|
|
@ -5,23 +5,28 @@
|
|||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
obj-$(CONFIG_DM_KEYBOARD) += keyboard-uclass.o
|
||||
obj-$(CONFIG_DM_KEY) += key-uclass.o
|
||||
obj-$(CONFIG_DM_RC) += rc-uclass.o
|
||||
obj-$(CONFIG_RK_IR) += rockchip_ir.o
|
||||
|
||||
obj-y += input.o
|
||||
obj-$(CONFIG_$(SPL_TPL_)CROS_EC_KEYB) += cros_ec_keyb.o
|
||||
obj-$(CONFIG_$(SPL_TPL_)OF_CONTROL) += key_matrix.o
|
||||
obj-$(CONFIG_$(SPL_TPL_)DM_KEYBOARD) += keyboard-uclass.o
|
||||
obj-$(CONFIG_RK8XX_PWRKEY) += rk8xx_pwrkey.o
|
||||
|
||||
ifndef CONFIG_SPL_BUILD
|
||||
obj-$(CONFIG_I8042_KEYB) += i8042.o
|
||||
obj-$(CONFIG_TEGRA_KEYBOARD) += tegra-kbc.o
|
||||
obj-$(CONFIG_TWL4030_INPUT) += twl4030.o
|
||||
obj-$(CONFIG_TWL6030_INPUT) += twl6030.o
|
||||
obj-$(CONFIG_CROS_EC_KEYB) += cros_ec_keyb.o
|
||||
obj-$(CONFIG_RK8XX_PWRKEY) += rk8xx_pwrkey.o
|
||||
ifdef CONFIG_PS2KBD
|
||||
obj-y += keyboard.o pc_keyb.o
|
||||
obj-$(CONFIG_PS2MULT) += ps2mult.o ps2ser.o
|
||||
endif
|
||||
obj-y += input.o
|
||||
obj-$(CONFIG_$(SPL_)OF_CONTROL) += key_matrix.o
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_ADC_KEY) += adc_key.o
|
||||
obj-$(CONFIG_GPIO_KEY) += gpio_key.o
|
||||
obj-$(CONFIG_RK_KEY) += rk_key.o
|
||||
|
|
|
|||
|
|
@ -650,7 +650,7 @@ int input_stdio_register(struct stdio_dev *dev)
|
|||
int error;
|
||||
|
||||
error = stdio_register(dev);
|
||||
|
||||
#if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(ENV_SUPPORT)
|
||||
/* check if this is the standard input device */
|
||||
if (!error && strcmp(env_get("stdin"), dev->name) == 0) {
|
||||
/* reassign the console */
|
||||
|
|
@ -658,6 +658,9 @@ int input_stdio_register(struct stdio_dev *dev)
|
|||
console_assign(stdin, dev->name))
|
||||
return -1;
|
||||
}
|
||||
#else
|
||||
error = error;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue