diff options
| author | Tom Rini <[email protected]> | 2020-12-02 11:36:51 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2020-12-02 11:36:51 -0500 |
| commit | ab31883ae7e54ded8396b13a9057f861bf916ea4 (patch) | |
| tree | 8c6abd7cbd137a545d48343440563c3dff7c0a61 /drivers | |
| parent | 80cbd731df50b9ab646940ea862b70bcaff37225 (diff) | |
| parent | a9e73d287bfd6bfc778c532128a20767ee305193 (diff) | |
Merge tag 'dm-pull-30nov20' of git://git.denx.de/u-boot-dm
Minor bugfixes
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/core/device-remove.c | 2 | ||||
| -rw-r--r-- | drivers/misc/cros_ec_sandbox.c | 18 |
2 files changed, 9 insertions, 11 deletions
diff --git a/drivers/core/device-remove.c b/drivers/core/device-remove.c index efdb0f29058..0924a575f53 100644 --- a/drivers/core/device-remove.c +++ b/drivers/core/device-remove.c @@ -152,7 +152,7 @@ void device_free(struct udevice *dev) static bool flags_remove(uint flags, uint drv_flags) { if ((flags & DM_REMOVE_NORMAL) || - (flags & (drv_flags & (DM_FLAG_ACTIVE_DMA | DM_FLAG_OS_PREPARE)))) + (flags && (drv_flags & (DM_FLAG_ACTIVE_DMA | DM_FLAG_OS_PREPARE)))) return true; return false; diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c index ff7f782742a..d72db3eace9 100644 --- a/drivers/misc/cros_ec_sandbox.c +++ b/drivers/misc/cros_ec_sandbox.c @@ -460,16 +460,14 @@ static int process_cmd(struct ec_state *ec, case EC_CMD_ENTERING_MODE: len = 0; break; - case EC_CMD_GET_NEXT_EVENT: - /* - * TODO: - * This driver emulates an old keyboard device supporting - * EC_CMD_MKBP_STATE. Current Chrome OS keyboards use - * EC_CMD_GET_NEXT_EVENT. Cf. - * "mkbp: Add support for buttons and switches" - * https://chromium.googlesource.com/chromiumos/platform/ec/+/87a071941b89e3f7fd3eb329b682e60b3fbd6c73 - */ - return -EC_RES_INVALID_COMMAND; + case EC_CMD_GET_NEXT_EVENT: { + struct ec_response_get_next_event *resp = resp_data; + + resp->event_type = EC_MKBP_EVENT_KEY_MATRIX; + cros_ec_keyscan(ec, resp->data.key_matrix); + len = sizeof(*resp); + break; + } default: printf(" ** Unknown EC command %#02x\n", req_hdr->command); return -1; |
