blob: 6036b38d86cec83772887c2c170ae7a3cdbb85ec (
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
|
/*
* Copyright (C) 2012, Samsung Electronics Co. Ltd. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
*/
#include "ssp.h"
#if defined(CONFIG_SENSORS_SSP_CANVAS)
#define SSP_FIRMWARE_REVISION_BCM_OLD 20062201 // bcm4776 (rev:17 ~ 20)
#define SSP_FIRMWARE_REVISION_BCM_Q 20102900 // bcm4775 (rev:~16, 21~)
#define SSP_FIRMWARE_REVISION_BCM_R 20110500 // bcm4775 (rev:~16, 21~)
#elif defined(CONFIG_SENSORS_SSP_PICASSO)
#define SSP_FIRMWARE_REVISION_BCM_Q 20110200
#define SSP_FIRMWARE_REVISION_BCM_R 20111600
#elif defined(CONFIG_SENSORS_SSP_R8)
#define SSP_FIRMWARE_REVISION_BCM_Q 21011900
#define SSP_FIRMWARE_REVISION_BCM_R 21012700
#else
#define SSP_FIRMWARE_REVISION_BCM_Q 00000000
#define SSP_FIRMWARE_REVISION_BCM_R 00000000
#endif
unsigned int get_module_rev(struct ssp_data *data)
{
unsigned int version = 00000000;
switch(android_version){
case 10:
version = SSP_FIRMWARE_REVISION_BCM_Q;
break;
case 11:
version = SSP_FIRMWARE_REVISION_BCM_R;
break;
default:
pr_err("%s : unknown android_version: %d", __func__, android_version);
break;
}
#if defined(CONFIG_SENSORS_SSP_CANVAS)
if(get_patch_version(data->ap_type, data->ap_rev) == bbd_old)
return SSP_FIRMWARE_REVISION_BCM_OLD;
#endif
return version;
}
|