From 8e4bff4cab0ddac6060645b0715210484d02ff40 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 30 Aug 2017 08:25:59 +0000 Subject: Initial file dump from open source release --- drivers/platform/sprd/boot_mode.c | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 drivers/platform/sprd/boot_mode.c (limited to 'drivers/platform/sprd/boot_mode.c') diff --git a/drivers/platform/sprd/boot_mode.c b/drivers/platform/sprd/boot_mode.c new file mode 100644 index 00000000..b206dc4d --- /dev/null +++ b/drivers/platform/sprd/boot_mode.c @@ -0,0 +1,46 @@ +#include +#include +#include +#include +#include + + +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); -- cgit v1.3.1