1 #ifndef LINUX_SPI_MAX7301_H
2 #define LINUX_SPI_MAX7301_H
4 #include <linux/gpio.h>
7 * Some registers must be read back to modify.
8 * To save time we cache them here in memory
12 u8 port_config
[8]; /* field 0 is unused */
13 u32 out_level
; /* cached output levels */
14 u32 input_pullup_active
;
15 struct gpio_chip chip
;
17 int (*write
)(struct device
*dev
, unsigned int reg
, unsigned int val
);
18 int (*read
)(struct device
*dev
, unsigned int reg
);
21 struct max7301_platform_data
{
22 /* number assigned to the first GPIO */
25 * bitmask controlling the pullup configuration,
27 * _note_ the 4 lowest bits are unused, because the first 4
28 * ports of the controller are not used, too.
30 u32 input_pullup_active
;
33 extern int __max730x_remove(struct device
*dev
);
34 extern int __max730x_probe(struct max7301
*ts
);