Olof Johansson | 62fecb7 | 2010-03-05 13:44:34 -0800 | [diff] [blame^] | 1 | #ifndef _LINUX_PCA953X_H |
| 2 | #define _LINUX_PCA953X_H |
| 3 | |
| 4 | #include <linux/types.h> |
| 5 | #include <linux/i2c.h> |
| 6 | |
eric miao | 9e60fdc | 2008-02-04 22:28:26 -0800 | [diff] [blame] | 7 | /* platform data for the PCA9539 16-bit I/O expander driver */ |
| 8 | |
Guennadi Liakhovetski | f3dc363 | 2008-02-06 01:39:03 -0800 | [diff] [blame] | 9 | struct pca953x_platform_data { |
eric miao | 9e60fdc | 2008-02-04 22:28:26 -0800 | [diff] [blame] | 10 | /* number of the first GPIO */ |
| 11 | unsigned gpio_base; |
| 12 | |
| 13 | /* initial polarity inversion setting */ |
| 14 | uint16_t invert; |
| 15 | |
| 16 | void *context; /* param to setup/teardown */ |
| 17 | |
| 18 | int (*setup)(struct i2c_client *client, |
| 19 | unsigned gpio, unsigned ngpio, |
| 20 | void *context); |
| 21 | int (*teardown)(struct i2c_client *client, |
| 22 | unsigned gpio, unsigned ngpio, |
| 23 | void *context); |
Daniel Silverstone | 77906a54 | 2009-06-17 16:26:15 -0700 | [diff] [blame] | 24 | char **names; |
eric miao | 9e60fdc | 2008-02-04 22:28:26 -0800 | [diff] [blame] | 25 | }; |
Olof Johansson | 62fecb7 | 2010-03-05 13:44:34 -0800 | [diff] [blame^] | 26 | |
| 27 | #endif /* _LINUX_PCA953X_H */ |