mirror of
				https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
				synced 2025-10-27 10:38:01 +00:00 
			
		
		
		
	 73969ff0ed
			
		
	
	
		73969ff0ed
		
	
	
	
	
		
			
			This patch adds a generic driver for rotary encoders connected to GPIO pins of a system. It relies on gpiolib and generic hardware irqs. The documentation that also comes with this patch explains the concept and how to use the driver. Signed-off-by: Daniel Mack <daniel@caiaq.de> Tested-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
		
			
				
	
	
		
			14 lines
		
	
	
		
			272 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			272 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #ifndef __ROTARY_ENCODER_H__
 | |
| #define __ROTARY_ENCODER_H__
 | |
| 
 | |
| struct rotary_encoder_platform_data {
 | |
| 	unsigned int steps;
 | |
| 	unsigned int axis;
 | |
| 	unsigned int gpio_a;
 | |
| 	unsigned int gpio_b;
 | |
| 	unsigned int inverted_a;
 | |
| 	unsigned int inverted_b;
 | |
| };
 | |
| 
 | |
| #endif /* __ROTARY_ENCODER_H__ */
 |