aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Nazarewicz <mina86@mina86.com>2012-11-06 16:52:40 -0500
committerFelipe Balbi <balbi@ti.com>2012-11-08 09:04:34 -0500
commitbe44f1c80b998b00cfa1759f4ba88f6497810963 (patch)
tree13636335821fca72cdfbe77c918a9027524ae571
parentfea20dbcfd6673d73d510984589897bd921c8a1d (diff)
usb: gadget: Remove reference to is_dualspeed from sysfs.
This commit removes the /sys/devices/platform/<UDC>/udc/<UDC>/is_dualspeed file and is_dualspeeed line from /sys/devices/platform/ci13xxx_*/udc/device file. The is_dualspeed file is superseded by maximum_speed in the same directory and is_dualspeed line in device file is superseded by max_speed line in the same file. The maximum_speed/max_speed specifies maximum speed supported by UDC. To check if dualspeeed is supported, check if the value is >= 3. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--drivers/usb/chipidea/debug.c3
-rw-r--r--drivers/usb/gadget/udc-core.c11
2 files changed, 0 insertions, 14 deletions
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c
index c6f50a257565..3bc244d2636a 100644
--- a/drivers/usb/chipidea/debug.c
+++ b/drivers/usb/chipidea/debug.c
@@ -160,9 +160,6 @@ static ssize_t show_device(struct device *dev, struct device_attribute *attr,
160 gadget->speed); 160 gadget->speed);
161 n += scnprintf(buf + n, PAGE_SIZE - n, "max_speed = %d\n", 161 n += scnprintf(buf + n, PAGE_SIZE - n, "max_speed = %d\n",
162 gadget->max_speed); 162 gadget->max_speed);
163 /* TODO: Scheduled for removal in 3.8. */
164 n += scnprintf(buf + n, PAGE_SIZE - n, "is_dualspeed = %d\n",
165 gadget_is_dualspeed(gadget));
166 n += scnprintf(buf + n, PAGE_SIZE - n, "is_otg = %d\n", 163 n += scnprintf(buf + n, PAGE_SIZE - n, "is_otg = %d\n",
167 gadget->is_otg); 164 gadget->is_otg);
168 n += scnprintf(buf + n, PAGE_SIZE - n, "is_a_peripheral = %d\n", 165 n += scnprintf(buf + n, PAGE_SIZE - n, "is_a_peripheral = %d\n",
diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c
index f3cd9690b101..4d90a800063c 100644
--- a/drivers/usb/gadget/udc-core.c
+++ b/drivers/usb/gadget/udc-core.c
@@ -439,16 +439,6 @@ static DEVICE_ATTR(name, S_IRUSR, usb_udc_##param##_show, NULL)
439static USB_UDC_SPEED_ATTR(current_speed, speed); 439static USB_UDC_SPEED_ATTR(current_speed, speed);
440static USB_UDC_SPEED_ATTR(maximum_speed, max_speed); 440static USB_UDC_SPEED_ATTR(maximum_speed, max_speed);
441 441
442/* TODO: Scheduled for removal in 3.8. */
443static ssize_t usb_udc_is_dualspeed_show(struct device *dev,
444 struct device_attribute *attr, char *buf)
445{
446 struct usb_udc *udc = container_of(dev, struct usb_udc, dev);
447 return snprintf(buf, PAGE_SIZE, "%d\n",
448 gadget_is_dualspeed(udc->gadget));
449}
450static DEVICE_ATTR(is_dualspeed, S_IRUSR, usb_udc_is_dualspeed_show, NULL);
451
452#define USB_UDC_ATTR(name) \ 442#define USB_UDC_ATTR(name) \
453ssize_t usb_udc_##name##_show(struct device *dev, \ 443ssize_t usb_udc_##name##_show(struct device *dev, \
454 struct device_attribute *attr, char *buf) \ 444 struct device_attribute *attr, char *buf) \
@@ -472,7 +462,6 @@ static struct attribute *usb_udc_attrs[] = {
472 &dev_attr_current_speed.attr, 462 &dev_attr_current_speed.attr,
473 &dev_attr_maximum_speed.attr, 463 &dev_attr_maximum_speed.attr,
474 464
475 &dev_attr_is_dualspeed.attr,
476 &dev_attr_is_otg.attr, 465 &dev_attr_is_otg.attr,
477 &dev_attr_is_a_peripheral.attr, 466 &dev_attr_is_a_peripheral.attr,
478 &dev_attr_b_hnp_enable.attr, 467 &dev_attr_b_hnp_enable.attr,