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

TOMOYO Linux Cross Reference
Linux/include/linux/moxtet.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/moxtet.h (Version linux-6.12-rc7) and /include/linux/moxtet.h (Version linux-4.17.19)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 
  2 /*                                                
  3  * Turris Mox module configuration bus driver     
  4  *                                                
  5  * Copyright (C) 2019 Marek BehĂșn <kabel@kern    
  6  */                                               
  7                                                   
  8 #ifndef __LINUX_MOXTET_H                          
  9 #define __LINUX_MOXTET_H                          
 10                                                   
 11 #include <linux/device.h>                         
 12 #include <linux/irq.h>                            
 13 #include <linux/irqdomain.h>                      
 14 #include <linux/mutex.h>                          
 15                                                   
 16 #define TURRIS_MOX_MAX_MODULES  10                
 17                                                   
 18 enum turris_mox_cpu_module_id {                   
 19         TURRIS_MOX_CPU_ID_EMMC  = 0x00,           
 20         TURRIS_MOX_CPU_ID_SD    = 0x10,           
 21 };                                                
 22                                                   
 23 enum turris_mox_module_id {                       
 24         TURRIS_MOX_MODULE_FIRST         = 0x01    
 25                                                   
 26         TURRIS_MOX_MODULE_SFP           = 0x01    
 27         TURRIS_MOX_MODULE_PCI           = 0x02    
 28         TURRIS_MOX_MODULE_TOPAZ         = 0x03    
 29         TURRIS_MOX_MODULE_PERIDOT       = 0x04    
 30         TURRIS_MOX_MODULE_USB3          = 0x05    
 31         TURRIS_MOX_MODULE_PCI_BRIDGE    = 0x06    
 32                                                   
 33         TURRIS_MOX_MODULE_LAST          = 0x06    
 34 };                                                
 35                                                   
 36 #define MOXTET_NIRQS    16                        
 37                                                   
 38 struct moxtet {                                   
 39         struct device                   *dev;     
 40         struct mutex                    lock;     
 41         u8                              module    
 42         int                             count;    
 43         u8                              tx[TUR    
 44         int                             dev_ir    
 45         struct {                                  
 46                 struct irq_domain       *domai    
 47                 struct irq_chip         chip;     
 48                 unsigned long           masked    
 49                 struct moxtet_irqpos {            
 50                                         u8 idx    
 51                                         u8 bit    
 52                 } position[MOXTET_NIRQS];         
 53         } irq;                                    
 54 #ifdef CONFIG_DEBUG_FS                            
 55         struct dentry                   *debug    
 56 #endif                                            
 57 };                                                
 58                                                   
 59 struct moxtet_driver {                            
 60         const enum turris_mox_module_id *id_ta    
 61         struct device_driver            driver    
 62 };                                                
 63                                                   
 64 #define to_moxtet_driver(__drv) \                 
 65         ( __drv ? container_of_const(__drv, st    
 66                                                   
 67 extern int __moxtet_register_driver(struct mod    
 68                                     struct mox    
 69                                                   
 70 static inline void moxtet_unregister_driver(st    
 71 {                                                 
 72         if (mdrv)                                 
 73                 driver_unregister(&mdrv->drive    
 74 }                                                 
 75                                                   
 76 #define moxtet_register_driver(driver) \          
 77         __moxtet_register_driver(THIS_MODULE,     
 78                                                   
 79 #define module_moxtet_driver(__moxtet_driver)     
 80         module_driver(__moxtet_driver, moxtet_    
 81                         moxtet_unregister_driv    
 82                                                   
 83 struct moxtet_device {                            
 84         struct device                   dev;      
 85         struct moxtet                   *moxte    
 86         enum turris_mox_module_id       id;       
 87         unsigned int                    idx;      
 88 };                                                
 89                                                   
 90 extern int moxtet_device_read(struct device *d    
 91 extern int moxtet_device_write(struct device *    
 92 extern int moxtet_device_written(struct device    
 93                                                   
 94 static inline struct moxtet_device *              
 95 to_moxtet_device(struct device *dev)              
 96 {                                                 
 97         if (!dev)                                 
 98                 return NULL;                      
 99         return container_of(dev, struct moxtet    
100 }                                                 
101                                                   
102 #endif /* __LINUX_MOXTET_H */                     
103                                                   

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