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

TOMOYO Linux Cross Reference
Linux/include/media/i2c/adp1653.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/media/i2c/adp1653.h (Version linux-6.12-rc7) and /include/media/i2c/adp1653.h (Version linux-2.4.37.11)


  1 /* SPDX-License-Identifier: GPL-2.0-only */         1 
  2 /*                                                
  3  * include/media/i2c/adp1653.h                    
  4  *                                                
  5  * Copyright (C) 2008--2011 Nokia Corporation     
  6  *                                                
  7  * Contact: Sakari Ailus <sakari.ailus@iki.fi>    
  8  *                                                
  9  * Contributors:                                  
 10  *      Sakari Ailus <sakari.ailus@iki.fi>        
 11  *      Tuukka Toivonen <tuukkat76@gmail.com>     
 12  */                                               
 13                                                   
 14 #ifndef ADP1653_H                                 
 15 #define ADP1653_H                                 
 16                                                   
 17 #include <linux/i2c.h>                            
 18 #include <linux/mutex.h>                          
 19 #include <linux/videodev2.h>                      
 20 #include <media/v4l2-ctrls.h>                     
 21 #include <media/v4l2-subdev.h>                    
 22                                                   
 23 #define ADP1653_NAME                              
 24 #define ADP1653_I2C_ADDR                          
 25                                                   
 26 /* Register definitions */                        
 27 #define ADP1653_REG_OUT_SEL                       
 28 #define ADP1653_REG_OUT_SEL_HPLED_TORCH_MIN       
 29 #define ADP1653_REG_OUT_SEL_HPLED_TORCH_MAX       
 30 #define ADP1653_REG_OUT_SEL_HPLED_FLASH_MIN       
 31 #define ADP1653_REG_OUT_SEL_HPLED_FLASH_MAX       
 32 #define ADP1653_REG_OUT_SEL_HPLED_SHIFT           
 33 #define ADP1653_REG_OUT_SEL_ILED_MAX              
 34 #define ADP1653_REG_OUT_SEL_ILED_SHIFT            
 35                                                   
 36 #define ADP1653_REG_CONFIG                        
 37 #define ADP1653_REG_CONFIG_TMR_CFG                
 38 #define ADP1653_REG_CONFIG_TMR_SET_MAX            
 39 #define ADP1653_REG_CONFIG_TMR_SET_SHIFT          
 40                                                   
 41 #define ADP1653_REG_SW_STROBE                     
 42 #define ADP1653_REG_SW_STROBE_SW_STROBE           
 43                                                   
 44 #define ADP1653_REG_FAULT                         
 45 #define ADP1653_REG_FAULT_FLT_SCP                 
 46 #define ADP1653_REG_FAULT_FLT_OT                  
 47 #define ADP1653_REG_FAULT_FLT_TMR                 
 48 #define ADP1653_REG_FAULT_FLT_OV                  
 49                                                   
 50 #define ADP1653_INDICATOR_INTENSITY_MIN           
 51 #define ADP1653_INDICATOR_INTENSITY_STEP          
 52 #define ADP1653_INDICATOR_INTENSITY_MAX           
 53         (ADP1653_REG_OUT_SEL_ILED_MAX * ADP165    
 54 #define ADP1653_INDICATOR_INTENSITY_uA_TO_REG(    
 55         ((a) / ADP1653_INDICATOR_INTENSITY_STE    
 56 #define ADP1653_INDICATOR_INTENSITY_REG_TO_uA(    
 57         ((a) * ADP1653_INDICATOR_INTENSITY_STE    
 58                                                   
 59 #define ADP1653_FLASH_INTENSITY_BASE              
 60 #define ADP1653_FLASH_INTENSITY_STEP              
 61 #define ADP1653_FLASH_INTENSITY_MIN               
 62         (ADP1653_FLASH_INTENSITY_BASE             
 63          + ADP1653_REG_OUT_SEL_HPLED_FLASH_MIN    
 64 #define ADP1653_FLASH_INTENSITY_MAX               
 65         (ADP1653_FLASH_INTENSITY_MIN +            
 66          (ADP1653_REG_OUT_SEL_HPLED_FLASH_MAX     
 67           ADP1653_REG_OUT_SEL_HPLED_FLASH_MIN     
 68          ADP1653_FLASH_INTENSITY_STEP)            
 69                                                   
 70 #define ADP1653_FLASH_INTENSITY_mA_TO_REG(a)      
 71         ((a) < ADP1653_FLASH_INTENSITY_BASE ?     
 72          (((a) - ADP1653_FLASH_INTENSITY_BASE)    
 73 #define ADP1653_FLASH_INTENSITY_REG_TO_mA(a)      
 74         ((a) * ADP1653_FLASH_INTENSITY_STEP +     
 75                                                   
 76 #define ADP1653_TORCH_INTENSITY_MIN               
 77         (ADP1653_FLASH_INTENSITY_BASE             
 78          + ADP1653_REG_OUT_SEL_HPLED_TORCH_MIN    
 79 #define ADP1653_TORCH_INTENSITY_MAX               
 80         (ADP1653_TORCH_INTENSITY_MIN +            
 81          (ADP1653_REG_OUT_SEL_HPLED_TORCH_MAX     
 82           ADP1653_REG_OUT_SEL_HPLED_TORCH_MIN     
 83          ADP1653_FLASH_INTENSITY_STEP)            
 84                                                   
 85 struct adp1653_platform_data {                    
 86         int (*power)(struct v4l2_subdev *sd, i    
 87                                                   
 88         u32 max_flash_timeout;          /* fla    
 89         u32 max_flash_intensity;        /* led    
 90         u32 max_torch_intensity;        /* led    
 91         u32 max_indicator_intensity;    /* ind    
 92                                                   
 93         struct gpio_desc *enable_gpio;  /* for    
 94 };                                                
 95                                                   
 96 #define to_adp1653_flash(sd)    container_of(s    
 97                                                   
 98 struct adp1653_flash {                            
 99         struct v4l2_subdev subdev;                
100         struct adp1653_platform_data *platform    
101                                                   
102         struct v4l2_ctrl_handler ctrls;           
103         struct v4l2_ctrl *led_mode;               
104         struct v4l2_ctrl *flash_timeout;          
105         struct v4l2_ctrl *flash_intensity;        
106         struct v4l2_ctrl *torch_intensity;        
107         struct v4l2_ctrl *indicator_intensity;    
108                                                   
109         struct mutex power_lock;                  
110         int power_count;                          
111         int fault;                                
112 };                                                
113                                                   
114 #endif /* ADP1653_H */                            
115                                                   

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