Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8aa01352 authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman
Browse files

greybus: es1/2: Lets start using svc protocol



All bits and pieces are in place now. Lets start using svc protocol
instead of stuff present in ap.c.

Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Tested-by: default avatarPerry Hung <perry@leaflabs.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 77c461fa
Loading
Loading
Loading
Loading
+4 −11
Original line number Original line Diff line number Diff line
@@ -615,8 +615,6 @@ static int ap_probe(struct usb_interface *interface,
	bool bulk_out_found = false;
	bool bulk_out_found = false;
	int retval = -ENOMEM;
	int retval = -ENOMEM;
	int i;
	int i;
	u16 endo_id = 0x4755;	// FIXME - get endo "ID" from the SVC
	u8 ap_intf_id = 0x01;	// FIXME - get endo "ID" from the SVC
	u8 svc_interval = 0;
	u8 svc_interval = 0;


	/* We need to fit a CPort ID in one byte of a message header */
	/* We need to fit a CPort ID in one byte of a message header */
@@ -718,16 +716,11 @@ static int ap_probe(struct usb_interface *interface,
		es1->cport_out_urb_busy[i] = false;	/* just to be anal */
		es1->cport_out_urb_busy[i] = false;	/* just to be anal */
	}
	}


	/*
	/* Initialize AP's greybus interface */
	 * XXX Soon this will be initiated later, with a combination
	if (!gb_ap_svc_connection_create(hd)) {
	 * XXX of a Control protocol probe operation and a
		retval = -EINVAL;
	 * XXX subsequent Control protocol connected operation for
	 * XXX the SVC connection.  At that point we know we're
	 * XXX properly connected to an Endo.
	 */
	retval = greybus_endo_setup(hd, endo_id, ap_intf_id);
	if (retval)
		goto error;
		goto error;
	}


	/* Start up our svc urb, which allows events to start flowing */
	/* Start up our svc urb, which allows events to start flowing */
	retval = usb_submit_urb(es1->svc_urb, GFP_KERNEL);
	retval = usb_submit_urb(es1->svc_urb, GFP_KERNEL);
+4 −11
Original line number Original line Diff line number Diff line
@@ -715,8 +715,6 @@ static int ap_probe(struct usb_interface *interface,
	int bulk_out = 0;
	int bulk_out = 0;
	int retval = -ENOMEM;
	int retval = -ENOMEM;
	int i;
	int i;
	u16 endo_id = 0x4755;	// FIXME - get endo "ID" from the SVC
	u8 ap_intf_id = 0x01;	// FIXME - get endo "ID" from the SVC
	u8 svc_interval = 0;
	u8 svc_interval = 0;


	/* We need to fit a CPort ID in one byte of a message header */
	/* We need to fit a CPort ID in one byte of a message header */
@@ -822,16 +820,11 @@ static int ap_probe(struct usb_interface *interface,
		es1->cport_out_urb_busy[i] = false;	/* just to be anal */
		es1->cport_out_urb_busy[i] = false;	/* just to be anal */
	}
	}


	/*
	/* Initialize AP's greybus interface */
	 * XXX Soon this will be initiated later, with a combination
	if (!gb_ap_svc_connection_create(hd)) {
	 * XXX of a Control protocol probe operation and a
		retval = -EINVAL;
	 * XXX subsequent Control protocol connected operation for
	 * XXX the SVC connection.  At that point we know we're
	 * XXX properly connected to an Endo.
	 */
	retval = greybus_endo_setup(hd, endo_id, ap_intf_id);
	if (retval)
		goto error;
		goto error;
	}


	/* Start up our svc urb, which allows events to start flowing */
	/* Start up our svc urb, which allows events to start flowing */
	retval = usb_submit_urb(es1->svc_urb, GFP_KERNEL);
	retval = usb_submit_urb(es1->svc_urb, GFP_KERNEL);