diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2015-11-25 15:59:08 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-11-25 15:30:03 -0800 |
commit | 88f7b96da75f816ba022190d6076720562cac050 (patch) | |
tree | 380477fdbe1cd0abd3c6f3d77ace7784f5e3e178 /drivers/staging/greybus/greybus.h | |
parent | 6106e51b742b32954351e6020cdb789bc33bf120 (diff) |
greybus: svc: register svc device at hello
Register the svc device upon reception of the HELLO request.
The SVC HELLO request contains the endo id and AP interface id, which
will be exposed from the svc device rather than the endo.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/greybus.h')
-rw-r--r-- | drivers/staging/greybus/greybus.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/greybus/greybus.h b/drivers/staging/greybus/greybus.h index 8ef3a0426a09..fa81733282d6 100644 --- a/drivers/staging/greybus/greybus.h +++ b/drivers/staging/greybus/greybus.h @@ -109,6 +109,7 @@ extern struct device_type greybus_endo_type; extern struct device_type greybus_module_type; extern struct device_type greybus_interface_type; extern struct device_type greybus_bundle_type; +extern struct device_type greybus_svc_type; static inline int is_gb_host_device(const struct device *dev) { @@ -135,6 +136,11 @@ static inline int is_gb_bundle(const struct device *dev) return dev->type == &greybus_bundle_type; } +static inline int is_gb_svc(const struct device *dev) +{ + return dev->type == &greybus_svc_type; +} + static inline bool cport_id_valid(struct gb_host_device *hd, u16 cport_id) { return cport_id != CPORT_ID_BAD && cport_id < hd->num_cports; |