summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/svc.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2016-03-29 18:56:08 -0400
committerGreg Kroah-Hartman <gregkh@google.com>2016-03-30 14:23:19 -0700
commit153ff7e76ddb2fd5ab3d790c0139154dfd5464f1 (patch)
tree222fe2929cb69033ca747c02b2496e21775071ef /drivers/staging/greybus/svc.c
parentaf1471e7a903c18e98adf49fc9e2e444915b48c8 (diff)
downloadop-kernel-dev-153ff7e76ddb2fd5ab3d790c0139154dfd5464f1.zip
op-kernel-dev-153ff7e76ddb2fd5ab3d790c0139154dfd5464f1.tar.gz
greybus: interface: read DME attributes at activation
Read the DDBL1 and Ara DME attributes when activating an interface. These values are currently provided by the SVC in the intf_hotplug request, which is about to go away. Note that there are currently no standard Ara VID and PID attributes and that Toshiba uses attributes from the reserved space in ES3. For now, we therefore refuse to enumerate any non-Toshiba bridges. Also note that the Ara serial number is currently not supported. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/svc.c')
-rw-r--r--drivers/staging/greybus/svc.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c
index 96d3d55..0659815 100644
--- a/drivers/staging/greybus/svc.c
+++ b/drivers/staging/greybus/svc.c
@@ -460,11 +460,12 @@ static void gb_svc_process_intf_hotplug(struct gb_operation *operation)
return;
}
- intf->ddbl1_manufacturer_id = le32_to_cpu(request->data.ddbl1_mfr_id);
- intf->ddbl1_product_id = le32_to_cpu(request->data.ddbl1_prod_id);
- intf->vendor_id = le32_to_cpu(request->data.ara_vend_id);
- intf->product_id = le32_to_cpu(request->data.ara_prod_id);
- intf->serial_number = le64_to_cpu(request->data.serial_number);
+ ret = gb_interface_activate(intf);
+ if (ret) {
+ dev_err(&svc->dev, "failed to activate interface %u: %d\n",
+ intf_id, ret);
+ goto err_interface_add;
+ }
/*
* Use VID/PID specified at hotplug if:
@@ -480,13 +481,6 @@ static void gb_svc_process_intf_hotplug(struct gb_operation *operation)
intf->product_id = product_id;
}
- ret = gb_interface_activate(intf);
- if (ret) {
- dev_err(&svc->dev, "failed to activate interface %u: %d\n",
- intf_id, ret);
- goto err_interface_add;
- }
-
ret = gb_interface_enable(intf);
if (ret) {
dev_err(&svc->dev, "failed to enable interface %u: %d\n",
OpenPOWER on IntegriCloud