diff options
Diffstat (limited to 'drivers/misc/cros_ec.c')
-rw-r--r-- | drivers/misc/cros_ec.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c index fd2f2abd7e..0bc28e882c 100644 --- a/drivers/misc/cros_ec.c +++ b/drivers/misc/cros_ec.c @@ -1557,6 +1557,22 @@ int cros_ec_set_lid_shutdown_mask(struct udevice *dev, int enable) return 0; } +int cros_ec_get_switches(struct udevice *dev) +{ + struct dm_cros_ec_ops *ops; + int ret; + + ops = dm_cros_ec_get_ops(dev); + if (!ops->get_switches) + return -ENOSYS; + + ret = ops->get_switches(dev); + if (ret < 0) + return log_msg_ret("get", ret); + + return ret; +} + UCLASS_DRIVER(cros_ec) = { .id = UCLASS_CROS_EC, .name = "cros-ec", |