diff options
author | Tom Rini <trini@konsulko.com> | 2021-01-31 08:49:53 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-31 08:49:53 -0500 |
commit | 242ef48ea76ae13ac6357cc50aae01eb7a46bfef (patch) | |
tree | 18105866b6063eddcc7ddb0530c002fadc377b3b /drivers/misc/cros_ec_lpc.c | |
parent | 76404f86a24aa28efc26a296bf6ab9d697c60b9f (diff) | |
parent | f84eda89e5970ef513fe64ba8e8d977788c44dca (diff) |
Merge tag 'dm-pull-30jan21' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
tpm fixes for coral
binman fixes support for symbols in sub-sections
support for additional cros_ec commands
various minor fixes / tweaks
Diffstat (limited to 'drivers/misc/cros_ec_lpc.c')
-rw-r--r-- | drivers/misc/cros_ec_lpc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/misc/cros_ec_lpc.c b/drivers/misc/cros_ec_lpc.c index e0002b9753..f40375978d 100644 --- a/drivers/misc/cros_ec_lpc.c +++ b/drivers/misc/cros_ec_lpc.c @@ -207,6 +207,12 @@ int cros_ec_lpc_init(struct cros_ec_dev *dev, const void *blob) return 0; } +/* Return the byte of EC switch states */ +static int cros_ec_lpc_get_switches(struct udevice *dev) +{ + return inb(EC_LPC_ADDR_MEMMAP + EC_MEMMAP_SWITCHES); +} + /* * Test if LPC command args are supported. * @@ -239,6 +245,7 @@ static struct dm_cros_ec_ops cros_ec_ops = { .packet = cros_ec_lpc_packet, .command = cros_ec_lpc_command, .check_version = cros_ec_lpc_check_version, + .get_switches = cros_ec_lpc_get_switches, }; static const struct udevice_id cros_ec_ids[] = { |