diff options
author | Sebastian Reichel <sre@kernel.org> | 2018-04-26 12:18:30 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2018-04-26 12:18:30 +0200 |
commit | 1f140ff467081212562327da6561edb6b3b3ed10 (patch) | |
tree | da65d766f3501c3366bd12c2856b15af28fd60e9 /drivers/usb/core/sysfs.c | |
parent | a78c0c30ec73e90d1b5d8b06f593091d9b9f76d3 (diff) | |
parent | 0c718676ab3f02e98e85e7049e03d2879c62cb10 (diff) | |
download | linux-1f140ff467081212562327da6561edb6b3b3ed10.tar.bz2 |
Merge tag 'tags/tcpm-pps-4.18' into psy-next
Tag/Merge point for adding typeC power supply support
This is a signed tag/merge point to handle the cross-tree merge of the
USB and power supply subsystems for the patch series:
Subject: [PATCH v8 0/6] typec: tcpm: Add sink side support for PPS
It is based on the usb.git tree, in the usb-next branch, for merging in
4.18-rc1.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Diffstat (limited to 'drivers/usb/core/sysfs.c')
-rw-r--r-- | drivers/usb/core/sysfs.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index 27bb34043053..ea18284dfa9a 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c @@ -175,6 +175,26 @@ static ssize_t speed_show(struct device *dev, struct device_attribute *attr, } static DEVICE_ATTR_RO(speed); +static ssize_t rx_lanes_show(struct device *dev, struct device_attribute *attr, + char *buf) +{ + struct usb_device *udev; + + udev = to_usb_device(dev); + return sprintf(buf, "%d\n", udev->rx_lanes); +} +static DEVICE_ATTR_RO(rx_lanes); + +static ssize_t tx_lanes_show(struct device *dev, struct device_attribute *attr, + char *buf) +{ + struct usb_device *udev; + + udev = to_usb_device(dev); + return sprintf(buf, "%d\n", udev->tx_lanes); +} +static DEVICE_ATTR_RO(tx_lanes); + static ssize_t busnum_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -790,6 +810,8 @@ static struct attribute *dev_attrs[] = { &dev_attr_bNumConfigurations.attr, &dev_attr_bMaxPacketSize0.attr, &dev_attr_speed.attr, + &dev_attr_rx_lanes.attr, + &dev_attr_tx_lanes.attr, &dev_attr_busnum.attr, &dev_attr_devnum.attr, &dev_attr_devpath.attr, |