X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=drivers%2Fplatform%2Fchromeos_ec-fw.c;h=40d9466af129318bb7fc16ff0263e2f4bc53851c;hb=e9107524455b67625c764df44005753c3a9c6360;hp=cf77199b45bc3085db9ca6eb93c64c5844ef8159;hpb=206c34f60039c034590ad21ae98c2e7afcf99a66;p=cascardo%2Flinux.git diff --git a/drivers/platform/chromeos_ec-fw.c b/drivers/platform/chromeos_ec-fw.c index cf77199b45bc..40d9466af129 100644 --- a/drivers/platform/chromeos_ec-fw.c +++ b/drivers/platform/chromeos_ec-fw.c @@ -75,9 +75,21 @@ static ssize_t ec_chip_info_show(struct device *dev, info.vendor, info.name, info.revision); } +static ssize_t ec_dev_usb_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + err = chromeos_set_dev_usb(); + if (err) + return err; + return count; +} + static DEVICE_ATTR(fw_version, S_IRUGO, ec_fw_version_show, NULL); static DEVICE_ATTR(build_info, S_IRUGO, ec_build_info_show, NULL); static DEVICE_ATTR(chip_info, S_IRUGO, ec_chip_info_show, NULL); +static DEVICE_ATTR(dev_usb, S_IWUGO, NULL, ec_dev_usb_store); static struct attribute *ec_fw_attrs[] = { &dev_attr_fw_version.attr,