aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/svc.h
diff options
context:
space:
mode:
authorGravatar Johan Hovold <johan@hovoldconsulting.com> 2015-12-07 15:05:37 +0100
committerGravatar Greg Kroah-Hartman <gregkh@google.com> 2015-12-08 15:31:14 -0500
commit7adeaae7132e06cd760b86576b8aefd2f0feb4d1 (patch)
tree8bf02f9966a47add25d150221522cc28ea9744cf /drivers/staging/greybus/svc.h
parentgreybus: hd: make svc-connection life time coincide with host-device (diff)
downloadlinux-7adeaae7132e06cd760b86576b8aefd2f0feb4d1.tar.gz
linux-7adeaae7132e06cd760b86576b8aefd2f0feb4d1.tar.bz2
linux-7adeaae7132e06cd760b86576b8aefd2f0feb4d1.zip
greybus: svc: create svc along with host device
Create svc device along with host-device and move the svc-connection to the svc structure. The svc connection is enabled when registering the host device, but as the SVC protocol is currently driven by the SVC, we need to defer registration of the svc device to the connection request handler. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/svc.h')
-rw-r--r--drivers/staging/greybus/svc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/greybus/svc.h b/drivers/staging/greybus/svc.h
index ca0f71d059b1..b7cb7e4c6cf5 100644
--- a/drivers/staging/greybus/svc.h
+++ b/drivers/staging/greybus/svc.h
@@ -30,6 +30,11 @@ struct gb_svc {
};
#define to_gb_svc(d) container_of(d, struct gb_svc, d)
+struct gb_svc *gb_svc_create(struct gb_host_device *hd);
+int gb_svc_add(struct gb_svc *svc);
+void gb_svc_del(struct gb_svc *svc);
+void gb_svc_put(struct gb_svc *svc);
+
int gb_svc_intf_reset(struct gb_svc *svc, u8 intf_id);
int gb_svc_connection_create(struct gb_svc *svc, u8 intf1_id, u16 cport1_id,
u8 intf2_id, u16 cport2_id, bool boot_over_unipro);