lis3lv02d: axis remap and resource setup/release
Add the possibility to remap axes via platform data. Function pointers for resource setup and release purposes Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Acked-by: Éric Piel <eric.piel@tremplin-utc.net> Cc: Pavel Machek <pavel@ucw.cz> Cc: Jean Delvare <khali@linux-fr.org> Cc: "Trisal, Kalhan" <kalhan.trisal@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
		
					parent
					
						
							
								ddcaccbc17
							
						
					
				
			
			
				commit
				
					
						e40d6eaa79
					
				
			
		
					 1 changed files with 12 additions and 0 deletions
				
			
		| 
						 | 
					@ -43,6 +43,18 @@ struct lis3lv02d_platform_data {
 | 
				
			||||||
#define LIS3_WAKEUP_Z_HI	(1 << 5)
 | 
					#define LIS3_WAKEUP_Z_HI	(1 << 5)
 | 
				
			||||||
	unsigned char wakeup_flags;
 | 
						unsigned char wakeup_flags;
 | 
				
			||||||
	unsigned char wakeup_thresh;
 | 
						unsigned char wakeup_thresh;
 | 
				
			||||||
 | 
					#define LIS3_NO_MAP		0
 | 
				
			||||||
 | 
					#define LIS3_DEV_X		1
 | 
				
			||||||
 | 
					#define LIS3_DEV_Y		2
 | 
				
			||||||
 | 
					#define LIS3_DEV_Z		3
 | 
				
			||||||
 | 
					#define LIS3_INV_DEV_X	       -1
 | 
				
			||||||
 | 
					#define LIS3_INV_DEV_Y	       -2
 | 
				
			||||||
 | 
					#define LIS3_INV_DEV_Z	       -3
 | 
				
			||||||
 | 
						s8 axis_x;
 | 
				
			||||||
 | 
						s8 axis_y;
 | 
				
			||||||
 | 
						s8 axis_z;
 | 
				
			||||||
 | 
						int (*setup_resources)(void);
 | 
				
			||||||
 | 
						int (*release_resources)(void);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* __LIS3LV02D_H_ */
 | 
					#endif /* __LIS3LV02D_H_ */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue