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

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

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ 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.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/greybus/bundle.h (Version linux-6.12-rc7) and /include/linux/greybus/bundle.h (Version linux-5.12.19)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*                                                  2 /*
  3  * Greybus bundles                                  3  * Greybus bundles
  4  *                                                  4  *
  5  * Copyright 2014 Google Inc.                       5  * Copyright 2014 Google Inc.
  6  * Copyright 2014 Linaro Ltd.                       6  * Copyright 2014 Linaro Ltd.
  7  */                                                 7  */
  8                                                     8 
  9 #ifndef __BUNDLE_H                                  9 #ifndef __BUNDLE_H
 10 #define __BUNDLE_H                                 10 #define __BUNDLE_H
 11                                                    11 
 12 #include <linux/types.h>                           12 #include <linux/types.h>
 13 #include <linux/list.h>                            13 #include <linux/list.h>
 14 #include <linux/pm_runtime.h>                      14 #include <linux/pm_runtime.h>
 15 #include <linux/device.h>                          15 #include <linux/device.h>
 16                                                    16 
 17 #define BUNDLE_ID_NONE  U8_MAX                     17 #define BUNDLE_ID_NONE  U8_MAX
 18                                                    18 
 19 /* Greybus "public" definitions" */                19 /* Greybus "public" definitions" */
 20 struct gb_bundle {                                 20 struct gb_bundle {
 21         struct device           dev;               21         struct device           dev;
 22         struct gb_interface     *intf;             22         struct gb_interface     *intf;
 23                                                    23 
 24         u8                      id;                24         u8                      id;
 25         u8                      class;             25         u8                      class;
 26         u8                      class_major;       26         u8                      class_major;
 27         u8                      class_minor;       27         u8                      class_minor;
 28                                                    28 
 29         size_t                  num_cports;        29         size_t                  num_cports;
 30         struct greybus_descriptor_cport *cport     30         struct greybus_descriptor_cport *cport_desc;
 31                                                    31 
 32         struct list_head        connections;       32         struct list_head        connections;
 33         u8                      *state;            33         u8                      *state;
 34                                                    34 
 35         struct list_head        links;  /* int     35         struct list_head        links;  /* interface->bundles */
 36 };                                                 36 };
 37 #define to_gb_bundle(d) container_of(d, struct     37 #define to_gb_bundle(d) container_of(d, struct gb_bundle, dev)
 38                                                    38 
 39 /* Greybus "private" definitions" */               39 /* Greybus "private" definitions" */
 40 struct gb_bundle *gb_bundle_create(struct gb_i     40 struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id,
 41                                    u8 class);      41                                    u8 class);
 42 int gb_bundle_add(struct gb_bundle *bundle);       42 int gb_bundle_add(struct gb_bundle *bundle);
 43 void gb_bundle_destroy(struct gb_bundle *bundl     43 void gb_bundle_destroy(struct gb_bundle *bundle);
 44                                                    44 
 45 /* Bundle Runtime PM wrappers */                   45 /* Bundle Runtime PM wrappers */
 46 #ifdef CONFIG_PM                                   46 #ifdef CONFIG_PM
 47 static inline int gb_pm_runtime_get_sync(struc     47 static inline int gb_pm_runtime_get_sync(struct gb_bundle *bundle)
 48 {                                                  48 {
 49         int retval;                                49         int retval;
 50                                                    50 
 51         retval = pm_runtime_get_sync(&bundle->     51         retval = pm_runtime_get_sync(&bundle->dev);
 52         if (retval < 0) {                          52         if (retval < 0) {
 53                 dev_err(&bundle->dev,              53                 dev_err(&bundle->dev,
 54                         "pm_runtime_get_sync f     54                         "pm_runtime_get_sync failed: %d\n", retval);
 55                 pm_runtime_put_noidle(&bundle-     55                 pm_runtime_put_noidle(&bundle->dev);
 56                 return retval;                     56                 return retval;
 57         }                                          57         }
 58                                                    58 
 59         return 0;                                  59         return 0;
 60 }                                                  60 }
 61                                                    61 
 62 static inline int gb_pm_runtime_put_autosuspen     62 static inline int gb_pm_runtime_put_autosuspend(struct gb_bundle *bundle)
 63 {                                                  63 {
 64         int retval;                                64         int retval;
 65                                                    65 
 66         pm_runtime_mark_last_busy(&bundle->dev     66         pm_runtime_mark_last_busy(&bundle->dev);
 67         retval = pm_runtime_put_autosuspend(&b     67         retval = pm_runtime_put_autosuspend(&bundle->dev);
 68                                                    68 
 69         return retval;                             69         return retval;
 70 }                                                  70 }
 71                                                    71 
 72 static inline void gb_pm_runtime_get_noresume(     72 static inline void gb_pm_runtime_get_noresume(struct gb_bundle *bundle)
 73 {                                                  73 {
 74         pm_runtime_get_noresume(&bundle->dev);     74         pm_runtime_get_noresume(&bundle->dev);
 75 }                                                  75 }
 76                                                    76 
 77 static inline void gb_pm_runtime_put_noidle(st     77 static inline void gb_pm_runtime_put_noidle(struct gb_bundle *bundle)
 78 {                                                  78 {
 79         pm_runtime_put_noidle(&bundle->dev);       79         pm_runtime_put_noidle(&bundle->dev);
 80 }                                                  80 }
 81                                                    81 
 82 #else                                              82 #else
 83 static inline int gb_pm_runtime_get_sync(struc     83 static inline int gb_pm_runtime_get_sync(struct gb_bundle *bundle)
 84 { return 0; }                                      84 { return 0; }
 85 static inline int gb_pm_runtime_put_autosuspen     85 static inline int gb_pm_runtime_put_autosuspend(struct gb_bundle *bundle)
 86 { return 0; }                                      86 { return 0; }
 87                                                    87 
 88 static inline void gb_pm_runtime_get_noresume(     88 static inline void gb_pm_runtime_get_noresume(struct gb_bundle *bundle) {}
 89 static inline void gb_pm_runtime_put_noidle(st     89 static inline void gb_pm_runtime_put_noidle(struct gb_bundle *bundle) {}
 90 #endif                                             90 #endif
 91                                                    91 
 92 #endif /* __BUNDLE_H */                            92 #endif /* __BUNDLE_H */
 93                                                    93 

~ [ 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