diff options
Diffstat (limited to 'drivers/platform/chrome/wilco_ec/debugfs.c')
-rw-r--r-- | drivers/platform/chrome/wilco_ec/debugfs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/platform/chrome/wilco_ec/debugfs.c b/drivers/platform/chrome/wilco_ec/debugfs.c index df5a5f6c3ec6..a812788a0bdc 100644 --- a/drivers/platform/chrome/wilco_ec/debugfs.c +++ b/drivers/platform/chrome/wilco_ec/debugfs.c @@ -208,7 +208,12 @@ static int send_ec_cmd(struct wilco_ec_device *ec, u8 sub_cmd, u8 *out_val) */ static int h1_gpio_get(void *arg, u64 *val) { - return send_ec_cmd(arg, SUB_CMD_H1_GPIO, (u8 *)val); + int ret; + + ret = send_ec_cmd(arg, SUB_CMD_H1_GPIO, (u8 *)val); + if (ret == 0) + *val &= 0xFF; + return ret; } DEFINE_DEBUGFS_ATTRIBUTE(fops_h1_gpio, h1_gpio_get, NULL, "0x%02llx\n"); |