aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/spi/max7301.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/spi/max7301.h')
-rw-r--r--include/linux/spi/max7301.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/spi/max7301.h b/include/linux/spi/max7301.h
index 6dfd83f19b4b..bcaa2f762cc1 100644
--- a/include/linux/spi/max7301.h
+++ b/include/linux/spi/max7301.h
@@ -1,9 +1,35 @@
1#ifndef LINUX_SPI_MAX7301_H 1#ifndef LINUX_SPI_MAX7301_H
2#define LINUX_SPI_MAX7301_H 2#define LINUX_SPI_MAX7301_H
3 3
4#include <linux/gpio.h>
5
6/*
7 * Some registers must be read back to modify.
8 * To save time we cache them here in memory
9 */
10struct max7301 {
11 struct mutex lock;
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;
16 struct device *dev;
17 int (*write)(struct device *dev, unsigned int reg, unsigned int val);
18 int (*read)(struct device *dev, unsigned int reg);
19};
20
4struct max7301_platform_data { 21struct max7301_platform_data {
5 /* number assigned to the first GPIO */ 22 /* number assigned to the first GPIO */
6 unsigned base; 23 unsigned base;
24 /*
25 * bitmask controlling the pullup configuration,
26 *
27 * _note_ the 4 lowest bits are unused, because the first 4
28 * ports of the controller are not used, too.
29 */
30 u32 input_pullup_active;
7}; 31};
8 32
33extern int __max730x_remove(struct device *dev);
34extern int __max730x_probe(struct max7301 *ts);
9#endif 35#endif