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