~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/greybus/interface.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * Greybus Interface Block code
  4  *
  5  * Copyright 2014 Google Inc.
  6  * Copyright 2014 Linaro Ltd.
  7  */
  8 
  9 #ifndef __INTERFACE_H
 10 #define __INTERFACE_H
 11 
 12 #include <linux/types.h>
 13 #include <linux/device.h>
 14 
 15 enum gb_interface_type {
 16         GB_INTERFACE_TYPE_INVALID = 0,
 17         GB_INTERFACE_TYPE_UNKNOWN,
 18         GB_INTERFACE_TYPE_DUMMY,
 19         GB_INTERFACE_TYPE_UNIPRO,
 20         GB_INTERFACE_TYPE_GREYBUS,
 21 };
 22 
 23 #define GB_INTERFACE_QUIRK_NO_CPORT_FEATURES            BIT(0)
 24 #define GB_INTERFACE_QUIRK_NO_INIT_STATUS               BIT(1)
 25 #define GB_INTERFACE_QUIRK_NO_GMP_IDS                   BIT(2)
 26 #define GB_INTERFACE_QUIRK_FORCED_DISABLE               BIT(3)
 27 #define GB_INTERFACE_QUIRK_LEGACY_MODE_SWITCH           BIT(4)
 28 #define GB_INTERFACE_QUIRK_NO_BUNDLE_ACTIVATE           BIT(5)
 29 #define GB_INTERFACE_QUIRK_NO_PM                        BIT(6)
 30 
 31 struct gb_interface {
 32         struct device dev;
 33         struct gb_control *control;
 34 
 35         struct list_head bundles;
 36         struct list_head module_node;
 37         struct list_head manifest_descs;
 38         u8 interface_id;        /* Physical location within the Endo */
 39         u8 device_id;
 40         u8 features;            /* Feature flags set in the manifest */
 41 
 42         enum gb_interface_type type;
 43 
 44         u32 ddbl1_manufacturer_id;
 45         u32 ddbl1_product_id;
 46         u32 vendor_id;
 47         u32 product_id;
 48         u64 serial_number;
 49 
 50         struct gb_host_device *hd;
 51         struct gb_module *module;
 52 
 53         unsigned long quirks;
 54 
 55         struct mutex mutex;
 56 
 57         bool disconnected;
 58 
 59         bool ejected;
 60         bool removed;
 61         bool active;
 62         bool enabled;
 63         bool mode_switch;
 64         bool dme_read;
 65 
 66         struct work_struct mode_switch_work;
 67         struct completion mode_switch_completion;
 68 };
 69 #define to_gb_interface(d) container_of(d, struct gb_interface, dev)
 70 
 71 struct gb_interface *gb_interface_create(struct gb_module *module,
 72                                          u8 interface_id);
 73 int gb_interface_activate(struct gb_interface *intf);
 74 void gb_interface_deactivate(struct gb_interface *intf);
 75 int gb_interface_enable(struct gb_interface *intf);
 76 void gb_interface_disable(struct gb_interface *intf);
 77 int gb_interface_add(struct gb_interface *intf);
 78 void gb_interface_del(struct gb_interface *intf);
 79 void gb_interface_put(struct gb_interface *intf);
 80 void gb_interface_mailbox_event(struct gb_interface *intf, u16 result,
 81                                                                 u32 mailbox);
 82 
 83 int gb_interface_request_mode_switch(struct gb_interface *intf);
 84 
 85 #endif /* __INTERFACE_H */
 86 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php