diff options
Diffstat (limited to 'include/linux/i2c')
| -rw-r--r-- | include/linux/i2c/adp5588.h | 37 | ||||
| -rw-r--r-- | include/linux/i2c/adp8860.h | 154 | ||||
| -rw-r--r-- | include/linux/i2c/ltc4245.h | 21 | ||||
| -rw-r--r-- | include/linux/i2c/max732x.h | 3 | ||||
| -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/pca953x.h | 13 | ||||
| -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 | 40 |
11 files changed, 458 insertions, 35 deletions
diff --git a/include/linux/i2c/adp5588.h b/include/linux/i2c/adp5588.h index 02c9af374741..269181b8f623 100644 --- a/include/linux/i2c/adp5588.h +++ b/include/linux/i2c/adp5588.h | |||
| @@ -78,6 +78,40 @@ | |||
| 78 | 78 | ||
| 79 | #define ADP5588_KEYMAPSIZE 80 | 79 | #define ADP5588_KEYMAPSIZE 80 |
| 80 | 80 | ||
| 81 | #define GPI_PIN_ROW0 97 | ||
| 82 | #define GPI_PIN_ROW1 98 | ||
| 83 | #define GPI_PIN_ROW2 99 | ||
| 84 | #define GPI_PIN_ROW3 100 | ||
| 85 | #define GPI_PIN_ROW4 101 | ||
| 86 | #define GPI_PIN_ROW5 102 | ||
| 87 | #define GPI_PIN_ROW6 103 | ||
| 88 | #define GPI_PIN_ROW7 104 | ||
| 89 | #define GPI_PIN_COL0 105 | ||
| 90 | #define GPI_PIN_COL1 106 | ||
| 91 | #define GPI_PIN_COL2 107 | ||
| 92 | #define GPI_PIN_COL3 108 | ||
| 93 | #define GPI_PIN_COL4 109 | ||
| 94 | #define GPI_PIN_COL5 110 | ||
| 95 | #define GPI_PIN_COL6 111 | ||
| 96 | #define GPI_PIN_COL7 112 | ||
| 97 | #define GPI_PIN_COL8 113 | ||
| 98 | #define GPI_PIN_COL9 114 | ||
| 99 | |||
| 100 | #define GPI_PIN_ROW_BASE GPI_PIN_ROW0 | ||
| 101 | #define GPI_PIN_ROW_END GPI_PIN_ROW7 | ||
| 102 | #define GPI_PIN_COL_BASE GPI_PIN_COL0 | ||
| 103 | #define GPI_PIN_COL_END GPI_PIN_COL9 | ||
| 104 | |||
| 105 | #define GPI_PIN_BASE GPI_PIN_ROW_BASE | ||
| 106 | #define GPI_PIN_END GPI_PIN_COL_END | ||
| 107 | |||
| 108 | #define ADP5588_GPIMAPSIZE_MAX (GPI_PIN_END - GPI_PIN_BASE + 1) | ||
| 109 | |||
| 110 | struct adp5588_gpi_map { | ||
| 111 | unsigned short pin; | ||
| 112 | unsigned short sw_evt; | ||
| 113 | }; | ||
| 114 | |||
| 81 | struct adp5588_kpad_platform_data { | 115 | struct adp5588_kpad_platform_data { |
| 82 | int rows; /* Number of rows */ | 116 | int rows; /* Number of rows */ |
| 83 | int cols; /* Number of columns */ | 117 | int cols; /* Number of columns */ |
| @@ -87,6 +121,9 @@ struct adp5588_kpad_platform_data { | |||
| 87 | unsigned en_keylock:1; /* Enable Key Lock feature */ | 121 | unsigned en_keylock:1; /* Enable Key Lock feature */ |
| 88 | unsigned short unlock_key1; /* Unlock Key 1 */ | 122 | unsigned short unlock_key1; /* Unlock Key 1 */ |
| 89 | unsigned short unlock_key2; /* Unlock Key 2 */ | 123 | unsigned short unlock_key2; /* Unlock Key 2 */ |
| 124 | const struct adp5588_gpi_map *gpimap; | ||
| 125 | unsigned short gpimapsize; | ||
| 126 | const struct adp5588_gpio_platform_data *gpio_data; | ||
| 90 | }; | 127 | }; |
| 91 | 128 | ||
| 92 | struct adp5588_gpio_platform_data { | 129 | struct adp5588_gpio_platform_data { |
diff --git a/include/linux/i2c/adp8860.h b/include/linux/i2c/adp8860.h new file mode 100644 index 000000000000..0b4d39855c91 --- /dev/null +++ b/include/linux/i2c/adp8860.h | |||
| @@ -0,0 +1,154 @@ | |||
| 1 | /* | ||
| 2 | * Definitions and platform data for Analog Devices | ||
| 3 | * Backlight drivers ADP8860 | ||
| 4 | * | ||
| 5 | * Copyright 2009-2010 Analog Devices Inc. | ||
| 6 | * | ||
| 7 | * Licensed under the GPL-2 or later. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __LINUX_I2C_ADP8860_H | ||
| 11 | #define __LINUX_I2C_ADP8860_H | ||
| 12 | |||
| 13 | #include <linux/leds.h> | ||
| 14 | #include <linux/types.h> | ||
| 15 | |||
| 16 | #define ID_ADP8860 8860 | ||
| 17 | |||
| 18 | #define ADP8860_MAX_BRIGHTNESS 0x7F | ||
| 19 | #define FLAG_OFFT_SHIFT 8 | ||
| 20 | |||
| 21 | /* | ||
| 22 | * LEDs subdevice platform data | ||
| 23 | */ | ||
| 24 | |||
| 25 | #define ADP8860_LED_DIS_BLINK (0 << FLAG_OFFT_SHIFT) | ||
| 26 | #define ADP8860_LED_OFFT_600ms (1 << FLAG_OFFT_SHIFT) | ||
| 27 | #define ADP8860_LED_OFFT_1200ms (2 << FLAG_OFFT_SHIFT) | ||
| 28 | #define ADP8860_LED_OFFT_1800ms (3 << FLAG_OFFT_SHIFT) | ||
| 29 | |||
| 30 | #define ADP8860_LED_ONT_200ms 0 | ||
| 31 | #define ADP8860_LED_ONT_600ms 1 | ||
| 32 | #define ADP8860_LED_ONT_800ms 2 | ||
| 33 | #define ADP8860_LED_ONT_1200ms 3 | ||
| 34 | |||
| 35 | #define ADP8860_LED_D7 (7) | ||
| 36 | #define ADP8860_LED_D6 (6) | ||
| 37 | #define ADP8860_LED_D5 (5) | ||
| 38 | #define ADP8860_LED_D4 (4) | ||
| 39 | #define ADP8860_LED_D3 (3) | ||
| 40 | #define ADP8860_LED_D2 (2) | ||
| 41 | #define ADP8860_LED_D1 (1) | ||
| 42 | |||
| 43 | /* | ||
| 44 | * Backlight subdevice platform data | ||
| 45 | */ | ||
| 46 | |||
| 47 | #define ADP8860_BL_D7 (1 << 6) | ||
| 48 | #define ADP8860_BL_D6 (1 << 5) | ||
| 49 | #define ADP8860_BL_D5 (1 << 4) | ||
| 50 | #define ADP8860_BL_D4 (1 << 3) | ||
| 51 | #define ADP8860_BL_D3 (1 << 2) | ||
| 52 | #define ADP8860_BL_D2 (1 << 1) | ||
| 53 | #define ADP8860_BL_D1 (1 << 0) | ||
| 54 | |||
| 55 | #define ADP8860_FADE_T_DIS 0 /* Fade Timer Disabled */ | ||
| 56 | #define ADP8860_FADE_T_300ms 1 /* 0.3 Sec */ | ||
| 57 | #define ADP8860_FADE_T_600ms 2 | ||
| 58 | #define ADP8860_FADE_T_900ms 3 | ||
| 59 | #define ADP8860_FADE_T_1200ms 4 | ||
| 60 | #define ADP8860_FADE_T_1500ms 5 | ||
| 61 | #define ADP8860_FADE_T_1800ms 6 | ||
| 62 | #define ADP8860_FADE_T_2100ms 7 | ||
| 63 | #define ADP8860_FADE_T_2400ms 8 | ||
| 64 | #define ADP8860_FADE_T_2700ms 9 | ||
| 65 | #define ADP8860_FADE_T_3000ms 10 | ||
| 66 | #define ADP8860_FADE_T_3500ms 11 | ||
| 67 | #define ADP8860_FADE_T_4000ms 12 | ||
| 68 | #define ADP8860_FADE_T_4500ms 13 | ||
| 69 | #define ADP8860_FADE_T_5000ms 14 | ||
| 70 | #define ADP8860_FADE_T_5500ms 15 /* 5.5 Sec */ | ||
| 71 | |||
| 72 | #define ADP8860_FADE_LAW_LINEAR 0 | ||
| 73 | #define ADP8860_FADE_LAW_SQUARE 1 | ||
| 74 | #define ADP8860_FADE_LAW_CUBIC1 2 | ||
| 75 | #define ADP8860_FADE_LAW_CUBIC2 3 | ||
| 76 | |||
| 77 | #define ADP8860_BL_AMBL_FILT_80ms 0 /* Light sensor filter time */ | ||
| 78 | #define ADP8860_BL_AMBL_FILT_160ms 1 | ||
| 79 | #define ADP8860_BL_AMBL_FILT_320ms 2 | ||
| 80 | #define ADP8860_BL_AMBL_FILT_640ms 3 | ||
| 81 | #define ADP8860_BL_AMBL_FILT_1280ms 4 | ||
| 82 | #define ADP8860_BL_AMBL_FILT_2560ms 5 | ||
| 83 | #define ADP8860_BL_AMBL_FILT_5120ms 6 | ||
| 84 | #define ADP8860_BL_AMBL_FILT_10240ms 7 /* 10.24 sec */ | ||
| 85 | |||
| 86 | /* | ||
| 87 | * Blacklight current 0..30mA | ||
| 88 | */ | ||
| 89 | #define ADP8860_BL_CUR_mA(I) ((I * 127) / 30) | ||
| 90 | |||
| 91 | /* | ||
| 92 | * L2 comparator current 0..1106uA | ||
| 93 | */ | ||
| 94 | #define ADP8860_L2_COMP_CURR_uA(I) ((I * 255) / 1106) | ||
| 95 | |||
| 96 | /* | ||
| 97 | * L3 comparator current 0..138uA | ||
| 98 | */ | ||
| 99 | #define ADP8860_L3_COMP_CURR_uA(I) ((I * 255) / 138) | ||
| 100 | |||
| 101 | struct adp8860_backlight_platform_data { | ||
| 102 | u8 bl_led_assign; /* 1 = Backlight 0 = Individual LED */ | ||
| 103 | |||
| 104 | u8 bl_fade_in; /* Backlight Fade-In Timer */ | ||
| 105 | u8 bl_fade_out; /* Backlight Fade-Out Timer */ | ||
| 106 | u8 bl_fade_law; /* fade-on/fade-off transfer characteristic */ | ||
| 107 | |||
| 108 | u8 en_ambl_sens; /* 1 = enable ambient light sensor */ | ||
| 109 | u8 abml_filt; /* Light sensor filter time */ | ||
| 110 | |||
| 111 | u8 l1_daylight_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
| 112 | u8 l1_daylight_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
| 113 | u8 l2_office_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
| 114 | u8 l2_office_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
| 115 | u8 l3_dark_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
| 116 | u8 l3_dark_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
| 117 | |||
| 118 | u8 l2_trip; /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */ | ||
| 119 | u8 l2_hyst; /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */ | ||
| 120 | u8 l3_trip; /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */ | ||
| 121 | u8 l3_hyst; /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */ | ||
| 122 | |||
| 123 | /** | ||
| 124 | * Independent Current Sinks / LEDS | ||
| 125 | * Sinks not assigned to the Backlight can be exposed to | ||
| 126 | * user space using the LEDS CLASS interface | ||
| 127 | */ | ||
| 128 | |||
| 129 | int num_leds; | ||
| 130 | struct led_info *leds; | ||
| 131 | u8 led_fade_in; /* LED Fade-In Timer */ | ||
| 132 | u8 led_fade_out; /* LED Fade-Out Timer */ | ||
| 133 | u8 led_fade_law; /* fade-on/fade-off transfer characteristic */ | ||
| 134 | u8 led_on_time; | ||
| 135 | |||
| 136 | /** | ||
| 137 | * Gain down disable. Setting this option does not allow the | ||
| 138 | * charge pump to switch to lower gains. NOT AVAILABLE on ADP8860 | ||
| 139 | * 1 = the charge pump doesn't switch down in gain until all LEDs are 0. | ||
| 140 | * The charge pump switches up in gain as needed. This feature is | ||
| 141 | * useful if the ADP8863 charge pump is used to drive an external load. | ||
| 142 | * This feature must be used when utilizing small fly capacitors | ||
| 143 | * (0402 or smaller). | ||
| 144 | * 0 = the charge pump automatically switches up and down in gain. | ||
| 145 | * This provides optimal efficiency, but is not suitable for driving | ||
| 146 | * loads that are not connected through the ADP8863 diode drivers. | ||
| 147 | * Additionally, the charge pump fly capacitors should be low ESR | ||
| 148 | * and sized 0603 or greater. | ||
| 149 | */ | ||
| 150 | |||
| 151 | u8 gdwn_dis; | ||
| 152 | }; | ||
| 153 | |||
| 154 | #endif /* __LINUX_I2C_ADP8860_H */ | ||
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/max732x.h b/include/linux/i2c/max732x.h index e10336631c62..c04bac8bf2fe 100644 --- a/include/linux/i2c/max732x.h +++ b/include/linux/i2c/max732x.h | |||
| @@ -7,6 +7,9 @@ struct max732x_platform_data { | |||
| 7 | /* number of the first GPIO */ | 7 | /* number of the first GPIO */ |
| 8 | unsigned gpio_base; | 8 | unsigned gpio_base; |
| 9 | 9 | ||
| 10 | /* interrupt base */ | ||
| 11 | int irq_base; | ||
| 12 | |||
| 10 | void *context; /* param to setup/teardown */ | 13 | void *context; /* param to setup/teardown */ |
| 11 | 14 | ||
| 12 | int (*setup)(struct i2c_client *client, | 15 | int (*setup)(struct i2c_client *client, |
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/pca953x.h b/include/linux/i2c/pca953x.h index 81736d6a8db7..139ba52667c8 100644 --- a/include/linux/i2c/pca953x.h +++ b/include/linux/i2c/pca953x.h | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | #ifndef _LINUX_PCA953X_H | ||
| 2 | #define _LINUX_PCA953X_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | #include <linux/i2c.h> | ||
| 6 | |||
| 1 | /* platform data for the PCA9539 16-bit I/O expander driver */ | 7 | /* platform data for the PCA9539 16-bit I/O expander driver */ |
| 2 | 8 | ||
| 3 | struct pca953x_platform_data { | 9 | struct pca953x_platform_data { |
| @@ -7,6 +13,9 @@ struct pca953x_platform_data { | |||
| 7 | /* initial polarity inversion setting */ | 13 | /* initial polarity inversion setting */ |
| 8 | uint16_t invert; | 14 | uint16_t invert; |
| 9 | 15 | ||
| 16 | /* interrupt base */ | ||
| 17 | int irq_base; | ||
| 18 | |||
| 10 | void *context; /* param to setup/teardown */ | 19 | void *context; /* param to setup/teardown */ |
| 11 | 20 | ||
| 12 | int (*setup)(struct i2c_client *client, | 21 | int (*setup)(struct i2c_client *client, |
| @@ -15,5 +24,7 @@ struct pca953x_platform_data { | |||
| 15 | int (*teardown)(struct i2c_client *client, | 24 | int (*teardown)(struct i2c_client *client, |
| 16 | unsigned gpio, unsigned ngpio, | 25 | unsigned gpio, unsigned ngpio, |
| 17 | void *context); | 26 | void *context); |
| 18 | char **names; | 27 | const char *const *names; |
| 19 | }; | 28 | }; |
| 29 | |||
| 30 | #endif /* _LINUX_PCA953X_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 bf1c5be1f5b6..6de90bfc6acd 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
| @@ -80,6 +80,11 @@ | |||
| 80 | #define TWL_MODULE_PM_MASTER TWL4030_MODULE_PM_MASTER | 80 | #define TWL_MODULE_PM_MASTER TWL4030_MODULE_PM_MASTER |
| 81 | #define TWL_MODULE_PM_RECEIVER TWL4030_MODULE_PM_RECEIVER | 81 | #define TWL_MODULE_PM_RECEIVER TWL4030_MODULE_PM_RECEIVER |
| 82 | #define TWL_MODULE_RTC TWL4030_MODULE_RTC | 82 | #define TWL_MODULE_RTC TWL4030_MODULE_RTC |
| 83 | #define TWL_MODULE_PWM TWL4030_MODULE_PWM0 | ||
| 84 | |||
| 85 | #define TWL6030_MODULE_ID0 0x0D | ||
| 86 | #define TWL6030_MODULE_ID1 0x0E | ||
| 87 | #define TWL6030_MODULE_ID2 0x0F | ||
| 83 | 88 | ||
| 84 | #define GPIO_INTR_OFFSET 0 | 89 | #define GPIO_INTR_OFFSET 0 |
| 85 | #define KEYPAD_INTR_OFFSET 1 | 90 | #define KEYPAD_INTR_OFFSET 1 |
| @@ -239,6 +244,21 @@ int twl6030_interrupt_mask(u8 bit_mask, u8 offset); | |||
| 239 | 244 | ||
| 240 | /*----------------------------------------------------------------------*/ | 245 | /*----------------------------------------------------------------------*/ |
| 241 | 246 | ||
| 247 | /*Interface Bit Register (INTBR) offsets | ||
| 248 | *(Use TWL_4030_MODULE_INTBR) | ||
| 249 | */ | ||
| 250 | |||
| 251 | #define REG_GPPUPDCTR1 0x0F | ||
| 252 | |||
| 253 | /*I2C1 and I2C4(SR) SDA/SCL pull-up control bits */ | ||
| 254 | |||
| 255 | #define I2C_SCL_CTRL_PU BIT(0) | ||
| 256 | #define I2C_SDA_CTRL_PU BIT(2) | ||
| 257 | #define SR_I2C_SCL_CTRL_PU BIT(4) | ||
| 258 | #define SR_I2C_SDA_CTRL_PU BIT(6) | ||
| 259 | |||
| 260 | /*----------------------------------------------------------------------*/ | ||
| 261 | |||
| 242 | /* | 262 | /* |
| 243 | * Keypad register offsets (use TWL4030_MODULE_KEYPAD) | 263 | * Keypad register offsets (use TWL4030_MODULE_KEYPAD) |
| 244 | * ... SIH/interrupt only | 264 | * ... SIH/interrupt only |
| @@ -476,7 +496,7 @@ struct twl4030_madc_platform_data { | |||
| 476 | int irq_line; | 496 | int irq_line; |
| 477 | }; | 497 | }; |
| 478 | 498 | ||
| 479 | /* Boards have uniqe mappings of {row, col} --> keycode. | 499 | /* Boards have unique mappings of {row, col} --> keycode. |
| 480 | * Column and row are 8 bits each, but range only from 0..7. | 500 | * Column and row are 8 bits each, but range only from 0..7. |
| 481 | * a PERSISTENT_KEY is "always on" and never reported. | 501 | * a PERSISTENT_KEY is "always on" and never reported. |
| 482 | */ | 502 | */ |
| @@ -530,6 +550,7 @@ struct twl4030_power_data { | |||
| 530 | }; | 550 | }; |
| 531 | 551 | ||
| 532 | extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts); | 552 | extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts); |
| 553 | extern int twl4030_remove_script(u8 flags); | ||
| 533 | 554 | ||
| 534 | struct twl4030_codec_audio_data { | 555 | struct twl4030_codec_audio_data { |
| 535 | unsigned int audio_mclk; | 556 | unsigned int audio_mclk; |
| @@ -547,6 +568,10 @@ struct twl4030_codec_data { | |||
| 547 | unsigned int audio_mclk; | 568 | unsigned int audio_mclk; |
| 548 | struct twl4030_codec_audio_data *audio; | 569 | struct twl4030_codec_audio_data *audio; |
| 549 | struct twl4030_codec_vibra_data *vibra; | 570 | struct twl4030_codec_vibra_data *vibra; |
| 571 | |||
| 572 | /* twl6040 */ | ||
| 573 | int audpwron_gpio; /* audio power-on gpio */ | ||
| 574 | int naudint_irq; /* audio interrupt */ | ||
| 550 | }; | 575 | }; |
| 551 | 576 | ||
| 552 | struct twl4030_platform_data { | 577 | struct twl4030_platform_data { |
| @@ -601,12 +626,7 @@ int twl4030_sih_setup(int module); | |||
| 601 | #define TWL4030_VAUX3_DEV_GRP 0x1F | 626 | #define TWL4030_VAUX3_DEV_GRP 0x1F |
| 602 | #define TWL4030_VAUX3_DEDICATED 0x22 | 627 | #define TWL4030_VAUX3_DEDICATED 0x22 |
| 603 | 628 | ||
| 604 | #if defined(CONFIG_TWL4030_BCI_BATTERY) || \ | 629 | static inline int twl4030charger_usb_en(int enable) { return 0; } |
| 605 | defined(CONFIG_TWL4030_BCI_BATTERY_MODULE) | ||
| 606 | extern int twl4030charger_usb_en(int enable); | ||
| 607 | #else | ||
| 608 | static inline int twl4030charger_usb_en(int enable) { return 0; } | ||
| 609 | #endif | ||
| 610 | 630 | ||
| 611 | /*----------------------------------------------------------------------*/ | 631 | /*----------------------------------------------------------------------*/ |
| 612 | 632 | ||
| @@ -644,15 +664,15 @@ int twl4030_sih_setup(int module); | |||
| 644 | #define TWL4030_REG_VUSB3V1 19 | 664 | #define TWL4030_REG_VUSB3V1 19 |
| 645 | 665 | ||
| 646 | /* TWL6030 SMPS/LDO's */ | 666 | /* TWL6030 SMPS/LDO's */ |
| 647 | /* EXTERNAL dc-to-dc buck convertor contollable via SR */ | 667 | /* EXTERNAL dc-to-dc buck convertor controllable via SR */ |
| 648 | #define TWL6030_REG_VDD1 30 | 668 | #define TWL6030_REG_VDD1 30 |
| 649 | #define TWL6030_REG_VDD2 31 | 669 | #define TWL6030_REG_VDD2 31 |
| 650 | #define TWL6030_REG_VDD3 32 | 670 | #define TWL6030_REG_VDD3 32 |
| 651 | 671 | ||
| 652 | /* Non SR compliant dc-to-dc buck convertors */ | 672 | /* Non SR compliant dc-to-dc buck convertors */ |
| 653 | #define TWL6030_REG_VMEM 33 | 673 | #define TWL6030_REG_VMEM 33 |
| 654 | #define TWL6030_REG_V2V1 34 | 674 | #define TWL6030_REG_V2V1 34 |
| 655 | #define TWL6030_REG_V1V29 35 | 675 | #define TWL6030_REG_V1V29 35 |
| 656 | #define TWL6030_REG_V1V8 36 | 676 | #define TWL6030_REG_V1V8 36 |
| 657 | 677 | ||
| 658 | /* EXTERNAL LDOs */ | 678 | /* EXTERNAL LDOs */ |
