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

TOMOYO Linux Cross Reference
Linux/arch/s390/include/asm/ccwgroup.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 #ifndef S390_CCWGROUP_H
  3 #define S390_CCWGROUP_H
  4 
  5 struct ccw_device;
  6 struct ccw_driver;
  7 
  8 /**
  9  * struct ccwgroup_device - ccw group device
 10  * @state: online/offline state
 11  * @count: number of attached slave devices
 12  * @dev: embedded device structure
 13  * @cdev: variable number of slave devices, allocated as needed
 14  * @ungroup_work: used to ungroup the ccwgroup device
 15  */
 16 struct ccwgroup_device {
 17         enum {
 18                 CCWGROUP_OFFLINE,
 19                 CCWGROUP_ONLINE,
 20         } state;
 21 /* private: */
 22         atomic_t onoff;
 23         struct mutex reg_mutex;
 24 /* public: */
 25         unsigned int count;
 26         struct device   dev;
 27         struct work_struct ungroup_work;
 28         struct ccw_device *cdev[];
 29 };
 30 
 31 /**
 32  * struct ccwgroup_driver - driver for ccw group devices
 33  * @setup: function called during device creation to setup the device
 34  * @remove: function called on remove
 35  * @set_online: function called when device is set online
 36  * @set_offline: function called when device is set offline
 37  * @shutdown: function called when device is shut down
 38  * @driver: embedded driver structure
 39  * @ccw_driver: supported ccw_driver (optional)
 40  */
 41 struct ccwgroup_driver {
 42         int (*setup) (struct ccwgroup_device *);
 43         void (*remove) (struct ccwgroup_device *);
 44         int (*set_online) (struct ccwgroup_device *);
 45         int (*set_offline) (struct ccwgroup_device *);
 46         void (*shutdown)(struct ccwgroup_device *);
 47 
 48         struct device_driver driver;
 49         struct ccw_driver *ccw_driver;
 50 };
 51 
 52 extern int  ccwgroup_driver_register   (struct ccwgroup_driver *cdriver);
 53 extern void ccwgroup_driver_unregister (struct ccwgroup_driver *cdriver);
 54 int ccwgroup_create_dev(struct device *root, struct ccwgroup_driver *gdrv,
 55                         int num_devices, const char *buf);
 56 
 57 extern int ccwgroup_set_online(struct ccwgroup_device *gdev);
 58 int ccwgroup_set_offline(struct ccwgroup_device *gdev, bool call_gdrv);
 59 
 60 extern int ccwgroup_probe_ccwdev(struct ccw_device *cdev);
 61 extern void ccwgroup_remove_ccwdev(struct ccw_device *cdev);
 62 
 63 #define to_ccwgroupdev(x) container_of((x), struct ccwgroup_device, dev)
 64 #define to_ccwgroupdrv(x) container_of((x), struct ccwgroup_driver, driver)
 65 
 66 #if IS_ENABLED(CONFIG_CCWGROUP)
 67 bool dev_is_ccwgroup(struct device *dev);
 68 #else /* CONFIG_CCWGROUP */
 69 static inline bool dev_is_ccwgroup(struct device *dev)
 70 {
 71         return false;
 72 }
 73 #endif /* CONFIG_CCWGROUP */
 74 
 75 #endif
 76 

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