blob: ce92cc926da7ab31f64f8b61aafc4455aceddcd4 [file] [log] [blame]
/******************** (C) COPYRIGHT 2010 STMicroelectronics ********************
*
* File Name : l3g4200d_poll.h
* Authors : MH - C&I BU - Application Team
* : Carmine Iascone (carmine.iascone@st.com)
* : Matteo Dameno (matteo.dameno@st.com)
* Version : V 1.1 sysfs
* Date : 2010/Aug/19
* Description : L3G4200D digital output gyroscope sensor API
*
********************************************************************************
*
* 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.
*
********************************************************************************
* REVISON HISTORY
*
* VERSION | DATE | AUTHORS | DESCRIPTION
* 1.0 | 2010/Aug/19 | Carmine Iascone | First Release
* 1.1 | 2011/02/28 | Matteo Dameno | Self Test Added
*******************************************************************************/
#ifndef __L3G4200D_H__
#define __L3G4200D_H__
#define L3G4200D_GYR_DEV_NAME "l3g4200d"
#define L3GD20H_GYR_DEV_NAME "l3gd20"
#define L3G4200D_GYR_FS_250DPS 0x00
#define L3G4200D_GYR_FS_500DPS 0x10
#define L3G4200D_GYR_FS_2000DPS 0x30
#define L3G4200D_GYR_ENABLED 1
#define L3G4200D_GYR_DISABLED 0
#ifdef __KERNEL__
struct l3g4200d_gyr_platform_data {
int (*init)(void);
void (*exit)(void);
int (*power_on)(void);
int (*power_off)(void);
int poll_interval; /* in millisecond */
int min_interval;
u8 fs_range;
u8 axis_map_x;
u8 axis_map_y;
u8 axis_map_z;
u8 negate_x;
u8 negate_y;
u8 negate_z;
};
#endif /* __KERNEL__ */
#endif /* __L3G4200D_H__ */