blob: b206dc4de1df7367aebfeb8775032f8c358eba0a (
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
|
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/export.h>
static int calibration_mode = false;
static int __init calibration_start(char *str)
{
int calibration_device =0;
int mode=0,freq=0,device=0;
if(str){
pr_info("modem calibartion:%s\n", str);
sscanf(str, "%d,%d,%d", &mode,&freq,&device);
}
if(device & 0x80){
calibration_device = device & 0xf0;
calibration_mode = true;
pr_info("calibration device = 0x%x\n",calibration_device);
}
return 1;
}
__setup("calibration=", calibration_start);
int in_calibration(void)
{
return (int)(calibration_mode == true);
}
EXPORT_SYMBOL(in_calibration);
static int autotest_mode = false;
static int __init autotest_start(char *str)
{
autotest_mode = true;
return 1;
}
__setup("autotest=", autotest_start);
int in_autotest(void)
{
return (int)(autotest_mode == true);
}
EXPORT_SYMBOL(in_autotest);
|