diff options
Diffstat (limited to 'drivers/misc/m4sensorhub_wrist.h')
| -rw-r--r-- | drivers/misc/m4sensorhub_wrist.h | 106 | 
1 files changed, 106 insertions, 0 deletions
| diff --git a/drivers/misc/m4sensorhub_wrist.h b/drivers/misc/m4sensorhub_wrist.h new file mode 100644 index 00000000000..7065935cc17 --- /dev/null +++ b/drivers/misc/m4sensorhub_wrist.h @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2013 Motorola Mobility, Inc. + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307, USA + */ + +#ifndef _M4SENSORHUB_WRIST_H_ +#define _M4SENSORHUB_WRIST_H_ + +#include <linux/types.h> +#include <linux/platform_device.h> +#include <linux/m4sensorhub.h> + +struct m4wrist_driver_data { +	struct m4sensorhub_data  *client; +	struct mutex             *mutex; +	struct platform_device   *pdev; + +	int         gpio_xres; +	int         gpio_clk; +	int         gpio_data; + +	uint8_t     *img; +	uint32_t    size; +	uint8_t     si_id[2]; +	uint8_t     fw_ver[2]; +} __packed; + +#define M4WRIST_ID_SETUP_1_BITS 594 +static uint8_t m4wrist_id_setup_1[] = { +	0xCA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +	0x0D, 0xEE, 0x21, 0xF7, 0xF0, 0x27, 0xDC, 0x40, +	0x9F, 0x70, 0x01, 0xFD, 0xEE, 0x01, 0xE7, 0xC1, +	0xD7, 0x9F, 0x20, 0x7E, 0x7D, 0x88, 0x7D, 0xEE, +	0x21, 0xF7, 0xF0, 0x07, 0xDC, 0x40, 0x1F, 0x70, +	0x01, 0xFD, 0xEE, 0x01, 0xF7, 0xA0, 0x1F, 0xDE, +	0xA0, 0x1F, 0x7B, 0x00, 0x7D, 0xE0, 0x13, 0xF7, +	0xC0, 0x07, 0xDF, 0x28, 0x1F, 0x7D, 0x18, 0x7D, +	0xFE, 0x25, 0x80, +}; + +#define M4WRIST_ID_SETUP_2_BITS 418 +static uint8_t m4wrist_id_setup_2[] = { +	0xDE, 0xE2, 0x1F, 0x7F, 0x02, 0x7D, 0xC4, 0x09, +	0xF7, 0x00, 0x1F, 0x9F, 0x07, 0x5E, 0x7C, 0x81, +	0xF9, 0xF4, 0x01, 0xF7, 0xF0, 0x07, 0xDC, 0x40, +	0x1F, 0x70, 0x01, 0xFD, 0xEE, 0x01, 0xF7, 0xA0, +	0x1F, 0xDE, 0xA0, 0x1F, 0x7B, 0x00, 0x7D, 0xE0, +	0x0D, 0xF7, 0xC0, 0x07, 0xDF, 0x28, 0x1F, 0x7D, +	0x18, 0x7D, 0xFE, 0x25, 0x80, +}; + +#define M4WRIST_SYNC_ENABLE_BITS 110 +static uint8_t m4wrist_sync_enable[] = { +	0xDE, 0xE2, 0x1F, 0x7F, 0x02, 0x7D, 0xC4, 0x09, +	0xF7, 0x00, 0x1F, 0xDE, 0xE0, 0x1C, +}; + +#define M4WRIST_SYNC_DISABLE_BITS 110 +static uint8_t m4wrist_sync_disable[] = { +	0xDE, 0xE2, 0x1F, 0x71, 0x00, 0x7D, 0xFC, 0x01, +	0xF7, 0x00, 0x1F, 0xDE, 0xE0, 0x1C, +}; + +#define M4WRIST_ERASE_BITS 396 +static uint8_t m4wrist_erase[] = { +	0xDE, 0xE2, 0x1F, 0x7F, 0x02, 0x7D, 0xC4, 0x09, +	0xF7, 0x00, 0x1F, 0x9F, 0x07, 0x5E, 0x7C, 0x85, +	0xFD, 0xFC, 0x01, 0xF7, 0x10, 0x07, 0xDC, 0x00, +	0x7F, 0x7B, 0x80, 0x7D, 0xE0, 0x0B, 0xF7, 0xA0, +	0x1F, 0xDE, 0xA0, 0x1F, 0x7B, 0x04, 0x7D, 0xF0, +	0x01, 0xF7, 0xC9, 0x87, 0xDF, 0x48, 0x1F, 0x7F, +	0x89, 0x60, +}; + +#define M4WRIST_READ_WRITE_SETUP_BITS 66 +static uint8_t m4wrist_read_write_setup[] = { +	0xDE, 0xF0, 0x1F, 0x78, 0x00, 0x7D, 0xA0, 0x03, +	0xC0, +}; + +#define M4WRIST_PROGRAM_AND_VERIFY_BITS 440 +static uint8_t m4wrist_program_and_verify[] = { +	0xDE, 0xE2, 0x1F, 0x7F, 0x02, 0x7D, 0xC4, 0x09, +	0xF7, 0x00, 0x1F, 0x9F, 0x07, 0x5E, 0x7C, 0x81, +	0xF9, 0xF7, 0x01, 0xF7, 0xF0, 0x07, 0xDC, 0x40, +	0x1F, 0x70, 0x01, 0xFD, 0xEE, 0x01, 0xF6, 0xA0, +	0x0F, 0xDE, 0x80, 0x7F, 0x7A, 0x80, 0x7D, 0xEC, +	0x01, 0xF7, 0x80, 0x57, 0xDF, 0x00, 0x1F, 0x7C, +	0xA0, 0x7D, 0xF4, 0x61, 0xF7, 0xF8, 0x96, +}; + +#endif /* _M4SENSORHUB_WRIST_H_ */ |