diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-07-27 03:54:47 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-07-27 03:54:47 -0400 |
| commit | aa7eb8e78d8ecd6cd0475d86ea8385ff9cb47ece (patch) | |
| tree | 3f9e98fadd5124fb05e8f6f9b06aa23698d4f215 /include/linux/input | |
| parent | cca8edfd2ec2a34d9f50f593bc753bb11e1bc1f5 (diff) | |
| parent | 3c6b50141ef9f0a8844bf1357b80c0cdf518bf05 (diff) | |
Merge branch 'next' into for-linus
Diffstat (limited to 'include/linux/input')
| -rw-r--r-- | include/linux/input/kxtj9.h | 70 | ||||
| -rw-r--r-- | include/linux/input/pmic8xxx-keypad.h | 52 | ||||
| -rw-r--r-- | include/linux/input/pmic8xxx-pwrkey.h | 31 |
3 files changed, 153 insertions, 0 deletions
diff --git a/include/linux/input/kxtj9.h b/include/linux/input/kxtj9.h new file mode 100644 index 000000000000..f6bac89537b8 --- /dev/null +++ b/include/linux/input/kxtj9.h | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 Kionix, Inc. | ||
| 3 | * Written by Chris Hudson <chudson@kionix.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
| 17 | * 02111-1307, USA | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef __KXTJ9_H__ | ||
| 21 | #define __KXTJ9_H__ | ||
| 22 | |||
| 23 | #define KXTJ9_I2C_ADDR 0x0F | ||
| 24 | |||
| 25 | struct kxtj9_platform_data { | ||
| 26 | unsigned int min_interval; /* minimum poll interval (in milli-seconds) */ | ||
| 27 | |||
| 28 | /* | ||
| 29 | * By default, x is axis 0, y is axis 1, z is axis 2; these can be | ||
| 30 | * changed to account for sensor orientation within the host device. | ||
| 31 | */ | ||
| 32 | u8 axis_map_x; | ||
| 33 | u8 axis_map_y; | ||
| 34 | u8 axis_map_z; | ||
| 35 | |||
| 36 | /* | ||
| 37 | * Each axis can be negated to account for sensor orientation within | ||
| 38 | * the host device. | ||
| 39 | */ | ||
| 40 | bool negate_x; | ||
| 41 | bool negate_y; | ||
| 42 | bool negate_z; | ||
| 43 | |||
| 44 | /* CTRL_REG1: set resolution, g-range, data ready enable */ | ||
| 45 | /* Output resolution: 8-bit valid or 12-bit valid */ | ||
| 46 | #define RES_8BIT 0 | ||
| 47 | #define RES_12BIT (1 << 6) | ||
| 48 | u8 res_12bit; | ||
| 49 | /* Output g-range: +/-2g, 4g, or 8g */ | ||
| 50 | #define KXTJ9_G_2G 0 | ||
| 51 | #define KXTJ9_G_4G (1 << 3) | ||
| 52 | #define KXTJ9_G_8G (1 << 4) | ||
| 53 | u8 g_range; | ||
| 54 | |||
| 55 | /* DATA_CTRL_REG: controls the output data rate of the part */ | ||
| 56 | #define ODR12_5F 0 | ||
| 57 | #define ODR25F 1 | ||
| 58 | #define ODR50F 2 | ||
| 59 | #define ODR100F 3 | ||
| 60 | #define ODR200F 4 | ||
| 61 | #define ODR400F 5 | ||
| 62 | #define ODR800F 6 | ||
| 63 | u8 data_odr_init; | ||
| 64 | |||
| 65 | int (*init)(void); | ||
| 66 | void (*exit)(void); | ||
| 67 | int (*power_on)(void); | ||
| 68 | int (*power_off)(void); | ||
| 69 | }; | ||
| 70 | #endif /* __KXTJ9_H__ */ | ||
diff --git a/include/linux/input/pmic8xxx-keypad.h b/include/linux/input/pmic8xxx-keypad.h new file mode 100644 index 000000000000..5f1e2f9ad959 --- /dev/null +++ b/include/linux/input/pmic8xxx-keypad.h | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | /* Copyright (c) 2011, Code Aurora Forum. All rights reserved. | ||
| 2 | * | ||
| 3 | * This program is free software; you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License version 2 and | ||
| 5 | * only version 2 as published by the Free Software Foundation. | ||
| 6 | * | ||
| 7 | * This program is distributed in the hope that it will be useful, | ||
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | * GNU General Public License for more details. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __PMIC8XXX_KEYPAD_H__ | ||
| 14 | #define __PMIC8XXX_KEYPAD_H__ | ||
| 15 | |||
| 16 | #include <linux/input/matrix_keypad.h> | ||
| 17 | |||
| 18 | #define PM8XXX_KEYPAD_DEV_NAME "pm8xxx-keypad" | ||
| 19 | |||
| 20 | /** | ||
| 21 | * struct pm8xxx_keypad_platform_data - platform data for keypad | ||
| 22 | * @keymap_data - matrix keymap data | ||
| 23 | * @input_name - input device name | ||
| 24 | * @input_phys_device - input device name | ||
| 25 | * @num_cols - number of columns of keypad | ||
| 26 | * @num_rows - number of row of keypad | ||
| 27 | * @debounce_ms - debounce period in milliseconds | ||
| 28 | * @scan_delay_ms - scan delay in milliseconds | ||
| 29 | * @row_hold_ns - row hold period in nanoseconds | ||
| 30 | * @wakeup - configure keypad as wakeup | ||
| 31 | * @rep - enable or disable key repeat bit | ||
| 32 | */ | ||
| 33 | struct pm8xxx_keypad_platform_data { | ||
| 34 | const struct matrix_keymap_data *keymap_data; | ||
| 35 | |||
| 36 | const char *input_name; | ||
| 37 | const char *input_phys_device; | ||
| 38 | |||
| 39 | unsigned int num_cols; | ||
| 40 | unsigned int num_rows; | ||
| 41 | unsigned int rows_gpio_start; | ||
| 42 | unsigned int cols_gpio_start; | ||
| 43 | |||
| 44 | unsigned int debounce_ms; | ||
| 45 | unsigned int scan_delay_ms; | ||
| 46 | unsigned int row_hold_ns; | ||
| 47 | |||
| 48 | bool wakeup; | ||
| 49 | bool rep; | ||
| 50 | }; | ||
| 51 | |||
| 52 | #endif /*__PMIC8XXX_KEYPAD_H__ */ | ||
diff --git a/include/linux/input/pmic8xxx-pwrkey.h b/include/linux/input/pmic8xxx-pwrkey.h new file mode 100644 index 000000000000..6d2974e57109 --- /dev/null +++ b/include/linux/input/pmic8xxx-pwrkey.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | ||
| 2 | * | ||
| 3 | * This program is free software; you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License version 2 and | ||
| 5 | * only version 2 as published by the Free Software Foundation. | ||
| 6 | * | ||
| 7 | * This program is distributed in the hope that it will be useful, | ||
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | * GNU General Public License for more details. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __PMIC8XXX_PWRKEY_H__ | ||
| 14 | #define __PMIC8XXX_PWRKEY_H__ | ||
| 15 | |||
| 16 | #define PM8XXX_PWRKEY_DEV_NAME "pm8xxx-pwrkey" | ||
| 17 | |||
| 18 | /** | ||
| 19 | * struct pm8xxx_pwrkey_platform_data - platform data for pwrkey driver | ||
| 20 | * @pull up: power on register control for pull up/down configuration | ||
| 21 | * @kpd_trigger_delay_us: time delay for power key state change interrupt | ||
| 22 | * trigger. | ||
| 23 | * @wakeup: configure power key as wakeup source | ||
| 24 | */ | ||
| 25 | struct pm8xxx_pwrkey_platform_data { | ||
| 26 | bool pull_up; | ||
| 27 | u32 kpd_trigger_delay_us; | ||
| 28 | u32 wakeup; | ||
| 29 | }; | ||
| 30 | |||
| 31 | #endif /* __PMIC8XXX_PWRKEY_H__ */ | ||
