summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/control.h
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2016-04-13 19:19:02 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2016-04-21 10:06:00 +0900
commita6e5b014b8fe0bd4cb1e1ca0380320a200605742 (patch)
tree963b67c08d45090c768eff28ce8b1b27b3382604 /drivers/staging/greybus/control.h
parent1ed8cdef405806c246b62a1ba926e0251fdaa531 (diff)
greybus: core: make the control object be a device
Make the control object be a greybus device. The control device will be used to expose attributes specific to greybus-type interfaces. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/control.h')
-rw-r--r--drivers/staging/greybus/control.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/staging/greybus/control.h b/drivers/staging/greybus/control.h
index 949f1a3c433b..697f901b34a7 100644
--- a/drivers/staging/greybus/control.h
+++ b/drivers/staging/greybus/control.h
@@ -11,18 +11,22 @@
#define __CONTROL_H
struct gb_control {
- struct gb_connection *connection;
+ struct device dev;
+ struct gb_interface *intf;
+
+ struct gb_connection *connection;
u8 protocol_major;
u8 protocol_minor;
bool has_bundle_version;
};
+#define to_gb_control(d) container_of(d, struct gb_control, dev)
struct gb_control *gb_control_create(struct gb_interface *intf);
int gb_control_enable(struct gb_control *control);
void gb_control_disable(struct gb_control *control);
-void gb_control_destroy(struct gb_control *control);
+void gb_control_put(struct gb_control *control);
int gb_control_get_bundle_versions(struct gb_control *control);
int gb_control_connected_operation(struct gb_control *control, u16 cport_id);