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

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


  1 /* SPDX-License-Identifier: GPL-2.0-only */         1 
  2                                                   
  3 #ifndef _LINUX_GPIO_REGMAP_H                      
  4 #define _LINUX_GPIO_REGMAP_H                      
  5                                                   
  6 struct device;                                    
  7 struct fwnode_handle;                             
  8 struct gpio_regmap;                               
  9 struct irq_domain;                                
 10 struct regmap;                                    
 11                                                   
 12 #define GPIO_REGMAP_ADDR_ZERO ((unsigned int)(    
 13 #define GPIO_REGMAP_ADDR(addr) ((addr) ? : GPI    
 14                                                   
 15 /**                                               
 16  * struct gpio_regmap_config - Description of     
 17  * @parent:             The parent device         
 18  * @regmap:             The regmap used to acc    
 19  *                      given, the name of the    
 20  * @fwnode:             (Optional) The firmwar    
 21  *                      If not given, the fwno    
 22  * @label:              (Optional) Descriptive    
 23  *                      If not given, the name    
 24  * @ngpio:              Number of GPIOs           
 25  * @names:              (Optional) Array of na    
 26  * @reg_dat_base:       (Optional) (in) regist    
 27  * @reg_set_base:       (Optional) set registe    
 28  * @reg_clr_base:       (Optional) clear regis    
 29  * @reg_dir_in_base:    (Optional) in setting     
 30  * @reg_dir_out_base:   (Optional) out setting    
 31  * @reg_stride:         (Optional) May be set     
 32  *                      same type, dat, set, e    
 33  * @ngpio_per_reg:      Number of GPIOs per re    
 34  * @irq_domain:         (Optional) IRQ domain     
 35  *                      interrupt-capable         
 36  * @reg_mask_xlate:     (Optional) Translates     
 37  *                      offset to a register/b    
 38  *                      given the default gpio    
 39  *                      is used.                  
 40  * @drvdata:            (Optional) Pointer to     
 41  *                      not used by gpio-remap    
 42  *                      driver callback(s).       
 43  *                                                
 44  * The ->reg_mask_xlate translates a given bas    
 45  * register and mask pair. The base address is    
 46  * base addresses in this structure.              
 47  *                                                
 48  * Although all register base addresses are ma    
 49  * several rules:                                 
 50  *     1. if you only have @reg_dat_base set,     
 51  *     2. if you only have @reg_set_base set,     
 52  *     3. if you have either @reg_dir_in_base     
 53  *        you have to set both @reg_dat_base a    
 54  *     4. if you have @reg_set_base set, you m    
 55  *        two different registers for setting     
 56  *        also valid for the output-only case.    
 57  *     5. @reg_dir_in_base and @reg_dir_out_ba    
 58  *        hardware which has redundant registe    
 59  *                                                
 60  * Note: All base addresses may have the speci    
 61  * which forces the address to the value 0.       
 62  */                                               
 63 struct gpio_regmap_config {                       
 64         struct device *parent;                    
 65         struct regmap *regmap;                    
 66         struct fwnode_handle *fwnode;             
 67                                                   
 68         const char *label;                        
 69         int ngpio;                                
 70         const char *const *names;                 
 71                                                   
 72         unsigned int reg_dat_base;                
 73         unsigned int reg_set_base;                
 74         unsigned int reg_clr_base;                
 75         unsigned int reg_dir_in_base;             
 76         unsigned int reg_dir_out_base;            
 77         int reg_stride;                           
 78         int ngpio_per_reg;                        
 79         struct irq_domain *irq_domain;            
 80                                                   
 81         int (*reg_mask_xlate)(struct gpio_regm    
 82                               unsigned int off    
 83                               unsigned int *ma    
 84                                                   
 85         void *drvdata;                            
 86 };                                                
 87                                                   
 88 struct gpio_regmap *gpio_regmap_register(const    
 89 void gpio_regmap_unregister(struct gpio_regmap    
 90 struct gpio_regmap *devm_gpio_regmap_register(    
 91                                                   
 92 void *gpio_regmap_get_drvdata(struct gpio_regm    
 93                                                   
 94 #endif /* _LINUX_GPIO_REGMAP_H */                 
 95                                                   

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