Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Greybus driver and device API |
| 3 | * |
| 4 | * Copyright 2014 Google Inc. |
| 5 | * |
| 6 | * Released under the GPLv2 only. |
| 7 | */ |
| 8 | |
| 9 | #ifndef __LINUX_GREYBUS_H |
| 10 | #define __LINUX_GREYBUS_H |
| 11 | |
| 12 | #ifdef __KERNEL__ |
| 13 | |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 14 | #include <linux/kernel.h> |
Greg Kroah-Hartman | 6dca7b9 | 2014-09-01 13:42:43 -0700 | [diff] [blame] | 15 | #include <linux/types.h> |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 16 | #include <linux/list.h> |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 17 | #include <linux/slab.h> |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 18 | #include <linux/device.h> |
| 19 | #include <linux/module.h> |
Alex Elder | 177404b | 2014-10-03 14:14:24 -0500 | [diff] [blame] | 20 | #include <linux/idr.h> |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 21 | |
Alex Elder | 1bb3c72 | 2014-10-02 12:30:03 -0500 | [diff] [blame] | 22 | #include "kernel_ver.h" |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 23 | #include "greybus_id.h" |
Alex Elder | 05ad189 | 2014-09-09 13:55:03 -0500 | [diff] [blame] | 24 | #include "greybus_manifest.h" |
Alex Elder | b09c94a | 2014-10-01 21:54:16 -0500 | [diff] [blame] | 25 | #include "manifest.h" |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 26 | #include "module.h" |
Alex Elder | 8c12cde | 2014-10-01 21:54:12 -0500 | [diff] [blame] | 27 | #include "interface.h" |
Alex Elder | c68adb2 | 2014-10-01 21:54:14 -0500 | [diff] [blame] | 28 | #include "connection.h" |
Alex Elder | e88afa5 | 2014-10-01 21:54:15 -0500 | [diff] [blame] | 29 | #include "operation.h" |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 30 | |
| 31 | |
Greg Kroah-Hartman | 8c53e07 | 2014-09-12 20:47:11 -0700 | [diff] [blame] | 32 | /* Matches up with the Greybus Protocol specification document */ |
Matt Porter | 52adb56 | 2014-09-18 15:25:43 -0400 | [diff] [blame] | 33 | #define GREYBUS_VERSION_MAJOR 0x00 |
| 34 | #define GREYBUS_VERSION_MINOR 0x01 |
Greg Kroah-Hartman | 8c53e07 | 2014-09-12 20:47:11 -0700 | [diff] [blame] | 35 | |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 36 | #define GREYBUS_DEVICE_ID_MATCH_DEVICE \ |
Greg Kroah-Hartman | 8faa8da | 2014-10-06 20:34:48 -0700 | [diff] [blame] | 37 | (GREYBUS_DEVICE_ID_MATCH_VENDOR | GREYBUS_DEVICE_ID_MATCH_PRODUCT) |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 38 | |
Greg Kroah-Hartman | 6dca7b9 | 2014-09-01 13:42:43 -0700 | [diff] [blame] | 39 | #define GREYBUS_DEVICE(v, p) \ |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 40 | .match_flags = GREYBUS_DEVICE_ID_MATCH_DEVICE, \ |
Greg Kroah-Hartman | 6dca7b9 | 2014-09-01 13:42:43 -0700 | [diff] [blame] | 41 | .vendor = (v), \ |
| 42 | .product = (p), |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 43 | |
Greg Kroah-Hartman | 6dca7b9 | 2014-09-01 13:42:43 -0700 | [diff] [blame] | 44 | #define GREYBUS_DEVICE_SERIAL(s) \ |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 45 | .match_flags = GREYBUS_DEVICE_ID_MATCH_SERIAL, \ |
Greg Kroah-Hartman | 6dca7b9 | 2014-09-01 13:42:43 -0700 | [diff] [blame] | 46 | .serial_number = (s), |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 47 | |
Alex Elder | 1bb3c72 | 2014-10-02 12:30:03 -0500 | [diff] [blame] | 48 | /* XXX I couldn't get my Kconfig file to be noticed for out-of-tree build */ |
| 49 | #ifndef CONFIG_HOST_DEV_CPORT_ID_MAX |
| 50 | #define CONFIG_HOST_DEV_CPORT_ID_MAX 128 |
| 51 | #endif /* !CONFIG_HOST_DEV_CPORT_ID_MAX */ |
| 52 | |
| 53 | /* Maximum number of CPorts usable by a host device */ |
| 54 | /* XXX This should really be determined by the AP module manifest */ |
| 55 | #define HOST_DEV_CPORT_ID_MAX CONFIG_HOST_DEV_CPORT_ID_MAX |
| 56 | #define CPORT_ID_BAD U16_MAX /* UniPro max id is 4095 */ |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 57 | |
Greg Kroah-Hartman | 3e7736e | 2014-09-21 17:34:28 -0700 | [diff] [blame] | 58 | /* |
| 59 | gbuf |
| 60 | |
| 61 | This is the "main" data structure to send / receive Greybus messages |
| 62 | |
| 63 | There are two different "views" of a gbuf structure: |
| 64 | - a greybus driver |
| 65 | - a greybus host controller |
| 66 | |
| 67 | A Greybus driver needs to worry about the following: |
| 68 | - creating a gbuf |
| 69 | - putting data into a gbuf |
| 70 | - sending a gbuf to a device |
| 71 | - receiving a gbuf from a device |
| 72 | |
| 73 | Creating a gbuf: |
| 74 | A greybus driver calls greybus_alloc_gbuf() |
| 75 | Putting data into a gbuf: |
| 76 | copy data into gbuf->transfer_buffer |
| 77 | Send a gbuf: |
| 78 | A greybus driver calls greybus_submit_gbuf() |
| 79 | The completion function in a gbuf will be called if the gbuf is successful |
| 80 | or not. That completion function runs in user context. After the |
| 81 | completion function is called, the gbuf must not be touched again as the |
| 82 | greybus core "owns" it. But, if a greybus driver wants to "hold on" to a |
| 83 | gbuf after the completion function has been called, a reference must be |
| 84 | grabbed on the gbuf with a call to greybus_get_gbuf(). When finished with |
| 85 | the gbuf, call greybus_free_gbuf() and when the last reference count is |
| 86 | dropped, it will be removed from the system. |
| 87 | Receive a gbuf: |
| 88 | A greybus driver calls gb_register_cport_complete() with a pointer to the |
| 89 | callback function to be called for when a gbuf is received from a specific |
| 90 | cport and device. That callback will be made in user context with a gbuf |
| 91 | when it is received. To stop receiving messages, call |
| 92 | gb_deregister_cport_complete() for a specific cport. |
| 93 | |
| 94 | |
| 95 | Greybus Host controller drivers need to provide |
| 96 | - a way to allocate the transfer buffer for a gbuf |
| 97 | - a way to free the transfer buffer for a gbuf when it is "finished" |
| 98 | - a way to submit gbuf for transmissions |
| 99 | - notify the core the gbuf is complete |
| 100 | - receive gbuf from the wire and submit them to the core |
| 101 | - a way to send and receive svc messages |
| 102 | Allocate a transfer buffer |
| 103 | the host controller function alloc_gbuf_data is called |
| 104 | Free a transfer buffer |
| 105 | the host controller function free_gbuf_data is called |
| 106 | Submit a gbuf to the hardware |
| 107 | the host controller function submit_gbuf is called |
| 108 | Notify the gbuf is complete |
| 109 | the host controller driver must call greybus_gbuf_finished() |
| 110 | Submit a SVC message to the hardware |
| 111 | the host controller function send_svc_msg is called |
| 112 | Receive gbuf messages |
Alex Elder | 0db32a6 | 2014-09-24 05:16:14 -0500 | [diff] [blame] | 113 | the host controller driver must call greybus_cport_in() with the data |
Greg Kroah-Hartman | 3e7736e | 2014-09-21 17:34:28 -0700 | [diff] [blame] | 114 | Reveive SVC messages from the hardware |
Alex Elder | 0db32a6 | 2014-09-24 05:16:14 -0500 | [diff] [blame] | 115 | The host controller driver must call greybus_svc_in |
Greg Kroah-Hartman | 3e7736e | 2014-09-21 17:34:28 -0700 | [diff] [blame] | 116 | |
| 117 | |
| 118 | */ |
| 119 | |
Greg Kroah-Hartman | d5d1903 | 2014-08-11 19:03:20 +0800 | [diff] [blame] | 120 | |
| 121 | struct gbuf; |
| 122 | |
Greg Kroah-Hartman | d5d1903 | 2014-08-11 19:03:20 +0800 | [diff] [blame] | 123 | typedef void (*gbuf_complete_t)(struct gbuf *gbuf); |
| 124 | |
| 125 | struct gbuf { |
| 126 | struct kref kref; |
Greg Kroah-Hartman | d5d1903 | 2014-08-11 19:03:20 +0800 | [diff] [blame] | 127 | |
Alex Elder | 6eb3f4b | 2014-10-06 06:53:10 -0500 | [diff] [blame] | 128 | struct gb_connection *connection; |
Greg Kroah-Hartman | d5d1903 | 2014-08-11 19:03:20 +0800 | [diff] [blame] | 129 | int status; |
| 130 | void *transfer_buffer; |
Greg Kroah-Hartman | d5d1903 | 2014-08-11 19:03:20 +0800 | [diff] [blame] | 131 | u32 transfer_buffer_length; |
| 132 | u32 actual_length; |
| 133 | |
Alex Elder | 9a6f631 | 2014-10-06 06:53:11 -0500 | [diff] [blame] | 134 | bool outbound; /* AP-relative data direction */ |
Greg Kroah-Hartman | d5d1903 | 2014-08-11 19:03:20 +0800 | [diff] [blame] | 135 | |
| 136 | void *context; |
| 137 | gbuf_complete_t complete; |
| 138 | }; |
| 139 | |
Greg Kroah-Hartman | d5d1903 | 2014-08-11 19:03:20 +0800 | [diff] [blame] | 140 | |
Greg Kroah-Hartman | 199d68d | 2014-08-30 16:20:22 -0700 | [diff] [blame] | 141 | /* For SP1 hardware, we are going to "hardcode" each device to have all logical |
| 142 | * blocks in order to be able to address them as one unified "unit". Then |
| 143 | * higher up layers will then be able to talk to them as one logical block and |
| 144 | * properly know how they are hooked together (i.e. which i2c port is on the |
| 145 | * same module as the gpio pins, etc.) |
| 146 | * |
| 147 | * So, put the "private" data structures here in greybus.h and link to them off |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 148 | * of the "main" gb_module structure. |
Greg Kroah-Hartman | 199d68d | 2014-08-30 16:20:22 -0700 | [diff] [blame] | 149 | */ |
| 150 | |
| 151 | struct gb_i2c_device; |
| 152 | struct gb_gpio_device; |
| 153 | struct gb_sdio_host; |
| 154 | struct gb_tty; |
| 155 | struct gb_usb_device; |
Greg Kroah-Hartman | 33ea3a3 | 2014-09-07 15:39:34 -0700 | [diff] [blame] | 156 | struct gb_battery; |
Greg Kroah-Hartman | a39879f | 2014-09-06 16:57:36 -0700 | [diff] [blame] | 157 | struct greybus_host_device; |
Greg Kroah-Hartman | 68f1fc4 | 2014-09-07 13:12:11 -0700 | [diff] [blame] | 158 | struct svc_msg; |
Greg Kroah-Hartman | a39879f | 2014-09-06 16:57:36 -0700 | [diff] [blame] | 159 | |
| 160 | /* Greybus "Host driver" structure, needed by a host controller driver to be |
| 161 | * able to handle both SVC control as well as "real" greybus messages |
| 162 | */ |
| 163 | struct greybus_host_driver { |
| 164 | size_t hd_priv_size; |
| 165 | |
Alex Elder | 9a6f631 | 2014-10-06 06:53:11 -0500 | [diff] [blame] | 166 | int (*alloc_gbuf_data)(struct gbuf *gbuf, unsigned int size, |
| 167 | gfp_t gfp_mask); |
Greg Kroah-Hartman | 3e7736e | 2014-09-21 17:34:28 -0700 | [diff] [blame] | 168 | void (*free_gbuf_data)(struct gbuf *gbuf); |
Alex Elder | 0db32a6 | 2014-09-24 05:16:14 -0500 | [diff] [blame] | 169 | int (*submit_svc)(struct svc_msg *svc_msg, |
Greg Kroah-Hartman | f036e05 | 2014-09-19 19:13:33 -0700 | [diff] [blame] | 170 | struct greybus_host_device *hd); |
Alex Elder | 61418b9 | 2014-10-16 06:35:29 -0500 | [diff] [blame] | 171 | int (*submit_gbuf)(struct gbuf *gbuf, gfp_t gfp_mask); |
Greg Kroah-Hartman | a39879f | 2014-09-06 16:57:36 -0700 | [diff] [blame] | 172 | }; |
| 173 | |
| 174 | struct greybus_host_device { |
Greg Kroah-Hartman | 8c53e07 | 2014-09-12 20:47:11 -0700 | [diff] [blame] | 175 | struct kref kref; |
Greg Kroah-Hartman | 772149b | 2014-09-14 12:27:28 -0700 | [diff] [blame] | 176 | struct device *parent; |
Greg Kroah-Hartman | a39879f | 2014-09-06 16:57:36 -0700 | [diff] [blame] | 177 | const struct greybus_host_driver *driver; |
Greg Kroah-Hartman | a39879f | 2014-09-06 16:57:36 -0700 | [diff] [blame] | 178 | |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 179 | struct list_head modules; |
Alex Elder | ee9ebe4 | 2014-10-06 06:53:08 -0500 | [diff] [blame] | 180 | struct rb_root connections; |
Alex Elder | 177404b | 2014-10-03 14:14:24 -0500 | [diff] [blame] | 181 | struct ida cport_id_map; |
Greg Kroah-Hartman | 25b7b6d | 2014-10-06 20:29:40 -0700 | [diff] [blame] | 182 | spinlock_t cport_id_map_lock; |
Alex Elder | 1bb3c72 | 2014-10-02 12:30:03 -0500 | [diff] [blame] | 183 | |
Greg Kroah-Hartman | a39879f | 2014-09-06 16:57:36 -0700 | [diff] [blame] | 184 | /* Private data for the host driver */ |
Greg Kroah-Hartman | 8faa8da | 2014-10-06 20:34:48 -0700 | [diff] [blame] | 185 | unsigned long hd_priv[0] __aligned(sizeof(s64)); |
Greg Kroah-Hartman | a39879f | 2014-09-06 16:57:36 -0700 | [diff] [blame] | 186 | }; |
| 187 | |
Greg Kroah-Hartman | 8faa8da | 2014-10-06 20:34:48 -0700 | [diff] [blame] | 188 | struct greybus_host_device *greybus_create_hd(struct greybus_host_driver *hd, |
Greg Kroah-Hartman | a39879f | 2014-09-06 16:57:36 -0700 | [diff] [blame] | 189 | struct device *parent); |
Greg Kroah-Hartman | 68f1fc4 | 2014-09-07 13:12:11 -0700 | [diff] [blame] | 190 | void greybus_remove_hd(struct greybus_host_device *hd); |
Alex Elder | 1cfc667 | 2014-09-30 19:25:21 -0500 | [diff] [blame] | 191 | void greybus_cport_in(struct greybus_host_device *hd, u16 cport_id, |
| 192 | u8 *data, size_t length); |
Greg Kroah-Hartman | 9c8d3af | 2014-09-13 11:09:35 -0700 | [diff] [blame] | 193 | void greybus_gbuf_finished(struct gbuf *gbuf); |
Greg Kroah-Hartman | a39879f | 2014-09-06 16:57:36 -0700 | [diff] [blame] | 194 | |
Alex Elder | 6eb3f4b | 2014-10-06 06:53:10 -0500 | [diff] [blame] | 195 | struct gbuf *greybus_alloc_gbuf(struct gb_connection *connection, |
Alex Elder | ecf7d57 | 2014-10-01 21:54:10 -0500 | [diff] [blame] | 196 | gbuf_complete_t complete, unsigned int size, |
Alex Elder | 9a6f631 | 2014-10-06 06:53:11 -0500 | [diff] [blame] | 197 | bool outbound, gfp_t gfp_mask, void *context); |
Greg Kroah-Hartman | d5d1903 | 2014-08-11 19:03:20 +0800 | [diff] [blame] | 198 | void greybus_free_gbuf(struct gbuf *gbuf); |
Greg Kroah-Hartman | a39879f | 2014-09-06 16:57:36 -0700 | [diff] [blame] | 199 | struct gbuf *greybus_get_gbuf(struct gbuf *gbuf); |
| 200 | #define greybus_put_gbuf greybus_free_gbuf |
Greg Kroah-Hartman | d5d1903 | 2014-08-11 19:03:20 +0800 | [diff] [blame] | 201 | |
| 202 | int greybus_submit_gbuf(struct gbuf *gbuf, gfp_t mem_flags); |
| 203 | int greybus_kill_gbuf(struct gbuf *gbuf); |
| 204 | |
| 205 | |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 206 | struct greybus_driver { |
| 207 | const char *name; |
| 208 | |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 209 | int (*probe)(struct gb_module *gmod, |
Greg Kroah-Hartman | 6584c8a | 2014-09-01 13:31:31 -0700 | [diff] [blame] | 210 | const struct greybus_module_id *id); |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 211 | void (*disconnect)(struct gb_module *gmod); |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 212 | |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 213 | int (*suspend)(struct gb_module *gmod, pm_message_t message); |
| 214 | int (*resume)(struct gb_module *gmod); |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 215 | |
Greg Kroah-Hartman | 6584c8a | 2014-09-01 13:31:31 -0700 | [diff] [blame] | 216 | const struct greybus_module_id *id_table; |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 217 | |
| 218 | struct device_driver driver; |
| 219 | }; |
| 220 | #define to_greybus_driver(d) container_of(d, struct greybus_driver, driver) |
| 221 | |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 222 | /* Don't call these directly, use the module_greybus_driver() macro instead */ |
| 223 | int greybus_register_driver(struct greybus_driver *driver, |
| 224 | struct module *module, const char *mod_name); |
| 225 | void greybus_deregister(struct greybus_driver *driver); |
| 226 | |
| 227 | /* define to get proper THIS_MODULE and KBUILD_MODNAME values */ |
| 228 | #define greybus_register(driver) \ |
| 229 | greybus_register_driver(driver, THIS_MODULE, KBUILD_MODNAME) |
| 230 | |
| 231 | /** |
| 232 | * module_greybus_driver() - Helper macro for registering a Greybus driver |
| 233 | * @__greybus_driver: greybus_driver structure |
| 234 | * |
| 235 | * Helper macro for Greybus drivers to set up proper module init / exit |
| 236 | * functions. Replaces module_init() and module_exit() and keeps people from |
| 237 | * printing pointless things to the kernel log when their driver is loaded. |
| 238 | */ |
| 239 | #define module_greybus_driver(__greybus_driver) \ |
| 240 | module_driver(__greybus_driver, greybus_register, greybus_deregister) |
| 241 | |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 242 | int greybus_disabled(void); |
| 243 | |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 244 | void greybus_remove_device(struct gb_module *gmod); |
Greg Kroah-Hartman | de536e3 | 2014-08-31 16:17:04 -0700 | [diff] [blame] | 245 | |
| 246 | /* Internal functions to gb module, move to internal .h file eventually. */ |
| 247 | |
Greg Kroah-Hartman | d0cfd10 | 2014-09-21 19:10:39 -0700 | [diff] [blame] | 248 | void gb_add_module(struct greybus_host_device *hd, u8 module_id, |
| 249 | u8 *data, int size); |
Greg Kroah-Hartman | 85e0066 | 2014-09-21 18:17:12 -0700 | [diff] [blame] | 250 | void gb_remove_module(struct greybus_host_device *hd, u8 module_id); |
| 251 | |
Alex Elder | 51c75fd | 2014-09-26 20:55:35 -0500 | [diff] [blame] | 252 | int greybus_svc_in(struct greybus_host_device *hd, u8 *data, int length); |
Greg Kroah-Hartman | 45f3678 | 2014-09-14 11:40:35 -0700 | [diff] [blame] | 253 | int gb_ap_init(void); |
| 254 | void gb_ap_exit(void); |
Greg Kroah-Hartman | de536e3 | 2014-08-31 16:17:04 -0700 | [diff] [blame] | 255 | int gb_debugfs_init(void); |
| 256 | void gb_debugfs_cleanup(void); |
Greg Kroah-Hartman | 45f3678 | 2014-09-14 11:40:35 -0700 | [diff] [blame] | 257 | int gb_gbuf_init(void); |
| 258 | void gb_gbuf_exit(void); |
Greg Kroah-Hartman | de536e3 | 2014-08-31 16:17:04 -0700 | [diff] [blame] | 259 | |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 260 | int gb_register_cport_complete(struct gb_module *gmod, |
Alex Elder | 1cfc667 | 2014-09-30 19:25:21 -0500 | [diff] [blame] | 261 | gbuf_complete_t handler, u16 cport_id, |
Greg Kroah-Hartman | 80e04f0 | 2014-09-13 18:20:54 -0700 | [diff] [blame] | 262 | void *context); |
Alex Elder | 1cfc667 | 2014-09-30 19:25:21 -0500 | [diff] [blame] | 263 | void gb_deregister_cport_complete(u16 cport_id); |
Greg Kroah-Hartman | 80e04f0 | 2014-09-13 18:20:54 -0700 | [diff] [blame] | 264 | |
Greg Kroah-Hartman | 06340ef | 2014-09-01 19:05:54 -0700 | [diff] [blame] | 265 | extern const struct attribute_group *greybus_module_groups[]; |
| 266 | |
Alex Elder | 574341c | 2014-10-16 06:35:35 -0500 | [diff] [blame] | 267 | int gb_i2c_device_init(struct gb_connection *connection); |
| 268 | |
Greg Kroah-Hartman | 712d659 | 2014-09-01 09:51:51 -0700 | [diff] [blame] | 269 | int gb_tty_init(void); |
| 270 | void gb_tty_exit(void); |
| 271 | |
Greg Kroah-Hartman | de536e3 | 2014-08-31 16:17:04 -0700 | [diff] [blame] | 272 | |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 273 | |
| 274 | #endif /* __KERNEL__ */ |
| 275 | #endif /* __LINUX_GREYBUS_H */ |