aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/capsense_prog/cycapsense_issp.h
blob: 75612f546847bb5630bb2f622bd2b509d34c7837 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
 * Header file for:
 * Cypress CapSense(TM) firmware downloader.
 *
 * Copyright (c) 2012-2013 Motorola Mobility LLC
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * 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.
 *
 */
#ifndef __CYCAPSENSE_ISSP_H__
#define __CYCAPSENSE_ISSP_H__

struct hex_info {
	const char *fw_name;
	u8 *data;
	u8 *s_data;
	u16 cs;
	u16 fw_rev;
};
struct issp_data {
	struct hex_info inf;
	const char *name;
	unsigned int silicon_id;
	int block_size;
	int num_of_blocks;
	int secure_bytes;
	int c_gpio;
	int d_gpio;
	int rst_gpio;
	int fw_rev_offset;
};
int cycapsense_issp_parse_hex(struct issp_data *d, const u8 *src, int len);

int cycapsense_issp_get_cs(const struct issp_data *d, unsigned int *cs);

int cycapsense_issp_verify_id(const struct issp_data *d);

int cycapsense_issp_erase(const struct issp_data *d);

int cycapsense_issp_dnld(const struct issp_data *d);

int cycapsense_issp_get_fw_rev(const struct issp_data *d, unsigned int *fw_rev);
#endif /* __CYCAPSENSE_ISSP_H__ */