linux/drivers/staging/greybus/module.h
<<
>>
Prefs
   1// SPDX-License-Identifier: GPL-2.0
   2/*
   3 * Greybus Module code
   4 *
   5 * Copyright 2016 Google Inc.
   6 * Copyright 2016 Linaro Ltd.
   7 */
   8
   9#ifndef __MODULE_H
  10#define __MODULE_H
  11
  12struct gb_module {
  13        struct device dev;
  14        struct gb_host_device *hd;
  15
  16        struct list_head hd_node;
  17
  18        u8 module_id;
  19        size_t num_interfaces;
  20
  21        bool disconnected;
  22
  23        struct gb_interface *interfaces[0];
  24};
  25#define to_gb_module(d) container_of(d, struct gb_module, dev)
  26
  27struct gb_module *gb_module_create(struct gb_host_device *hd, u8 module_id,
  28                                   size_t num_interfaces);
  29int gb_module_add(struct gb_module *module);
  30void gb_module_del(struct gb_module *module);
  31void gb_module_put(struct gb_module *module);
  32
  33#endif /* __MODULE_H */
  34