diff options
author | Thierry Reding <thierry.reding@gmail.com> | 2016-07-25 10:38:54 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2016-07-25 10:38:54 +0200 |
commit | 38593426ecc7e0e22873dcd7b5d471eb869a0b6e (patch) | |
tree | bb676c71f3ddeefd5d906c22ee68e3f90c170cde /drivers | |
parent | pwm: atmel: Use of_device_get_match_data() (diff) | |
parent | mfd: cros_ec: Add EC_PWM function definitions (diff) | |
download | linux-38593426ecc7e0e22873dcd7b5d471eb869a0b6e.tar.xz linux-38593426ecc7e0e22873dcd7b5d471eb869a0b6e.zip |
Merge branch 'for-4.8/mfd' into for-4.8/drivers
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/platform/chrome/cros_ec_proto.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c index b6e161f71b26..6c084b266651 100644 --- a/drivers/platform/chrome/cros_ec_proto.c +++ b/drivers/platform/chrome/cros_ec_proto.c @@ -380,3 +380,20 @@ int cros_ec_cmd_xfer(struct cros_ec_device *ec_dev, return ret; } EXPORT_SYMBOL(cros_ec_cmd_xfer); + +int cros_ec_cmd_xfer_status(struct cros_ec_device *ec_dev, + struct cros_ec_command *msg) +{ + int ret; + + ret = cros_ec_cmd_xfer(ec_dev, msg); + if (ret < 0) { + dev_err(ec_dev->dev, "Command xfer error (err:%d)\n", ret); + } else if (msg->result != EC_RES_SUCCESS) { + dev_dbg(ec_dev->dev, "Command result (err: %d)\n", msg->result); + return -EPROTO; + } + + return ret; +} +EXPORT_SYMBOL(cros_ec_cmd_xfer_status); |