]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
62fecb70 OJ |
2 | #ifndef _LINUX_PCA953X_H |
3 | #define _LINUX_PCA953X_H | |
4 | ||
5 | #include <linux/types.h> | |
6 | #include <linux/i2c.h> | |
7 | ||
9e60fdcf | 8 | /* platform data for the PCA9539 16-bit I/O expander driver */ |
9 | ||
f3dc3630 | 10 | struct pca953x_platform_data { |
9e60fdcf | 11 | /* number of the first GPIO */ |
12 | unsigned gpio_base; | |
13 | ||
14 | /* initial polarity inversion setting */ | |
6a7b36aa | 15 | u32 invert; |
9e60fdcf | 16 | |
89ea8bbe MZ |
17 | /* interrupt base */ |
18 | int irq_base; | |
19 | ||
9e60fdcf | 20 | void *context; /* param to setup/teardown */ |
21 | ||
22 | int (*setup)(struct i2c_client *client, | |
23 | unsigned gpio, unsigned ngpio, | |
24 | void *context); | |
25 | int (*teardown)(struct i2c_client *client, | |
26 | unsigned gpio, unsigned ngpio, | |
27 | void *context); | |
62154991 | 28 | const char *const *names; |
9e60fdcf | 29 | }; |
62fecb70 OJ |
30 | |
31 | #endif /* _LINUX_PCA953X_H */ |