2 * Copyright (C) 2011 Kionix, Inc.
3 * Written by Chris Hudson <chudson@kionix.com>
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.
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.
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
23 #define KXTJ9_I2C_ADDR 0x0F
25 struct kxtj9_platform_data
{
26 unsigned int min_interval
; /* minimum poll interval (in milli-seconds) */
27 unsigned int init_interval
; /* initial poll interval (in milli-seconds) */
30 * By default, x is axis 0, y is axis 1, z is axis 2; these can be
31 * changed to account for sensor orientation within the host device.
38 * Each axis can be negated to account for sensor orientation within
45 /* CTRL_REG1: set resolution, g-range, data ready enable */
46 /* Output resolution: 8-bit valid or 12-bit valid */
48 #define RES_12BIT (1 << 6)
50 /* Output g-range: +/-2g, 4g, or 8g */
52 #define KXTJ9_G_4G (1 << 3)
53 #define KXTJ9_G_8G (1 << 4)
58 int (*power_on
)(void);
59 int (*power_off
)(void);
61 #endif /* __KXTJ9_H__ */