diff options
Diffstat (limited to 'include/linux/input')
-rw-r--r-- | include/linux/input/bu21013.h | 26 | ||||
-rw-r--r-- | include/linux/input/lps001wp.h | 80 |
2 files changed, 95 insertions, 11 deletions
diff --git a/include/linux/input/bu21013.h b/include/linux/input/bu21013.h index 05e03284b92..143f433b9ee 100644 --- a/include/linux/input/bu21013.h +++ b/include/linux/input/bu21013.h @@ -1,5 +1,5 @@ /* - * Copyright (C) ST-Ericsson SA 2010 + * Copyright (C) ST-Ericsson SA 2009 * Author: Naveen Kumar G <naveen.gaddipati@stericsson.com> for ST-Ericsson * License terms:GNU General Public License (GPL) version 2 */ @@ -9,32 +9,36 @@ /** * struct bu21013_platform_device - Handle the platform data - * @cs_en: pointer to the cs enable function - * @cs_dis: pointer to the cs disable function - * @irq_read_val: pointer to read the pen irq value function + * @cs_en: pointer to the cs enable function + * @cs_dis: pointer to the cs disable function + * @irq_read_val: pointer to read the pen irq value function + * @x_max_res: xmax resolution + * @y_max_res: ymax resolution * @touch_x_max: touch x max * @touch_y_max: touch y max * @cs_pin: chip select pin * @irq: irq pin - * @ext_clk: external clock flag + * @has_ext_clk: has external clock + * @enable_ext_clk: enable external clock + * @portrait: portrait mode flag * @x_flip: x flip flag * @y_flip: y flip flag - * @wakeup: wakeup flag - * * This is used to handle the platform data - */ + **/ struct bu21013_platform_device { int (*cs_en)(int reset_pin); int (*cs_dis)(int reset_pin); int (*irq_read_val)(void); + int x_max_res; + int y_max_res; int touch_x_max; int touch_y_max; unsigned int cs_pin; unsigned int irq; - bool ext_clk; + bool has_ext_clk; + bool enable_ext_clk; + bool portrait; bool x_flip; bool y_flip; - bool wakeup; }; - #endif diff --git a/include/linux/input/lps001wp.h b/include/linux/input/lps001wp.h new file mode 100644 index 00000000000..aa5eac9af8f --- /dev/null +++ b/include/linux/input/lps001wp.h @@ -0,0 +1,80 @@ +/******************** (C) COPYRIGHT 2010 STMicroelectronics ******************** +* +* File Name : lps001wp.h +* Authors : MSH - Motion Mems BU - Application Team +* : Matteo Dameno (matteo.dameno@st.com)* +* : Carmine Iascone (carmine.iascone@st.com) +* Version : V 1.1.1 +* Date : 05/11/2010 +* Description : LPS001WP pressure temperature sensor driver +* +******************************************************************************** +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* THE PRESENT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES +* OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, FOR THE SOLE +* PURPOSE TO SUPPORT YOUR APPLICATION DEVELOPMENT. +* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, +* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE +* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING +* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. +* +*******************************************************************************/ + +#ifndef __LPS001WP_H__ +#define __LPS001WP_H__ + + +#include <linux/input.h> + +#define SAD0L 0x00 +#define SAD0H 0x01 +#define LPS001WP_PRS_I2C_SADROOT 0x2E +#define LPS001WP_PRS_I2C_SAD_L ((LPS001WP_PRS_I2C_SADROOT<<1)|SAD0L) +#define LPS001WP_PRS_I2C_SAD_H ((LPS001WP_PRS_I2C_SADROOT<<1)|SAD0H) +#define LPS001WP_PRS_DEV_NAME "lps001wp_prs_sysfs" + +/* input define mappings */ +#define ABS_PR ABS_PRESSURE +#define ABS_TEMP ABS_GAS +#define ABS_DLTPR ABS_MISC + + + +/************************************************/ +/* Pressure section defines */ +/************************************************/ + +/* Pressure Sensor Operating Mode */ +#define LPS001WP_PRS_ENABLE 0x01 +#define LPS001WP_PRS_DISABLE 0x00 + + + + +#define LPS001WP_PRS_PM_NORMAL 0x40 +#define LPS001WP_PRS_PM_OFF LPS001WP_PRS_DISABLE + +#define SENSITIVITY_T 64 /** = 64 LSB/degrC */ +#define SENSITIVITY_P 16 /** = 16 LSB/mbar */ + + +#ifdef __KERNEL__ +struct lps001wp_prs_platform_data { + + int poll_interval; + int min_interval; + + int (*init)(void); + void (*exit)(void); + int (*power_on)(void); + int (*power_off)(void); + +}; + +#endif /* __KERNEL__ */ + +#endif /* __LPS001WP_H__ */ |