summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/hd.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2015-12-22 18:21:51 -0800
committerGreg Kroah-Hartman <gregkh@google.com>2016-01-12 11:11:49 -0800
commited4596e9b19104ccc1e87bde8fcadee3a473c101 (patch)
tree9d2467879c261da5e43c2b90da3d0620757ba60e /drivers/staging/greybus/hd.c
parentaccad1ba7d62543ab3bcf08813726ea87d237bb6 (diff)
greybus: host: provide "generic" apbridge output calls
Provide a new function, gb_hd_output() to send data to the apbridge. This is useful for the camera and audio drivers that need to do this type of messaging. The camera driver is converted to use this new function, the audio driver can use it when it gets merged later. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Tested-by: Mark Greer <mgreer@animalcreek.com> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Diffstat (limited to 'drivers/staging/greybus/hd.c')
-rw-r--r--drivers/staging/greybus/hd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/greybus/hd.c b/drivers/staging/greybus/hd.c
index bff6861b8af7..b11a63644235 100644
--- a/drivers/staging/greybus/hd.c
+++ b/drivers/staging/greybus/hd.c
@@ -17,6 +17,15 @@
static struct ida gb_hd_bus_id_map;
+int gb_hd_output(struct gb_host_device *hd, void *req, u16 size, u8 cmd,
+ bool async)
+{
+ if (!hd || !hd->driver || !hd->driver->output)
+ return -EINVAL;
+ return hd->driver->output(hd, req, size, cmd, async);
+}
+EXPORT_SYMBOL_GPL(gb_hd_output);
+
static void gb_hd_release(struct device *dev)
{
struct gb_host_device *hd = to_gb_host_device(dev);