summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/svc.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2016-03-29 18:56:10 -0400
committerGreg Kroah-Hartman <gregkh@google.com>2016-03-30 14:23:19 -0700
commitac72cfbe6937f00c1fb334001c89ea26254ef430 (patch)
tree32f94f4a85ad13a04f8be87547b515fa1bc09381 /drivers/staging/greybus/svc.c
parent7d7acc06a0febf9f08649df52aa267b8f74b0de9 (diff)
downloadop-kernel-dev-ac72cfbe6937f00c1fb334001c89ea26254ef430.zip
op-kernel-dev-ac72cfbe6937f00c1fb334001c89ea26254ef430.tar.gz
greybus: interface: clean up ES2 VID/PID hack
Clean up the ES2 VID/PID hack using a new quirk flag. Note that the hack is now used if and only if the interface is a Toshiba ES2 bridge (and not if the attributes read zero). 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.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c
index 0659815..a19e575 100644
--- a/drivers/staging/greybus/svc.c
+++ b/drivers/staging/greybus/svc.c
@@ -426,11 +426,7 @@ static void gb_svc_process_intf_hotplug(struct gb_operation *operation)
intf = gb_interface_find(hd, intf_id);
if (intf) {
- /*
- * For ES2, we need to maintain the same vendor/product ids we
- * got from bootrom, otherwise userspace can't distinguish
- * between modules.
- */
+ /* HACK: Save Ara VID/PID for ES2 hack below */
vendor_id = intf->vendor_id;
product_id = intf->product_id;
@@ -468,15 +464,11 @@ static void gb_svc_process_intf_hotplug(struct gb_operation *operation)
}
/*
- * Use VID/PID specified at hotplug if:
- * - Bridge ASIC chip isn't ES2
- * - Received non-zero Vendor/Product ids
+ * HACK: Use Ara VID/PID from earlier boot stage.
*
- * Otherwise, use the ids we received from bootrom.
+ * FIXME: remove quirk with ES2 support
*/
- if (intf->ddbl1_manufacturer_id == ES2_DDBL1_MFR_ID &&
- intf->ddbl1_product_id == ES2_DDBL1_PROD_ID &&
- intf->vendor_id == 0 && intf->product_id == 0) {
+ if (intf->quirks & GB_INTERFACE_QUIRK_NO_ARA_IDS) {
intf->vendor_id = vendor_id;
intf->product_id = product_id;
}
OpenPOWER on IntegriCloud