2 * Greybus Interface Block code
4 * Copyright 2014 Google Inc.
5 * Copyright 2014 Linaro Ltd.
7 * Released under the GPLv2 only.
13 /* Greybus "public" definitions" */
16 struct gb_control *control;
18 struct list_head bundles;
19 struct list_head links; /* gb_host_device->interfaces */
20 struct list_head manifest_descs;
21 u8 interface_id; /* Physical location within the Endo */
22 u8 device_id; /* Device id allocated for the interface block by the SVC */
24 /* Information taken from the manifest descriptor */
28 /* Information taken from the hotplug event */
29 u32 ddbl1_manufacturer_id;
38 struct gb_host_device *hd;
40 /* The interface needs to boot over unipro */
41 bool boot_over_unipro;
44 #define to_gb_interface(d) container_of(d, struct gb_interface, dev)
46 static inline void gb_interface_set_drvdata(struct gb_interface *intf,
49 dev_set_drvdata(&intf->dev, data);
52 static inline void *gb_interface_get_drvdata(struct gb_interface *intf)
54 return dev_get_drvdata(&intf->dev);
57 /* Greybus "private" definitions */
59 struct gb_interface *gb_interface_find(struct gb_host_device *hd,
62 struct gb_interface *gb_interface_create(struct gb_host_device *hd,
64 void gb_interface_destroy(struct gb_interface *intf);
65 int gb_interface_init(struct gb_interface *intf, u8 device_id);
66 void gb_interface_remove(struct gb_interface *intf);
67 void gb_interfaces_remove(struct gb_host_device *hd);
69 #endif /* __INTERFACE_H */