blob: d5c5a60c8a0b1a2d513b8c19e060c4b8d1d94bd5 [file] [log] [blame]
Olof Johansson62fecb72010-03-05 13:44:34 -08001#ifndef _LINUX_PCA953X_H
2#define _LINUX_PCA953X_H
3
4#include <linux/types.h>
5#include <linux/i2c.h>
6
eric miao9e60fdc2008-02-04 22:28:26 -08007/* platform data for the PCA9539 16-bit I/O expander driver */
8
Guennadi Liakhovetskif3dc3632008-02-06 01:39:03 -08009struct pca953x_platform_data {
eric miao9e60fdc2008-02-04 22:28:26 -080010 /* number of the first GPIO */
11 unsigned gpio_base;
12
13 /* initial polarity inversion setting */
14 uint16_t invert;
15
Marc Zyngier89ea8bb2010-03-05 13:44:36 -080016 /* interrupt base */
17 int irq_base;
18
eric miao9e60fdc2008-02-04 22:28:26 -080019 void *context; /* param to setup/teardown */
20
21 int (*setup)(struct i2c_client *client,
22 unsigned gpio, unsigned ngpio,
23 void *context);
24 int (*teardown)(struct i2c_client *client,
25 unsigned gpio, unsigned ngpio,
26 void *context);
Daniel Silverstone77906a542009-06-17 16:26:15 -070027 char **names;
eric miao9e60fdc2008-02-04 22:28:26 -080028};
Olof Johansson62fecb72010-03-05 13:44:34 -080029
30#endif /* _LINUX_PCA953X_H */