mirror of
				https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
				synced 2025-10-31 12:39:23 +00:00 
			
		
		
		
	 89ea8bbe9c
			
		
	
	
		89ea8bbe9c
		
	
	
	
	
		
			
			Most of the GPIO expanders controlled by the pca953x driver are able to report changes on the input pins through an *INT pin. This patch implements the irq_chip functionality (edge detection only). The driver has been tested on an Arcom Zeus. [akpm@linux-foundation.org: the compiler does inlining for us nowadays] Signed-off-by: Marc Zyngier <maz@misterjones.org> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: David Brownell <david-b@pacbell.net> Cc: Nate Case <ncase@xes-inc.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
		
			
				
	
	
		
			31 lines
		
	
	
		
			644 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			644 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #ifndef _LINUX_PCA953X_H
 | |
| #define _LINUX_PCA953X_H
 | |
| 
 | |
| #include <linux/types.h>
 | |
| #include <linux/i2c.h>
 | |
| 
 | |
| /* platform data for the PCA9539 16-bit I/O expander driver */
 | |
| 
 | |
| struct pca953x_platform_data {
 | |
| 	/* number of the first GPIO */
 | |
| 	unsigned	gpio_base;
 | |
| 
 | |
| 	/* initial polarity inversion setting */
 | |
| 	uint16_t	invert;
 | |
| 
 | |
| 	/* interrupt base */
 | |
| 	int		irq_base;
 | |
| 
 | |
| 	void		*context;	/* param to setup/teardown */
 | |
| 
 | |
| 	int		(*setup)(struct i2c_client *client,
 | |
| 				unsigned gpio, unsigned ngpio,
 | |
| 				void *context);
 | |
| 	int		(*teardown)(struct i2c_client *client,
 | |
| 				unsigned gpio, unsigned ngpio,
 | |
| 				void *context);
 | |
| 	char		**names;
 | |
| };
 | |
| 
 | |
| #endif /* _LINUX_PCA953X_H */
 |