u-boot/drivers/misc
Alper Nebi Yasak 87d07ccc23 sandbox: cros_ec: Basic support for EC_CMD_GET_NEXT_EVENT
Since commit 6900797678 ("cros_ec: Support keyboard scanning with
EC_CMD_GET_NEXT_EVENT") the cros-ec-keyb driver has started using this
command, but the sandbox EC emulator does not recognize it and
continuously prints:

    ** Unknown EC command 0x67

This patch makes the sandbox driver send basic responses to the command,
but the response only supports keyboard scans for now.

The EC side of this command stores and returns events from a queue, and
returns -EC_RES_UNAVAILABLE when there are no new events. This should be
possible to implement by hooking into the SDL event queue (perhaps via
sandbox_sdl_poll_events). Implementing that is a bit harder to do since
the existing sandbox code is discarding pending keyboard events, then
reading the current keyboard state.

Since the EC emulator never explicitly fails to work on this command,
the fallback to the older command will not trigger and will not be
tested anymore.

Fixes: 6900797678 ("cros_ec: Support keyboard scanning with EC_CMD_GET_NEXT_EVENT")
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-30 13:14:43 -07:00
..
imx8 treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
ali512x.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
altera_sysid.c treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
atsha204a-i2c.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
cbmem_console.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cros_ec.c cros_ec: Correct collection of EC hash 2020-11-14 15:23:41 -07:00
cros_ec_i2c.c cros_ec: Fix up driver names to avoid dtoc warnings 2020-11-05 14:58:45 +08:00
cros_ec_lpc.c cros_ec: Increase command timeout for flash erase 2020-11-14 15:23:41 -07:00
cros_ec_sandbox.c sandbox: cros_ec: Basic support for EC_CMD_GET_NEXT_EVENT 2020-11-30 13:14:43 -07:00
cros_ec_spi.c cros_ec: Fix up driver names to avoid dtoc warnings 2020-11-05 14:58:45 +08:00
ds4510.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ds4510.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
esm_pmic.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
fs_loader.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
fsl_devdis.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fsl_ifc.c common: Drop part.h from common header 2020-05-18 17:33:33 -04:00
fsl_iim.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
fsl_portals.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
fsl_sec_mon.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
gdsys_ioep.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
gdsys_ioep.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
gdsys_rxaui_ctrl.c gdsys_rxaui_ctrl: Use new regmap interface 2019-05-21 07:52:34 +02:00
gdsys_soc.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
gdsys_soc.h misc: Add gdsys_soc driver 2018-11-14 09:16:27 -08:00
gpio_led.c status_led: Kconfig migration 2017-01-21 15:12:33 -05:00
i2c_eeprom.c i2c: eeprom: Use reg property instead of offset and size 2020-08-20 09:49:20 +02:00
i2c_eeprom_emul.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ihs_fpga.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
ihs_fpga.h misc: Add IHS FPGA driver 2018-11-14 09:16:27 -08:00
irq-uclass.c dm: Use driver_info index instead of pointer 2020-10-29 14:42:18 -06:00
irq_sandbox.c irq: Add a method to convert an interrupt to ACPI 2020-07-17 14:32:24 +08:00
jz4780_efuse.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
k3_avs.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
k3_esm.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
Kconfig xilinx: common: Move ZYNQ_GEM_I2C_MAC_OFFSET to board Kconfig 2020-10-27 08:13:32 +01:00
Makefile misc: add driver for the SiFive otp controller 2020-06-04 09:44:08 +08:00
mc9sdz60.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
microchip_flexcom.c treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
misc-uclass.c misc: Allow child devices 2019-02-09 12:50:22 -07:00
misc_sandbox.c misc: Update read() and write() methods to return bytes xfered 2018-11-20 19:14:22 -07:00
mpc83xx_serdes.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
mpc83xx_serdes.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mxc_ocotp.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
mxs_ocotp.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
nuvoton_nct6102d.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
p2sb-uclass.c x86: apl: Take advantage of the of-platdata parent support 2020-10-29 14:42:18 -06:00
p2sb_emul.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
p2sb_sandbox.c sandbox: Add PCI driver and test for p2sb 2019-12-15 11:44:11 +08:00
pca9551_led.c common: Drop global inclusion of status_led.h 2019-12-02 18:23:06 -05:00
pwrseq-uclass.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
qfw.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
rockchip-efuse.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
rockchip-otp.c misc: add driver for the Rockchip otp controller 2019-11-17 17:23:15 +08:00
sandbox_adder.c sandbox: Add PCI driver and test for p2sb 2019-12-15 11:44:11 +08:00
sifive-otp.c misc: add driver for the SiFive otp controller 2020-06-04 09:44:08 +08:00
smsc_lpc47m.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
smsc_sio1007.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spltest_sandbox.c dm: test: Drop of-platdata pytest 2020-10-29 14:42:18 -06:00
status_led.c status_led: Tidy up the code style 2019-12-02 18:23:06 -05:00
stm32_rcc.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
stm32mp_fuse.c pmu: stpmic1: change specific NVM api to MISC 2019-08-27 11:19:23 +02:00
swap_case.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
syscon_sandbox.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tegra186_bpmp.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
tegra_car.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
twl4030_led.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
vexpress_config.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
winbond_w83627.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00