diff options
Diffstat (limited to 'include/linux/i2c')
-rw-r--r-- | include/linux/i2c/adp5588.h | 58 | ||||
-rw-r--r-- | include/linux/i2c/apds990x.h | 79 | ||||
-rw-r--r-- | include/linux/i2c/bh1770glc.h | 53 | ||||
-rw-r--r-- | include/linux/i2c/ltc4245.h | 21 | ||||
-rw-r--r-- | include/linux/i2c/mcs.h | 34 | ||||
-rw-r--r-- | include/linux/i2c/mcs5000_ts.h | 24 | ||||
-rw-r--r-- | include/linux/i2c/pca954x.h | 47 | ||||
-rw-r--r-- | include/linux/i2c/qt602240_ts.h | 38 | ||||
-rw-r--r-- | include/linux/i2c/sx150x.h | 82 | ||||
-rw-r--r-- | include/linux/i2c/twl.h | 6 |
10 files changed, 415 insertions, 27 deletions
diff --git a/include/linux/i2c/adp5588.h b/include/linux/i2c/adp5588.h index 02c9af374741..3c5d6b6e765c 100644 --- a/include/linux/i2c/adp5588.h +++ b/include/linux/i2c/adp5588.h | |||
@@ -74,10 +74,58 @@ | |||
74 | 74 | ||
75 | #define ADP5588_DEVICE_ID_MASK 0xF | 75 | #define ADP5588_DEVICE_ID_MASK 0xF |
76 | 76 | ||
77 | /* Configuration Register1 */ | ||
78 | #define ADP5588_AUTO_INC (1 << 7) | ||
79 | #define ADP5588_GPIEM_CFG (1 << 6) | ||
80 | #define ADP5588_INT_CFG (1 << 4) | ||
81 | #define ADP5588_GPI_IEN (1 << 1) | ||
82 | |||
83 | /* Interrupt Status Register */ | ||
84 | #define ADP5588_GPI_INT (1 << 1) | ||
85 | #define ADP5588_KE_INT (1 << 0) | ||
86 | |||
87 | #define ADP5588_MAXGPIO 18 | ||
88 | #define ADP5588_BANK(offs) ((offs) >> 3) | ||
89 | #define ADP5588_BIT(offs) (1u << ((offs) & 0x7)) | ||
90 | |||
77 | /* Put one of these structures in i2c_board_info platform_data */ | 91 | /* Put one of these structures in i2c_board_info platform_data */ |
78 | 92 | ||
79 | #define ADP5588_KEYMAPSIZE 80 | 93 | #define ADP5588_KEYMAPSIZE 80 |
80 | 94 | ||
95 | #define GPI_PIN_ROW0 97 | ||
96 | #define GPI_PIN_ROW1 98 | ||
97 | #define GPI_PIN_ROW2 99 | ||
98 | #define GPI_PIN_ROW3 100 | ||
99 | #define GPI_PIN_ROW4 101 | ||
100 | #define GPI_PIN_ROW5 102 | ||
101 | #define GPI_PIN_ROW6 103 | ||
102 | #define GPI_PIN_ROW7 104 | ||
103 | #define GPI_PIN_COL0 105 | ||
104 | #define GPI_PIN_COL1 106 | ||
105 | #define GPI_PIN_COL2 107 | ||
106 | #define GPI_PIN_COL3 108 | ||
107 | #define GPI_PIN_COL4 109 | ||
108 | #define GPI_PIN_COL5 110 | ||
109 | #define GPI_PIN_COL6 111 | ||
110 | #define GPI_PIN_COL7 112 | ||
111 | #define GPI_PIN_COL8 113 | ||
112 | #define GPI_PIN_COL9 114 | ||
113 | |||
114 | #define GPI_PIN_ROW_BASE GPI_PIN_ROW0 | ||
115 | #define GPI_PIN_ROW_END GPI_PIN_ROW7 | ||
116 | #define GPI_PIN_COL_BASE GPI_PIN_COL0 | ||
117 | #define GPI_PIN_COL_END GPI_PIN_COL9 | ||
118 | |||
119 | #define GPI_PIN_BASE GPI_PIN_ROW_BASE | ||
120 | #define GPI_PIN_END GPI_PIN_COL_END | ||
121 | |||
122 | #define ADP5588_GPIMAPSIZE_MAX (GPI_PIN_END - GPI_PIN_BASE + 1) | ||
123 | |||
124 | struct adp5588_gpi_map { | ||
125 | unsigned short pin; | ||
126 | unsigned short sw_evt; | ||
127 | }; | ||
128 | |||
81 | struct adp5588_kpad_platform_data { | 129 | struct adp5588_kpad_platform_data { |
82 | int rows; /* Number of rows */ | 130 | int rows; /* Number of rows */ |
83 | int cols; /* Number of columns */ | 131 | int cols; /* Number of columns */ |
@@ -87,11 +135,17 @@ struct adp5588_kpad_platform_data { | |||
87 | unsigned en_keylock:1; /* Enable Key Lock feature */ | 135 | unsigned en_keylock:1; /* Enable Key Lock feature */ |
88 | unsigned short unlock_key1; /* Unlock Key 1 */ | 136 | unsigned short unlock_key1; /* Unlock Key 1 */ |
89 | unsigned short unlock_key2; /* Unlock Key 2 */ | 137 | unsigned short unlock_key2; /* Unlock Key 2 */ |
138 | const struct adp5588_gpi_map *gpimap; | ||
139 | unsigned short gpimapsize; | ||
140 | const struct adp5588_gpio_platform_data *gpio_data; | ||
90 | }; | 141 | }; |
91 | 142 | ||
143 | struct i2c_client; /* forward declaration */ | ||
144 | |||
92 | struct adp5588_gpio_platform_data { | 145 | struct adp5588_gpio_platform_data { |
93 | unsigned gpio_start; /* GPIO Chip base # */ | 146 | int gpio_start; /* GPIO Chip base # */ |
94 | unsigned pullup_dis_mask; /* Pull-Up Disable Mask */ | 147 | unsigned irq_base; /* interrupt base # */ |
148 | unsigned pullup_dis_mask; /* Pull-Up Disable Mask */ | ||
95 | int (*setup)(struct i2c_client *client, | 149 | int (*setup)(struct i2c_client *client, |
96 | int gpio, unsigned ngpio, | 150 | int gpio, unsigned ngpio, |
97 | void *context); | 151 | void *context); |
diff --git a/include/linux/i2c/apds990x.h b/include/linux/i2c/apds990x.h new file mode 100644 index 000000000000..d186fcc5d257 --- /dev/null +++ b/include/linux/i2c/apds990x.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * This file is part of the APDS990x sensor driver. | ||
3 | * Chip is combined proximity and ambient light sensor. | ||
4 | * | ||
5 | * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | ||
6 | * | ||
7 | * Contact: Samu Onkalo <samu.p.onkalo@nokia.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * version 2 as published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
21 | * 02110-1301 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef __APDS990X_H__ | ||
26 | #define __APDS990X_H__ | ||
27 | |||
28 | |||
29 | #define APDS_IRLED_CURR_12mA 0x3 | ||
30 | #define APDS_IRLED_CURR_25mA 0x2 | ||
31 | #define APDS_IRLED_CURR_50mA 0x1 | ||
32 | #define APDS_IRLED_CURR_100mA 0x0 | ||
33 | |||
34 | /** | ||
35 | * struct apds990x_chip_factors - defines effect of the cover window | ||
36 | * @ga: Total glass attenuation | ||
37 | * @cf1: clear channel factor 1 for raw to lux conversion | ||
38 | * @irf1: IR channel factor 1 for raw to lux conversion | ||
39 | * @cf2: clear channel factor 2 for raw to lux conversion | ||
40 | * @irf2: IR channel factor 2 for raw to lux conversion | ||
41 | * @df: device factor for conversion formulas | ||
42 | * | ||
43 | * Structure for tuning ALS calculation to match with environment. | ||
44 | * Values depend on the material above the sensor and the sensor | ||
45 | * itself. If the GA is zero, driver will use uncovered sensor default values | ||
46 | * format: decimal value * APDS_PARAM_SCALE except df which is plain integer. | ||
47 | */ | ||
48 | #define APDS_PARAM_SCALE 4096 | ||
49 | struct apds990x_chip_factors { | ||
50 | int ga; | ||
51 | int cf1; | ||
52 | int irf1; | ||
53 | int cf2; | ||
54 | int irf2; | ||
55 | int df; | ||
56 | }; | ||
57 | |||
58 | /** | ||
59 | * struct apds990x_platform_data - platform data for apsd990x.c driver | ||
60 | * @cf: chip factor data | ||
61 | * @pddrive: IR-led driving current | ||
62 | * @ppcount: number of IR pulses used for proximity estimation | ||
63 | * @setup_resources: interrupt line setup call back function | ||
64 | * @release_resources: interrupt line release call back function | ||
65 | * | ||
66 | * Proximity detection result depends heavily on correct ppcount, pdrive | ||
67 | * and cover window. | ||
68 | * | ||
69 | */ | ||
70 | |||
71 | struct apds990x_platform_data { | ||
72 | struct apds990x_chip_factors cf; | ||
73 | u8 pdrive; | ||
74 | u8 ppcount; | ||
75 | int (*setup_resources)(void); | ||
76 | int (*release_resources)(void); | ||
77 | }; | ||
78 | |||
79 | #endif | ||
diff --git a/include/linux/i2c/bh1770glc.h b/include/linux/i2c/bh1770glc.h new file mode 100644 index 000000000000..8b5e2df36c72 --- /dev/null +++ b/include/linux/i2c/bh1770glc.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * This file is part of the ROHM BH1770GLC / OSRAM SFH7770 sensor driver. | ||
3 | * Chip is combined proximity and ambient light sensor. | ||
4 | * | ||
5 | * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | ||
6 | * | ||
7 | * Contact: Samu Onkalo <samu.p.onkalo@nokia.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * version 2 as published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
21 | * 02110-1301 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef __BH1770_H__ | ||
26 | #define __BH1770_H__ | ||
27 | |||
28 | /** | ||
29 | * struct bh1770_platform_data - platform data for bh1770glc driver | ||
30 | * @led_def_curr: IR led driving current. | ||
31 | * @glass_attenuation: Attenuation factor for covering window. | ||
32 | * @setup_resources: Call back for interrupt line setup function | ||
33 | * @release_resources: Call back for interrupte line release function | ||
34 | * | ||
35 | * Example of glass attenuation: 16384 * 385 / 100 means attenuation factor | ||
36 | * of 3.85. i.e. light_above_sensor = light_above_cover_window / 3.85 | ||
37 | */ | ||
38 | |||
39 | struct bh1770_platform_data { | ||
40 | #define BH1770_LED_5mA 0 | ||
41 | #define BH1770_LED_10mA 1 | ||
42 | #define BH1770_LED_20mA 2 | ||
43 | #define BH1770_LED_50mA 3 | ||
44 | #define BH1770_LED_100mA 4 | ||
45 | #define BH1770_LED_150mA 5 | ||
46 | #define BH1770_LED_200mA 6 | ||
47 | __u8 led_def_curr; | ||
48 | #define BH1770_NEUTRAL_GA 16384 /* 16384 / 16384 = 1 */ | ||
49 | __u32 glass_attenuation; | ||
50 | int (*setup_resources)(void); | ||
51 | int (*release_resources)(void); | ||
52 | }; | ||
53 | #endif | ||
diff --git a/include/linux/i2c/ltc4245.h b/include/linux/i2c/ltc4245.h new file mode 100644 index 000000000000..56bda4be0016 --- /dev/null +++ b/include/linux/i2c/ltc4245.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * Platform Data for LTC4245 hardware monitor chip | ||
3 | * | ||
4 | * Copyright (c) 2010 Ira W. Snyder <iws@ovro.caltech.edu> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef LINUX_LTC4245_H | ||
13 | #define LINUX_LTC4245_H | ||
14 | |||
15 | #include <linux/types.h> | ||
16 | |||
17 | struct ltc4245_platform_data { | ||
18 | bool use_extra_gpios; | ||
19 | }; | ||
20 | |||
21 | #endif /* LINUX_LTC4245_H */ | ||
diff --git a/include/linux/i2c/mcs.h b/include/linux/i2c/mcs.h new file mode 100644 index 000000000000..725ae7c313ff --- /dev/null +++ b/include/linux/i2c/mcs.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 - 2010 Samsung Electronics Co.Ltd | ||
3 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
4 | * Author: HeungJun Kim <riverful.kim@samsung.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_MCS_H | ||
14 | #define __LINUX_MCS_H | ||
15 | |||
16 | #define MCS_KEY_MAP(v, c) ((((v) & 0xff) << 16) | ((c) & 0xffff)) | ||
17 | #define MCS_KEY_VAL(v) (((v) >> 16) & 0xff) | ||
18 | #define MCS_KEY_CODE(v) ((v) & 0xffff) | ||
19 | |||
20 | struct mcs_platform_data { | ||
21 | void (*cfg_pin)(void); | ||
22 | |||
23 | /* touchscreen */ | ||
24 | unsigned int x_size; | ||
25 | unsigned int y_size; | ||
26 | |||
27 | /* touchkey */ | ||
28 | const u32 *keymap; | ||
29 | unsigned int keymap_size; | ||
30 | unsigned int key_maxval; | ||
31 | bool no_autorepeat; | ||
32 | }; | ||
33 | |||
34 | #endif /* __LINUX_MCS_H */ | ||
diff --git a/include/linux/i2c/mcs5000_ts.h b/include/linux/i2c/mcs5000_ts.h deleted file mode 100644 index 5a117b5ca15e..000000000000 --- a/include/linux/i2c/mcs5000_ts.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * mcs5000_ts.h | ||
3 | * | ||
4 | * Copyright (C) 2009 Samsung Electronics Co.Ltd | ||
5 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #ifndef __LINUX_MCS5000_TS_H | ||
15 | #define __LINUX_MCS5000_TS_H | ||
16 | |||
17 | /* platform data for the MELFAS MCS-5000 touchscreen driver */ | ||
18 | struct mcs5000_ts_platform_data { | ||
19 | void (*cfg_pin)(void); | ||
20 | int x_size; | ||
21 | int y_size; | ||
22 | }; | ||
23 | |||
24 | #endif /* __LINUX_MCS5000_TS_H */ | ||
diff --git a/include/linux/i2c/pca954x.h b/include/linux/i2c/pca954x.h new file mode 100644 index 000000000000..28f1f8d5ab1f --- /dev/null +++ b/include/linux/i2c/pca954x.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * | ||
3 | * pca954x.h - I2C multiplexer/switch support | ||
4 | * | ||
5 | * Copyright (c) 2008-2009 Rodolfo Giometti <giometti@linux.it> | ||
6 | * Copyright (c) 2008-2009 Eurotech S.p.A. <info@eurotech.it> | ||
7 | * Michael Lawnick <michael.lawnick.ext@nsn.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
22 | */ | ||
23 | |||
24 | |||
25 | #ifndef _LINUX_I2C_PCA954X_H | ||
26 | #define _LINUX_I2C_PCA954X_H | ||
27 | |||
28 | /* Platform data for the PCA954x I2C multiplexers */ | ||
29 | |||
30 | /* Per channel initialisation data: | ||
31 | * @adap_id: bus number for the adapter. 0 = don't care | ||
32 | * @deselect_on_exit: set this entry to 1, if your H/W needs deselection | ||
33 | * of this channel after transaction. | ||
34 | * | ||
35 | */ | ||
36 | struct pca954x_platform_mode { | ||
37 | int adap_id; | ||
38 | unsigned int deselect_on_exit:1; | ||
39 | }; | ||
40 | |||
41 | /* Per mux/switch data, used with i2c_register_board_info */ | ||
42 | struct pca954x_platform_data { | ||
43 | struct pca954x_platform_mode *modes; | ||
44 | int num_modes; | ||
45 | }; | ||
46 | |||
47 | #endif /* _LINUX_I2C_PCA954X_H */ | ||
diff --git a/include/linux/i2c/qt602240_ts.h b/include/linux/i2c/qt602240_ts.h new file mode 100644 index 000000000000..c5033e101094 --- /dev/null +++ b/include/linux/i2c/qt602240_ts.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * AT42QT602240/ATMXT224 Touchscreen driver | ||
3 | * | ||
4 | * Copyright (C) 2010 Samsung Electronics Co.Ltd | ||
5 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_QT602240_TS_H | ||
14 | #define __LINUX_QT602240_TS_H | ||
15 | |||
16 | /* Orient */ | ||
17 | #define QT602240_NORMAL 0x0 | ||
18 | #define QT602240_DIAGONAL 0x1 | ||
19 | #define QT602240_HORIZONTAL_FLIP 0x2 | ||
20 | #define QT602240_ROTATED_90_COUNTER 0x3 | ||
21 | #define QT602240_VERTICAL_FLIP 0x4 | ||
22 | #define QT602240_ROTATED_90 0x5 | ||
23 | #define QT602240_ROTATED_180 0x6 | ||
24 | #define QT602240_DIAGONAL_COUNTER 0x7 | ||
25 | |||
26 | /* The platform data for the AT42QT602240/ATMXT224 touchscreen driver */ | ||
27 | struct qt602240_platform_data { | ||
28 | unsigned int x_line; | ||
29 | unsigned int y_line; | ||
30 | unsigned int x_size; | ||
31 | unsigned int y_size; | ||
32 | unsigned int blen; | ||
33 | unsigned int threshold; | ||
34 | unsigned int voltage; | ||
35 | unsigned char orient; | ||
36 | }; | ||
37 | |||
38 | #endif /* __LINUX_QT602240_TS_H */ | ||
diff --git a/include/linux/i2c/sx150x.h b/include/linux/i2c/sx150x.h new file mode 100644 index 000000000000..52baa79d69a7 --- /dev/null +++ b/include/linux/i2c/sx150x.h | |||
@@ -0,0 +1,82 @@ | |||
1 | /* | ||
2 | * Driver for the Semtech SX150x I2C GPIO Expanders | ||
3 | * | ||
4 | * Copyright (c) 2010, Code Aurora Forum. All rights reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 and | ||
8 | * only version 2 as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
18 | * 02110-1301, USA. | ||
19 | */ | ||
20 | #ifndef __LINUX_I2C_SX150X_H | ||
21 | #define __LINUX_I2C_SX150X_H | ||
22 | |||
23 | /** | ||
24 | * struct sx150x_platform_data - config data for SX150x driver | ||
25 | * @gpio_base: The index number of the first GPIO assigned to this | ||
26 | * GPIO expander. The expander will create a block of | ||
27 | * consecutively numbered gpios beginning at the given base, | ||
28 | * with the size of the block depending on the model of the | ||
29 | * expander chip. | ||
30 | * @oscio_is_gpo: If set to true, the driver will configure OSCIO as a GPO | ||
31 | * instead of as an oscillator, increasing the size of the | ||
32 | * GP(I)O pool created by this expander by one. The | ||
33 | * output-only GPO pin will be added at the end of the block. | ||
34 | * @io_pullup_ena: A bit-mask which enables or disables the pull-up resistor | ||
35 | * for each IO line in the expander. Setting the bit at | ||
36 | * position n will enable the pull-up for the IO at | ||
37 | * the corresponding offset. For chips with fewer than | ||
38 | * 16 IO pins, high-end bits are ignored. | ||
39 | * @io_pulldn_ena: A bit-mask which enables-or disables the pull-down | ||
40 | * resistor for each IO line in the expander. Setting the | ||
41 | * bit at position n will enable the pull-down for the IO at | ||
42 | * the corresponding offset. For chips with fewer than | ||
43 | * 16 IO pins, high-end bits are ignored. | ||
44 | * @io_open_drain_ena: A bit-mask which enables-or disables open-drain | ||
45 | * operation for each IO line in the expander. Setting the | ||
46 | * bit at position n enables open-drain operation for | ||
47 | * the IO at the corresponding offset. Clearing the bit | ||
48 | * enables regular push-pull operation for that IO. | ||
49 | * For chips with fewer than 16 IO pins, high-end bits | ||
50 | * are ignored. | ||
51 | * @io_polarity: A bit-mask which enables polarity inversion for each IO line | ||
52 | * in the expander. Setting the bit at position n inverts | ||
53 | * the polarity of that IO line, while clearing it results | ||
54 | * in normal polarity. For chips with fewer than 16 IO pins, | ||
55 | * high-end bits are ignored. | ||
56 | * @irq_summary: The 'summary IRQ' line to which the GPIO expander's INT line | ||
57 | * is connected, via which it reports interrupt events | ||
58 | * across all GPIO lines. This must be a real, | ||
59 | * pre-existing IRQ line. | ||
60 | * Setting this value < 0 disables the irq_chip functionality | ||
61 | * of the driver. | ||
62 | * @irq_base: The first 'virtual IRQ' line at which our block of GPIO-based | ||
63 | * IRQ lines will appear. Similarly to gpio_base, the expander | ||
64 | * will create a block of irqs beginning at this number. | ||
65 | * This value is ignored if irq_summary is < 0. | ||
66 | * @reset_during_probe: If set to true, the driver will trigger a full | ||
67 | * reset of the chip at the beginning of the probe | ||
68 | * in order to place it in a known state. | ||
69 | */ | ||
70 | struct sx150x_platform_data { | ||
71 | unsigned gpio_base; | ||
72 | bool oscio_is_gpo; | ||
73 | u16 io_pullup_ena; | ||
74 | u16 io_pulldn_ena; | ||
75 | u16 io_open_drain_ena; | ||
76 | u16 io_polarity; | ||
77 | int irq_summary; | ||
78 | unsigned irq_base; | ||
79 | bool reset_during_probe; | ||
80 | }; | ||
81 | |||
82 | #endif /* __LINUX_I2C_SX150X_H */ | ||
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 6de90bfc6acd..4793d8a7f480 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
@@ -553,8 +553,12 @@ extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts); | |||
553 | extern int twl4030_remove_script(u8 flags); | 553 | extern int twl4030_remove_script(u8 flags); |
554 | 554 | ||
555 | struct twl4030_codec_audio_data { | 555 | struct twl4030_codec_audio_data { |
556 | unsigned int audio_mclk; | 556 | unsigned int audio_mclk; /* not used, will be removed */ |
557 | unsigned int digimic_delay; /* in ms */ | ||
557 | unsigned int ramp_delay_value; | 558 | unsigned int ramp_delay_value; |
559 | unsigned int offset_cncl_path; | ||
560 | unsigned int check_defaults:1; | ||
561 | unsigned int reset_registers:1; | ||
558 | unsigned int hs_extmute:1; | 562 | unsigned int hs_extmute:1; |
559 | void (*set_hs_extmute)(int mute); | 563 | void (*set_hs_extmute)(int mute); |
560 | }; | 564 | }; |