2 #include "generic_sensor.h"
\r
5 * Driver Version Note
\r
6 *v0.0.1: this driver is compatible with generic_sensor
\r
8 * add sensor_focus_af_const_pause_usr_cb;
\r
10 static int version = KERNEL_VERSION(0,0,3);
\r
11 module_param(version, int, S_IRUGO);
\r
15 module_param(debug, int, S_IRUGO|S_IWUSR);
\r
17 #define dprintk(level, fmt, arg...) do { \
\r
18 if (debug >= level) \
\r
19 printk(KERN_WARNING fmt , ## arg); } while (0)
\r
21 /* Sensor Driver Configuration Begin */
\r
22 #define SENSOR_NAME RK29_CAM_SENSOR_GC2035
\r
23 #define SENSOR_V4L2_IDENT V4L2_IDENT_GC2035
\r
24 #define SENSOR_ID 0x2035
\r
25 #define SENSOR_BUS_PARAM (V4L2_MBUS_MASTER |\
\r
26 V4L2_MBUS_PCLK_SAMPLE_RISING|V4L2_MBUS_HSYNC_ACTIVE_HIGH| V4L2_MBUS_VSYNC_ACTIVE_HIGH|\
\r
27 V4L2_MBUS_DATA_ACTIVE_HIGH | SOCAM_DATAWIDTH_8 |SOCAM_MCLK_24MHZ)
\r
28 #define SENSOR_PREVIEW_W 800
\r
29 #define SENSOR_PREVIEW_H 600
\r
30 #define SENSOR_PREVIEW_FPS 15000 // 15fps
\r
31 #define SENSOR_FULLRES_L_FPS 7500 // 7.5fps
\r
32 #define SENSOR_FULLRES_H_FPS 7500 // 7.5fps
\r
33 #define SENSOR_720P_FPS 0
\r
34 #define SENSOR_1080P_FPS 0
\r
36 #define SENSOR_REGISTER_LEN 1 // sensor register address bytes
\r
37 #define SENSOR_VALUE_LEN 1 // sensor register value bytes
\r
38 static unsigned int SensorConfiguration = (CFG_WhiteBalance|CFG_Effect|CFG_Scene);
\r
39 static unsigned int SensorChipID[] = {SENSOR_ID};
\r
40 /* Sensor Driver Configuration End */
\r
43 #define SENSOR_NAME_STRING(a) STR(CONS(SENSOR_NAME, a))
\r
44 #define SENSOR_NAME_VARFUN(a) CONS(SENSOR_NAME, a)
\r
46 #define SensorRegVal(a,b) CONS4(SensorReg,SENSOR_REGISTER_LEN,Val,SENSOR_VALUE_LEN)(a,b)
\r
47 #define sensor_write(client,reg,v) CONS4(sensor_write_reg,SENSOR_REGISTER_LEN,val,SENSOR_VALUE_LEN)(client,(reg),(v))
\r
48 #define sensor_read(client,reg,v) CONS4(sensor_read_reg,SENSOR_REGISTER_LEN,val,SENSOR_VALUE_LEN)(client,(reg),(v))
\r
49 #define sensor_write_array generic_sensor_write_array
\r
51 struct sensor_parameter
\r
53 unsigned int PreviewDummyPixels;
\r
54 unsigned int CaptureDummyPixels;
\r
55 unsigned int preview_exposure;
\r
56 unsigned short int preview_line_width;
\r
57 unsigned short int preview_gain;
\r
59 unsigned short int PreviewPclk;
\r
60 unsigned short int CapturePclk;
\r
64 struct specific_sensor{
\r
65 struct generic_sensor common_sensor;
\r
66 //define user data below
\r
67 struct sensor_parameter parameter;
\r
73 * The follow setting need been filled.
\r
76 * sensor_init_data : Sensor initial setting;
\r
77 * sensor_fullres_lowfps_data : Sensor full resolution setting with best auality, recommand for video;
\r
78 * sensor_preview_data : Sensor preview resolution setting, recommand it is vga or svga;
\r
79 * sensor_softreset_data : Sensor software reset register;
\r
80 * sensor_check_id_data : Sensir chip id register;
\r
83 * sensor_fullres_highfps_data: Sensor full resolution setting with high framerate, recommand for video;
\r
84 * sensor_720p: Sensor 720p setting, it is for video;
\r
85 * sensor_1080p: Sensor 1080p setting, it is for video;
\r
88 * The SensorEnd which is the setting end flag must be filled int the last of each setting;
\r
91 /* Sensor initial setting */
\r
92 static struct rk_sensor_reg sensor_init_data[] =
\r
102 {0xf9 , 0xfe}, //[0] pll enable
\r
105 {0xf7 , 0x15}, //pll enable
\r
117 //////////measure window ///////////
\r
119 {0xec , 0x06},//04
\r
120 {0xed , 0x06},//04
\r
121 {0xee , 0x62},//60
\r
122 {0xef , 0x92},//90
\r
124 ///////////analog/////////////
\r
125 {0x0a , 0x00}, //row start
\r
126 {0x0c , 0x00}, //col start
\r
129 {0x0f , 0x06}, //Window setting
\r
131 {0x17 , 0x14}, //[0]mirror [1]flip
\r
134 {0x18 , 0x0e}, //sdark 4 row in even frame??
\r
135 {0x19 , 0x0c}, //AD pipe number
\r
139 {0x18 , 0x0a}, //sdark 4 row in even frame??
\r
140 {0x19 , 0x0a}, //AD pipe number
\r
143 {0x1a , 0x01}, //CISCTL mode4
\r
145 {0x1e , 0x88}, //analog mode1 [7] tx-high en [5:3]COL_bias
\r
146 {0x1f , 0x08}, //[3] tx-low en//
\r
147 {0x20 , 0x05}, //[0]adclk mode , 0x[1]rowclk_MODE [2]rsthigh_en
\r
148 {0x21 , 0x0f}, //[6:4]rsg
\r
149 {0x22 , 0xf0}, //[3:0]vref
\r
150 {0x23 , 0xc3}, //f3//ADC_r
\r
151 {0x24 , 0x17}, //pad drive 16
\r
155 {0x11 , 0x20},//AEC_out_slope , 0x
\r
156 {0x1f , 0xc0},//max_post_gain
\r
157 {0x20 , 0x60},//max_pre_gain
\r
158 {0x47 , 0x30},//AEC_outdoor_th
\r
160 {0x13 , 0x75},//y_target
\r
169 {0x27 , 0x00},//step
\r
171 {0x29 , 0x05},//level1
\r
173 {0x2b , 0x05},//level2
\r
175 {0x2d , 0x06},//6e8//level3
\r
177 {0x2f , 0x0a},//level4
\r
181 {0xfe , 0x00}, //0x , 0x , 0x , 0x , 0x
\r
182 {0xb6 , 0x03}, //AEC enable
\r
186 {0x3f , 0x00}, //prc close
\r
200 ///block////////////
\r
202 {0x81 , 0x26},//38 , 0x//skin_Y 8c_debug
\r
203 {0x87 , 0x90}, //[7]middle gamma
\r
204 {0x84 , 0x00}, //output put foramat
\r
205 {0x86 , 0x07}, //02 //sync plority
\r
207 {0xb0 , 0x80}, //globle gain
\r
208 {0xc0 , 0x40},//Yuv bypass
\r
210 //////lsc/////////////
\r
269 //////////cc//////////////
\r
272 {0xc1 , 0x40}, //Green_cc for d
\r
278 {0xc7 , 0x40},//for cwf
\r
284 {0xcd , 0x36},//for A
\r
292 ///////awb start ////////////////
\r
313 {0x4d , 0x10}, // 10
\r
330 {0x4d , 0x20}, // 20
\r
351 {0x4e , 0x00}, // 30
\r
364 {0x4d , 0x40}, // 40
\r
381 {0x4d , 0x50}, // 50
\r
398 {0x4d , 0x60}, // 60
\r
415 {0x4d , 0x70}, // 70
\r
432 {0x4d , 0x80}, // 80
\r
449 {0x4d , 0x90}, // 90
\r
466 {0x4d , 0xa0}, // a0
\r
483 {0x4d , 0xb0}, // b0
\r
500 {0x4d , 0xc0}, // c0
\r
517 {0x4d , 0xd0}, // d0
\r
535 /////// awb value////////
\r
562 {0x50 , 0x88},//c0//[6]green mode
\r
566 {0x57 , 0x20}, //pre adjust
\r
568 {0x5b , 0x02}, //AWB_gain_delta
\r
569 {0x61 , 0xaa},//R/G stand
\r
570 {0x62 , 0xaa},//R/G stand
\r
572 {0x74 , 0x10}, //0x//AWB_C_max
\r
573 {0x77 , 0x08}, // 0x//AWB_p2_x
\r
574 {0x78 , 0xfd}, //AWB_p2_y
\r
577 {0x88 , 0x04},//06 , 0x//[1]dark mode
\r
578 {0x8a , 0xc0},//awb move mode
\r
580 {0x84 , 0x08}, //0x//auto_window
\r
581 {0x8b , 0x00}, // 0x//awb compare luma
\r
582 {0x8d , 0x70}, //awb gain limit R
\r
586 {0x82 , 0x02},//awb_en
\r
587 /////////awb end /////////////
\r
594 {0xa5 , 0x40}, //lsc_th
\r
595 {0xa2 , 0xa0}, //lsc_dec_slope
\r
596 {0xa6 , 0x80}, //dd_th
\r
597 {0xa7 , 0x80}, //ot_th
\r
600 {0xb0 , 0x99}, //0x//edge effect slope low
\r
601 {0xb1 , 0x34},//edge effect slope low
\r
602 {0xb3 , 0x80}, //saturation dec slope
\r
611 ////////////YCP//////////
\r
612 {0xd1 , 0x38},//saturation_cb
\r
613 {0xd2 , 0x38},//saturation_Cr
\r
614 {0xd3 , 0x40},//contrast ?
\r
615 {0xd4 , 0x80},//contrast center
\r
616 {0xd5 , 0x00},//luma_offset
\r
618 {0xdd , 0xb8},//edge_sa_g,b
\r
620 ///////dndd///////////
\r
622 {0x88 , 0x15},//dn_b_base
\r
623 {0x8c , 0xf6}, //[2]b_in_dark_inc
\r
624 {0x89 , 0x03}, //dn_c_weight
\r
625 ////////EE ///////////
\r
627 {0x90 , 0x6c},// EEINTP mode1
\r
628 {0x97 , 0x45},// edge effect
\r
629 ////==============RGB Gamma
\r
653 ///=================y gamma
\r
668 /////1600x1200size//
\r
670 {0x90 , 0x01}, //0x//crop enable
\r
671 {0x95 , 0x04}, //0x//1600x1200
\r
678 {0x43 , 0x06}, //output buf width
\r
679 {0x41 , 0x02}, // Pclk_polarity
\r
680 {0x40 , 0x40}, //00
\r
681 {0x17 , 0x00}, //widv
\r
683 ////output DVP/////
\r
688 {0xc8 , 0x00},//close scaler
\r
689 {0x99 , 0x22},// 1/2 subsample
\r
700 {0x90 , 0x01}, //crop enable
\r
707 {0x82 , 0xfe}, // fe
\r
714 ///////// re zao///
\r
734 //// small RGB gamma////
\r
772 /* Senor full resolution setting: recommand for capture */
\r
773 static struct rk_sensor_reg sensor_fullres_lowfps_data[] ={
\r
780 {0x99 , 0x11}, // disable sambsample
\r
802 /* Senor full resolution setting: recommand for video */
\r
803 static struct rk_sensor_reg sensor_fullres_highfps_data[] ={
\r
806 /* Preview resolution setting*/
\r
807 static struct rk_sensor_reg sensor_preview_data[] =
\r
813 {0xc8 , 0x00},//close scaler
\r
814 {0x99 , 0x22},// 1/2 subsample
\r
825 {0x90 , 0x01}, //crop enable
\r
834 static struct rk_sensor_reg sensor_720p[]={
\r
839 static struct rk_sensor_reg sensor_1080p[]={
\r
844 static struct rk_sensor_reg sensor_softreset_data[]={
\r
845 SensorRegVal(0xfe,80),
\r
850 static struct rk_sensor_reg sensor_check_id_data[]={
\r
851 SensorRegVal(0xf0,0),
\r
852 SensorRegVal(0xf1,0),
\r
856 * The following setting must been filled, if the function is turn on by CONFIG_SENSOR_xxxx
\r
858 static struct rk_sensor_reg sensor_WhiteB_Auto[]=
\r
866 /* Cloudy Colour Temperature : 6500K - 8000K */
\r
867 static struct rk_sensor_reg sensor_WhiteB_Cloudy[]=
\r
875 /* ClearDay Colour Temperature : 5000K - 6500K */
\r
876 static struct rk_sensor_reg sensor_WhiteB_ClearDay[]=
\r
885 /* Office Colour Temperature : 3500K - 5000K */
\r
886 static struct rk_sensor_reg sensor_WhiteB_TungstenLamp1[]=
\r
896 /* Home Colour Temperature : 2500K - 3500K */
\r
897 static struct rk_sensor_reg sensor_WhiteB_TungstenLamp2[]=
\r
906 static struct rk_sensor_reg *sensor_WhiteBalanceSeqe[] = {sensor_WhiteB_Auto, sensor_WhiteB_TungstenLamp1,sensor_WhiteB_TungstenLamp2,
\r
907 sensor_WhiteB_ClearDay, sensor_WhiteB_Cloudy,NULL,
\r
910 static struct rk_sensor_reg sensor_Brightness0[]=
\r
921 static struct rk_sensor_reg sensor_Brightness1[]=
\r
933 static struct rk_sensor_reg sensor_Brightness2[]=
\r
945 static struct rk_sensor_reg sensor_Brightness3[]=
\r
956 static struct rk_sensor_reg sensor_Brightness4[]=
\r
967 static struct rk_sensor_reg sensor_Brightness5[]=
\r
977 static struct rk_sensor_reg *sensor_BrightnessSeqe[] = {sensor_Brightness0, sensor_Brightness1, sensor_Brightness2, sensor_Brightness3,
\r
978 sensor_Brightness4, sensor_Brightness5,NULL,
\r
981 static struct rk_sensor_reg sensor_Effect_Normal[] =
\r
988 static struct rk_sensor_reg sensor_Effect_WandB[] =
\r
995 static struct rk_sensor_reg sensor_Effect_Sepia[] =
\r
1002 static struct rk_sensor_reg sensor_Effect_Negative[] =
\r
1009 static struct rk_sensor_reg sensor_Effect_Bluish[] =
\r
1017 static struct rk_sensor_reg sensor_Effect_Green[] =
\r
1024 static struct rk_sensor_reg *sensor_EffectSeqe[] = {sensor_Effect_Normal, sensor_Effect_WandB, sensor_Effect_Negative,sensor_Effect_Sepia,
\r
1025 sensor_Effect_Bluish, sensor_Effect_Green,NULL,
\r
1028 static struct rk_sensor_reg sensor_Exposure0[]=
\r
1034 static struct rk_sensor_reg sensor_Exposure1[]=
\r
1039 static struct rk_sensor_reg sensor_Exposure2[]=
\r
1044 static struct rk_sensor_reg sensor_Exposure3[]=
\r
1049 static struct rk_sensor_reg sensor_Exposure4[]=
\r
1054 static struct rk_sensor_reg sensor_Exposure5[]=
\r
1060 static struct rk_sensor_reg sensor_Exposure6[]=
\r
1065 static struct rk_sensor_reg *sensor_ExposureSeqe[] = {sensor_Exposure0, sensor_Exposure1, sensor_Exposure2, sensor_Exposure3,
\r
1066 sensor_Exposure4, sensor_Exposure5,sensor_Exposure6,NULL,
\r
1069 static struct rk_sensor_reg sensor_Saturation0[]=
\r
1074 static struct rk_sensor_reg sensor_Saturation1[]=
\r
1079 static struct rk_sensor_reg sensor_Saturation2[]=
\r
1083 static struct rk_sensor_reg *sensor_SaturationSeqe[] = {sensor_Saturation0, sensor_Saturation1, sensor_Saturation2, NULL,};
\r
1085 static struct rk_sensor_reg sensor_Contrast0[]=
\r
1092 static struct rk_sensor_reg sensor_Contrast1[]=
\r
1099 static struct rk_sensor_reg sensor_Contrast2[]=
\r
1106 static struct rk_sensor_reg sensor_Contrast3[]=
\r
1113 static struct rk_sensor_reg sensor_Contrast4[]=
\r
1121 static struct rk_sensor_reg sensor_Contrast5[]=
\r
1128 static struct rk_sensor_reg sensor_Contrast6[]=
\r
1134 static struct rk_sensor_reg *sensor_ContrastSeqe[] = {sensor_Contrast0, sensor_Contrast1, sensor_Contrast2, sensor_Contrast3,
\r
1135 sensor_Contrast4, sensor_Contrast5, sensor_Contrast6, NULL,
\r
1137 static struct rk_sensor_reg sensor_SceneAuto[] =
\r
1146 static struct rk_sensor_reg sensor_SceneNight[] =
\r
1154 static struct rk_sensor_reg *sensor_SceneSeqe[] = {sensor_SceneAuto, sensor_SceneNight,NULL,};
\r
1156 static struct rk_sensor_reg sensor_Zoom0[] =
\r
1161 static struct rk_sensor_reg sensor_Zoom1[] =
\r
1166 static struct rk_sensor_reg sensor_Zoom2[] =
\r
1172 static struct rk_sensor_reg sensor_Zoom3[] =
\r
1176 static struct rk_sensor_reg *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL,};
\r
1179 * User could be add v4l2_querymenu in sensor_controls by new_usr_v4l2menu
\r
1181 static struct v4l2_querymenu sensor_menus[] =
\r
1185 * User could be add v4l2_queryctrl in sensor_controls by new_user_v4l2ctrl
\r
1187 static struct sensor_v4l2ctrl_usr_s sensor_controls[] =
\r
1191 //MUST define the current used format as the first item
\r
1192 static struct rk_sensor_datafmt sensor_colour_fmts[] = {
\r
1193 {V4L2_MBUS_FMT_UYVY8_2X8, V4L2_COLORSPACE_JPEG}
\r
1195 /*static struct soc_camera_ops sensor_ops;*/
\r
1199 **********************************************************
\r
1200 * Following is local code:
\r
1202 * Please codeing your program here
\r
1203 **********************************************************
\r
1206 **********************************************************
\r
1207 * Following is callback
\r
1208 * If necessary, you could coding these callback
\r
1209 **********************************************************
\r
1212 * the function is called in open sensor
\r
1214 static int sensor_activate_cb(struct i2c_client *client)
\r
1220 * the function is called in close sensor
\r
1222 static int sensor_deactivate_cb(struct i2c_client *client)
\r
1228 * the function is called before sensor register setting in VIDIOC_S_FMT
\r
1230 static int sensor_s_fmt_cb_th(struct i2c_client *client,struct v4l2_mbus_framefmt *mf, bool capture)
\r
1233 unsigned int pid=0,shutter,temp_reg;
\r
1234 if(mf->width == 1600 && mf->height == 1200){
\r
1235 sensor_write(client, 0xfe, 0x00);
\r
1236 sensor_write(client, 0xb6, 0x02);
\r
1239 sensor_read(client, 0x03, &value);
\r
1240 pid |= (value << 8);
\r
1241 sensor_read(client, 0x04, &value);
\r
1242 pid |= (value & 0xff);
\r
1246 temp_reg= shutter /2; // 2
\r
1248 if(temp_reg < 1) temp_reg = 1;
\r
1251 sensor_write(client, 0x03, ((temp_reg>>8)&0xff));
\r
1252 sensor_write(client, 0x04, (temp_reg&0xff));
\r
1258 * the function is called after sensor register setting finished in VIDIOC_S_FMT
\r
1260 static int sensor_s_fmt_cb_bh (struct i2c_client *client,struct v4l2_mbus_framefmt *mf, bool capture)
\r
1262 /* add delay for rk312x*/
1266 static int sensor_softrest_usr_cb(struct i2c_client *client,struct rk_sensor_reg *series)
\r
1271 static int sensor_check_id_usr_cb(struct i2c_client *client,struct rk_sensor_reg *series)
\r
1275 static int sensor_try_fmt_cb_th(struct i2c_client *client,struct v4l2_mbus_framefmt *mf)
\r
1279 static int sensor_suspend(struct soc_camera_device *icd, pm_message_t pm_msg)
\r
1281 //struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
\r
1283 if (pm_msg.event == PM_EVENT_SUSPEND) {
\r
1284 SENSOR_DG("Suspend");
\r
1287 SENSOR_TR("pm_msg.event(0x%x) != PM_EVENT_SUSPEND\n",pm_msg.event);
\r
1293 static int sensor_resume(struct soc_camera_device *icd)
\r
1296 SENSOR_DG("Resume");
\r
1301 static int sensor_mirror_cb (struct i2c_client *client, int mirror)
\r
1306 SENSOR_DG("mirror: %d",mirror);
\r
1308 sensor_write(client, 0xfe, 0);
\r
1309 err = sensor_read(client, 0x17, &val);
\r
1312 if((val & 0x1) == 0){
\r
1313 err = sensor_write(client, 0x17, ((val |0x1)+4));
\r
1316 err = sensor_write(client, 0x17, ((val & 0xfe)+4));
\r
1324 * the function is v4l2 control V4L2_CID_HFLIP callback
\r
1326 static int sensor_v4l2ctrl_mirror_cb(struct soc_camera_device *icd, struct sensor_v4l2ctrl_info_s *ctrl_info,
\r
1327 struct v4l2_ext_control *ext_ctrl)
\r
1329 struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
\r
1331 if (sensor_mirror_cb(client,ext_ctrl->value) != 0)
\r
1332 SENSOR_TR("sensor_mirror failed, value:0x%x",ext_ctrl->value);
\r
1334 SENSOR_DG("sensor_mirror success, value:0x%x",ext_ctrl->value);
\r
1338 static int sensor_flip_cb(struct i2c_client *client, int flip)
\r
1343 SENSOR_DG("flip: %d",flip);
\r
1346 sensor_write(client, 0xfe, 0);
\r
1347 err = sensor_read(client, 0x17, &val);
\r
1350 if((val & 0x2) == 0){
\r
1351 err = sensor_write(client, 0x17, ((val |0x2)+4));
\r
1354 err = sensor_write(client, 0x17, ((val & 0xfc)+4));
\r
1364 * the function is v4l2 control V4L2_CID_VFLIP callback
\r
1366 static int sensor_v4l2ctrl_flip_cb(struct soc_camera_device *icd, struct sensor_v4l2ctrl_info_s *ctrl_info,
\r
1367 struct v4l2_ext_control *ext_ctrl)
\r
1369 struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
\r
1371 if (sensor_flip_cb(client,ext_ctrl->value) != 0)
\r
1372 SENSOR_TR("sensor_flip failed, value:0x%x",ext_ctrl->value);
\r
1374 SENSOR_DG("sensor_flip success, value:0x%x",ext_ctrl->value);
\r
1378 * the functions are focus callbacks
\r
1380 static int sensor_focus_init_usr_cb(struct i2c_client *client){
\r
1384 static int sensor_focus_af_single_usr_cb(struct i2c_client *client){
\r
1388 static int sensor_focus_af_near_usr_cb(struct i2c_client *client){
\r
1392 static int sensor_focus_af_far_usr_cb(struct i2c_client *client){
\r
1396 static int sensor_focus_af_specialpos_usr_cb(struct i2c_client *client,int pos){
\r
1400 static int sensor_focus_af_const_usr_cb(struct i2c_client *client){
\r
1403 static int sensor_focus_af_const_pause_usr_cb(struct i2c_client *client)
1407 static int sensor_focus_af_close_usr_cb(struct i2c_client *client){
\r
1411 static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)
\r
1417 face defect call back
\r
1419 static int sensor_face_detect_usr_cb(struct i2c_client *client,int on){
\r
1424 * The function can been run in sensor_init_parametres which run in sensor_probe, so user can do some
\r
1425 * initialization in the function.
\r
1427 static void sensor_init_parameters_user(struct specific_sensor* spsensor,struct soc_camera_device *icd)
\r
1433 * :::::WARNING:::::
\r
1434 * It is not allowed to modify the following code
\r
1437 sensor_init_parameters_default_code();
\r
1439 sensor_v4l2_struct_initialization();
\r
1441 sensor_probe_default_code();
\r
1443 sensor_remove_default_code();
\r
1445 sensor_driver_default_module_code();
\r